Re: [PATCH v4 20/20] backlight: make of_find_backlight_by_node() static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sam,

I love your patch! Yet something to improve:

[auto build test ERROR on backlight/for-backlight-next]
[also build test ERROR on tegra-drm/drm/tegra/for-next pwm/for-next linus/master v5.8-rc4]
[cannot apply to next-20200707]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sam-Ravnborg/backlight-backlight-updates/20200704-024949
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
config: arm-randconfig-r034-20200707 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/tilcdc/tilcdc_panel.c: In function 'panel_probe':
>> drivers/gpu/drm/tilcdc/tilcdc_panel.c:320:26: error: implicit declaration of function 'of_find_backlight_by_node'; did you mean 'of_find_i2c_adapter_by_node'? [-Werror=implicit-function-declaration]
     320 |   panel_mod->backlight = of_find_backlight_by_node(bl_node);
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                          of_find_i2c_adapter_by_node
>> drivers/gpu/drm/tilcdc/tilcdc_panel.c:320:24: error: assignment to 'struct backlight_device *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
     320 |   panel_mod->backlight = of_find_backlight_by_node(bl_node);
         |                        ^
   cc1: all warnings being treated as errors

vim +320 drivers/gpu/drm/tilcdc/tilcdc_panel.c

0d4bbaf9f3e5b9 Rob Clark        2012-12-18  299  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  300  static int panel_probe(struct platform_device *pdev)
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  301  {
18c44db8cafe9b Ezequiel Garcia  2014-09-02  302  	struct device_node *bl_node, *node = pdev->dev.of_node;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  303  	struct panel_module *panel_mod;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  304  	struct tilcdc_module *mod;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  305  	struct pinctrl *pinctrl;
12778fc14301cf Ezequiel Garcia  2014-09-02  306  	int ret;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  307  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  308  	/* bail out early if no DT data: */
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  309  	if (!node) {
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  310  		dev_err(&pdev->dev, "device-tree data is missing\n");
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  311  		return -ENXIO;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  312  	}
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  313  
971645d1fd734b Ezequiel Garcia  2014-09-02  314  	panel_mod = devm_kzalloc(&pdev->dev, sizeof(*panel_mod), GFP_KERNEL);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  315  	if (!panel_mod)
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  316  		return -ENOMEM;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  317  
18c44db8cafe9b Ezequiel Garcia  2014-09-02  318  	bl_node = of_parse_phandle(node, "backlight", 0);
18c44db8cafe9b Ezequiel Garcia  2014-09-02  319  	if (bl_node) {
18c44db8cafe9b Ezequiel Garcia  2014-09-02 @320  		panel_mod->backlight = of_find_backlight_by_node(bl_node);
18c44db8cafe9b Ezequiel Garcia  2014-09-02  321  		of_node_put(bl_node);
18c44db8cafe9b Ezequiel Garcia  2014-09-02  322  
18c44db8cafe9b Ezequiel Garcia  2014-09-02  323  		if (!panel_mod->backlight)
18c44db8cafe9b Ezequiel Garcia  2014-09-02  324  			return -EPROBE_DEFER;
18c44db8cafe9b Ezequiel Garcia  2014-09-02  325  
18c44db8cafe9b Ezequiel Garcia  2014-09-02  326  		dev_info(&pdev->dev, "found backlight\n");
18c44db8cafe9b Ezequiel Garcia  2014-09-02  327  	}
18c44db8cafe9b Ezequiel Garcia  2014-09-02  328  
26a5bd26499fba Uwe Kleine-König 2015-02-11  329  	panel_mod->enable_gpio = devm_gpiod_get_optional(&pdev->dev, "enable",
26a5bd26499fba Uwe Kleine-König 2015-02-11  330  							 GPIOD_OUT_LOW);
d898ce03675fc0 Ezequiel Garcia  2014-09-02  331  	if (IS_ERR(panel_mod->enable_gpio)) {
d898ce03675fc0 Ezequiel Garcia  2014-09-02  332  		ret = PTR_ERR(panel_mod->enable_gpio);
d898ce03675fc0 Ezequiel Garcia  2014-09-02  333  		dev_err(&pdev->dev, "failed to request enable GPIO\n");
d898ce03675fc0 Ezequiel Garcia  2014-09-02  334  		goto fail_backlight;
d898ce03675fc0 Ezequiel Garcia  2014-09-02  335  	}
d898ce03675fc0 Ezequiel Garcia  2014-09-02  336  
26a5bd26499fba Uwe Kleine-König 2015-02-11  337  	if (panel_mod->enable_gpio)
d898ce03675fc0 Ezequiel Garcia  2014-09-02  338  		dev_info(&pdev->dev, "found enable GPIO\n");
d898ce03675fc0 Ezequiel Garcia  2014-09-02  339  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  340  	mod = &panel_mod->base;
7cdcce9f8b4c15 Guido Martínez   2014-06-17  341  	pdev->dev.platform_data = mod;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  342  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  343  	tilcdc_module_init(mod, "panel", &panel_module_ops);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  344  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  345  	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  346  	if (IS_ERR(pinctrl))
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  347  		dev_warn(&pdev->dev, "pins are not configured\n");
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  348  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  349  	panel_mod->timings = of_get_display_timings(node);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  350  	if (!panel_mod->timings) {
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  351  		dev_err(&pdev->dev, "could not get panel timings\n");
12778fc14301cf Ezequiel Garcia  2014-09-02  352  		ret = -EINVAL;
7cdcce9f8b4c15 Guido Martínez   2014-06-17  353  		goto fail_free;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  354  	}
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  355  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  356  	panel_mod->info = of_get_panel_info(node);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  357  	if (!panel_mod->info) {
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  358  		dev_err(&pdev->dev, "could not get panel info\n");
12778fc14301cf Ezequiel Garcia  2014-09-02  359  		ret = -EINVAL;
7cdcce9f8b4c15 Guido Martínez   2014-06-17  360  		goto fail_timings;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  361  	}
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  362  
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  363  	return 0;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  364  
7cdcce9f8b4c15 Guido Martínez   2014-06-17  365  fail_timings:
7cdcce9f8b4c15 Guido Martínez   2014-06-17  366  	display_timings_release(panel_mod->timings);
7cdcce9f8b4c15 Guido Martínez   2014-06-17  367  
7cdcce9f8b4c15 Guido Martínez   2014-06-17  368  fail_free:
7cdcce9f8b4c15 Guido Martínez   2014-06-17  369  	tilcdc_module_cleanup(mod);
d898ce03675fc0 Ezequiel Garcia  2014-09-02  370  
d898ce03675fc0 Ezequiel Garcia  2014-09-02  371  fail_backlight:
18c44db8cafe9b Ezequiel Garcia  2014-09-02  372  	if (panel_mod->backlight)
18c44db8cafe9b Ezequiel Garcia  2014-09-02  373  		put_device(&panel_mod->backlight->dev);
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  374  	return ret;
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  375  }
0d4bbaf9f3e5b9 Rob Clark        2012-12-18  376  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux