lkml.org 
[lkml]   [2020]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings
From
Date
On 12/12/20 5:24 AM, Andy Shevchenko wrote:
> On Fri, Dec 11, 2020 at 9:20 PM Randy Dunlap <rdunlap@infradead.org> 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)
>> ^~~~~~~~~~~~~~~~~~~
>
> ...
>
>> +#ifdef CONFIG_PM_SLEEP
>> static int surface_gpe_suspend(struct device *dev)
>
> Perhaps __maybe_unused ?
>

Yes, I am aware of that option.
I don't know why it would be preferred though.

--
~Randy

\
 
 \ /
  Last update: 2020-12-12 18:07    [W:0.060 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site