All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: kernel test robot <lkp@intel.com>,
	Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: kbuild-all@lists.01.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/5] drm/gma500: Refactor backlight support
Date: Sat, 17 Sep 2022 22:47:42 +0200	[thread overview]
Message-ID: <2a974ade-500b-a22f-489f-2c0cadb5ae02@redhat.com> (raw)
In-Reply-To: <202209180122.NFgTVRJb-lkp@intel.com>

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 <lkp@intel.com>
> 
> 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	
> 


WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/5] drm/gma500: Refactor backlight support
Date: Sat, 17 Sep 2022 22:47:42 +0200	[thread overview]
Message-ID: <2a974ade-500b-a22f-489f-2c0cadb5ae02@redhat.com> (raw)
In-Reply-To: <202209180122.NFgTVRJb-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]

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 <lkp@intel.com>
> 
> 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	
> 

  reply	other threads:[~2022-09-17 20:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 14:03 [PATCH v2 0/5] drm/gma500: Backlight handling changes Hans de Goede
2022-09-17 14:03 ` [PATCH v2 1/5] drm/gma500: Refactor backlight support Hans de Goede
2022-09-17 17:35   ` kernel test robot
2022-09-17 20:47     ` Hans de Goede [this message]
2022-09-17 20:47       ` Hans de Goede
2022-09-17 14:03 ` [PATCH v2 2/5] drm/gma500: Change registered backlight device type to raw/native Hans de Goede
2022-09-17 14:03 ` [PATCH v2 3/5] drm/gma500: Use backlight_get_brightness() to get the brightness Hans de Goede
2022-09-17 20:46   ` Sam Ravnborg
2022-09-17 21:00     ` Hans de Goede
2022-09-17 21:20       ` Sam Ravnborg
2022-09-17 14:03 ` [PATCH v2 4/5] drm/gma500: Don't register backlight when another backlight should be used Hans de Goede
2022-09-17 14:03 ` [PATCH v2 5/5] drm/gma500: Call acpi_video_register_backlight() Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a974ade-500b-a22f-489f-2c0cadb5ae02@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lkp@intel.com \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.