[PATCH v6 2/2] drm/tinydrm: Add devres versions of drm_of_find_backlight

kbuild test robot lkp at intel.com
Mon Oct 2 20:16:38 UTC 2017


Hi Meghana,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.14-rc3 next-20170929]
[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/Meghana-Madhyastha/drm-tinydrm-drm_of_find_backlight-helper/20171003-011920
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: arm-sunxi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_of.c:283:26: error: redefinition of 'drm_of_find_backlight'
    struct backlight_device *drm_of_find_backlight(struct device *dev)
                             ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/drm_of.c:4:0:
   include/linux/backlight.h:181:1: note: previous definition of 'drm_of_find_backlight' was here
    drm_of_find_backlight(struct device *dev)
    ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_of.c:328:26: error: redefinition of 'devm_drm_of_find_backlight'
    struct backlight_device *devm_drm_of_find_backlight(struct device *dev)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/drm_of.c:4:0:
   include/linux/backlight.h:187:1: note: previous definition of 'devm_drm_of_find_backlight' was here
    devm_drm_of_find_backlight(struct device *dev)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/devm_drm_of_find_backlight +328 drivers/gpu/drm/drm_of.c

   264	
   265	/**
   266	 * drm_of_find_backlight - Find backlight device in device-tree
   267	 * @dev: Device
   268	 *
   269	 * This function looks for a DT node pointed to by a property named 'backlight'
   270	 * and uses of_find_backlight_by_node() to get the backlight device.
   271	 * Additionally if the brightness property is zero, it is set to
   272	 * max_brightness.
   273	 *
   274	 * Note: It is the responsibility of the caller to call put_device() when
   275	 * releasing the resource.
   276	 *
   277	 * Returns:
   278	 * NULL if there's no backlight property.
   279	 * Error pointer -EPROBE_DEFER if the DT node is found, but no backlight device
   280	 * is found.
   281	 * If the backlight device is found, a pointer to the structure is returned.
   282	 */
 > 283	struct backlight_device *drm_of_find_backlight(struct device *dev)
   284	{
   285		struct backlight_device *backlight;
   286		struct device_node *np;
   287	
   288		np = of_parse_phandle(dev->of_node, "backlight", 0);
   289		if (!np)
   290			return NULL;
   291	
   292		backlight = of_find_backlight_by_node(np);
   293		of_node_put(np);
   294	
   295		if (!backlight)
   296			return ERR_PTR(-EPROBE_DEFER);
   297	
   298		if (!backlight->props.brightness) {
   299			backlight->props.brightness = backlight->props.max_brightness;
   300			DRM_DEBUG_KMS("Backlight brightness set to %d\n",
   301				      backlight->props.brightness);
   302		}
   303	
   304		return backlight;
   305	}
   306	EXPORT_SYMBOL(drm_of_find_backlight);
   307	
   308	static void devm_drm_of_find_backlight_release(void *data)
   309	{
   310		put_device(data);
   311	}
   312	
   313	/**
   314	 * devm_drm_of_find_backlight - Find backlight device in device-tree
   315	 * devres version of the function
   316	 * @dev: Device
   317	 *
   318	 * This is the devres version of the function drm_of_find_backlight.
   319	 * Some drivers use devres versions of functions for
   320	 * requiring device resources.
   321	 *
   322	 * Returns:
   323	 * NULL if there's no backlight property.
   324	 * Error pointer -EPROBE_DEFER if the DT node is found, but no backlight device
   325	 * is found.
   326	 * If the backlight device is found, a pointer to the structure is returned.
   327	 */
 > 328	struct backlight_device *devm_drm_of_find_backlight(struct device *dev)

---
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: 23035 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171003/076c7157/attachment-0001.gz>


More information about the dri-devel mailing list