* [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings
@ 2020-12-14 23:33 Randy Dunlap
2020-12-15 19:55 ` Maximilian Luz
2021-01-04 11:44 ` Hans de Goede
0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-12-14 23:33 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Maximilian Luz, Hans de Goede, platform-driver-x86
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@infradead.org>
Cc: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: platform-driver-x86@vger.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);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings
2020-12-14 23:33 [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings Randy Dunlap
@ 2020-12-15 19:55 ` Maximilian Luz
2020-12-15 20:14 ` Randy Dunlap
2021-01-04 11:44 ` Hans de Goede
1 sibling, 1 reply; 4+ messages in thread
From: Maximilian Luz @ 2020-12-15 19:55 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel; +Cc: Hans de Goede, platform-driver-x86
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@infradead.org>
> Cc: Maximilian Luz <luzmaximilian@gmail.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: platform-driver-x86@vger.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@gmail.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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings
2020-12-15 19:55 ` Maximilian Luz
@ 2020-12-15 20:14 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-12-15 20:14 UTC (permalink / raw)
To: Maximilian Luz, linux-kernel; +Cc: Hans de Goede, platform-driver-x86
On 12/15/20 11:55 AM, Maximilian Luz wrote:
> 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@infradead.org>
>> Cc: Maximilian Luz <luzmaximilian@gmail.com>
>> Cc: Hans de Goede <hdegoede@redhat.com>
>> Cc: platform-driver-x86@vger.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@gmail.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.
>
Ugh, sorry about that. I've changed that in the patch so if I ever
resend it, it will be fixed.
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings
2020-12-14 23:33 [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings Randy Dunlap
2020-12-15 19:55 ` Maximilian Luz
@ 2021-01-04 11:44 ` Hans de Goede
1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-01-04 11:44 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel; +Cc: Maximilian Luz, platform-driver-x86
Hi,
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@infradead.org>
> Cc: Maximilian Luz <luzmaximilian@gmail.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: platform-driver-x86@vger.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/
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
>
> 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);
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-04 11:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 23:33 [PATCH v2 -next] platform: surface: fix non-PM_SLEEP build warnings Randy Dunlap
2020-12-15 19:55 ` Maximilian Luz
2020-12-15 20:14 ` Randy Dunlap
2021-01-04 11:44 ` Hans de Goede
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.