Hi, On 9/17/22 19:35, kernel test robot wrote: > Hi Hans, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on drm-misc/drm-misc-next] > [cannot apply to linus/master v6.0-rc5 next-20220916] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Hans-de-Goede/drm-gma500-Backlight-handling-changes/20220917-220535 > base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next > config: x86_64-allmodconfig > compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 > reproduce (this is a W=1 build): > # https://github.com/intel-lab-lkp/linux/commit/ff9adbc897036a56bb7c57aa407a489db1985400 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Hans-de-Goede/drm-gma500-Backlight-handling-changes/20220917-220535 > git checkout ff9adbc897036a56bb7c57aa407a489db1985400 > # save the config file > mkdir build_dir && cp config build_dir/.config > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/gma500/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > drivers/gpu/drm/gma500/backlight.c: In function 'gma_backlight_init': >>> drivers/gpu/drm/gma500/backlight.c:73:37: warning: unused variable 'props' [-Wunused-variable] > 73 | struct backlight_properties props = {}; > | ^~~~~ > At top level: >>> drivers/gpu/drm/gma500/backlight.c:65:35: warning: 'gma_backlight_ops' defined but not used [-Wunused-const-variable=] > 65 | static const struct backlight_ops gma_backlight_ops = { > | ^~~~~~~~~~~~~~~~~ > This is caused by these not being used when the kernel's config does not have CONFIG_BACKLIGHT enabled. I will send out a v3 series / v2 of this patch adding __maybe_unused to these 2 variables to fix this. Regards, Hans > > vim +/props +73 drivers/gpu/drm/gma500/backlight.c > > 64 > > 65 static const struct backlight_ops gma_backlight_ops = { > 66 .get_brightness = gma_backlight_get_brightness, > 67 .update_status = gma_backlight_update_status, > 68 }; > 69 > 70 int gma_backlight_init(struct drm_device *dev) > 71 { > 72 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); > > 73 struct backlight_properties props = {}; > 74 int ret; > 75 > 76 dev_priv->backlight_enabled = true; > 77 dev_priv->backlight_level = 100; > 78 > 79 ret = dev_priv->ops->backlight_init(dev); > 80 if (ret) > 81 return ret; > 82 >