lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Dec 2020 20:55:52 +0100
From:   Maximilian Luz <luzmaximilian@...il.com>
To:     Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org
Cc:     Hans de Goede <hdegoede@...hat.com>,
        platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build
 warnings

On 12/15/20 12:33 AM, Randy Dunlap wrote:
> Fix build warnings when CONFIG_PM_SLEEP is not enabled and these
> functions are not used:
> 
> ../drivers/platform/surface/surface_gpe.c:189:12: warning: ‘surface_gpe_resume’ defined but not used [-Wunused-function]
>   static int surface_gpe_resume(struct device *dev)
>              ^~~~~~~~~~~~~~~~~~
> ../drivers/platform/surface/surface_gpe.c:184:12: warning: ‘surface_gpe_suspend’ defined but not used [-Wunused-function]
>   static int surface_gpe_suspend(struct device *dev)
>              ^~~~~~~~~~~~~~~~~~~
> 
> Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Maximilian Luz <luzmaximilian@...il.com>
> Cc: Hans de Goede <hdegoede@...hat.com>
> Cc: platform-driver-x86@...r.kernel.org
> ---
> v2: dropped Maximilian's RVB tag since the patch changed
>      use preferred __maybe_unused instead of ifdeffery:
>        https://lore.kernel.org/patchwork/patch/732981/
> 
>   drivers/platform/surface/surface_gpe.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux-next-20201214.orig/drivers/platform/surface/surface_gpe.c
> +++ linux-next-20201214/drivers/platform/surface/surface_gpe.c
> @@ -181,12 +181,12 @@ static int surface_lid_enable_wakeup(str
>   	return 0;
>   }
>   
> -static int surface_gpe_suspend(struct device *dev)
> +static int __maybe_unused surface_gpe_suspend(struct device *dev)
>   {
>   	return surface_lid_enable_wakeup(dev, true);
>   }
>   
> -static int surface_gpe_resume(struct device *dev)
> +static int __maybe_unused surface_gpe_resume(struct device *dev)
>   {
>   	return surface_lid_enable_wakeup(dev, false);
>   }
> 

Code looks good to me.

Reviewed-by: Maximilian Luz <luzmaximilian@...il.com>

As already mentioned before, I'd prefer the subject line to be
"platform/surface: gpe: ...", or at least "platform/surface: ..." for
consistency with other commits. May just be a personal preference
though, so nothing that should prevent it from being applied.

Thanks,
Max

Powered by blists - more mailing lists