lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mmc: sunxi: mark PM functions as __maybe_unused
On Mon, May 28, 2018 at 1:04 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 25 May 2018 at 23:07, Arnd Bergmann <arnd@arndb.de> wrote:
>> The newly added runtime-pm functions cause a harmless warning
>> when CONFIG_PM is disabled:
>>
>> drivers/mmc/host/sunxi-mmc.c:1452:12: error: 'sunxi_mmc_runtime_suspend' defined but not used [-Werror=unused-function]
>> static int sunxi_mmc_runtime_suspend(struct device *dev)
>> ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/sunxi-mmc.c:1435:12: error: 'sunxi_mmc_runtime_resume' defined but not used [-Werror=unused-function]
>> static int sunxi_mmc_runtime_resume(struct device *dev)
>>
>> This marks them as __maybe_unused to shut up the warning.
>
> Most mmc drivers uses #ifdef CONFIG_PM instead of the __maybe_unused() option.
>
> It's not a big deal, but consistency is always good. Would you mind changing?

I'd prefer not to. Most uses of #ifdef CONFIG_PM that get introduced are wrong,
and cause additional randconfig warnings that I end up having to fix,
so I always
do it with __maybe_unused.

I don't mind if you treat my patch as a bug report and decide to fix
it differently
yourself, but you won't get that patch from me ;-)

Arnd

\
 
 \ /
  Last update: 2018-05-28 13:35    [W:0.070 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site