[v4 1/3] drm: Add HDMI colorspace property

kbuild test robot lkp at intel.com
Wed Nov 28 01:01:31 UTC 2018


Hi Uma,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.20-rc4 next-20181127]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Uma-Shankar/Add-Colorspace-connector-property-interface/20181128-083317
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x017-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/drm_connector.c: In function 'drm_mode_create_colorspace_property':
>> drivers/gpu/drm/drm_connector.c:1459:33: warning: 'prop' may be used uninitialized in this function [-Wmaybe-uninitialized]
     connector->colorspace_property = prop;
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

vim +/prop +1459 drivers/gpu/drm/drm_connector.c

  1427	
  1428	/**
  1429	 * drm_mode_create_colorspace_property - create colorspace property
  1430	 * Colorspace:
  1431	 *     This property helps select a suitable colorspace based on the sink
  1432	 *     capability. Modern sink devices support wider gamut like BT2020.
  1433	 *     This helps switch to BT2020 mode if the BT2020 encoded video stream
  1434	 *     is being played by the user, same for any other colorspace.
  1435	 * @connector: connector to set property on.
  1436	 *
  1437	 * Called by a driver the first time it's needed, must be attached to desired
  1438	 * connectors.
  1439	 *
  1440	 * Returns:
  1441	 * Zero on success, negative errno on failure.
  1442	 */
  1443	int drm_mode_create_colorspace_property(struct drm_connector *connector)
  1444	{
  1445		struct drm_device *dev = connector->dev;
  1446		struct drm_property *prop;
  1447	
  1448		if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
  1449				connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
  1450	
  1451			prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
  1452							"Colorspace",
  1453							hdmi_colorspace,
  1454							ARRAY_SIZE(hdmi_colorspace));
  1455			if (!prop)
  1456				return -ENOMEM;
  1457		}
  1458	
> 1459		connector->colorspace_property = prop;
  1460	
  1461		return 0;
  1462	}
  1463	EXPORT_SYMBOL(drm_mode_create_colorspace_property);
  1464	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 27611 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181128/dcca9177/attachment-0001.gz>


More information about the dri-devel mailing list