[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57172546.6090106@nvidia.com>
Date: Wed, 20 Apr 2016 14:44:22 +0800
From: Wei Ni <wni@...dia.com>
To: Thierry Reding <thierry.reding@...il.com>
CC: Arnd Bergmann <arnd@...db.de>,
Eduardo Valentin <edubezval@...il.com>,
Zhang Rui <rui.zhang@...el.com>,
Stephen Warren <swarren@...dotorg.org>,
Alexandre Courbot <gnurou@...il.com>,
Jon Hunter <jonathanh@...dia.com>, <linux-pm@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal: tegra: mark PM functions __maybe_unused
On 2016年04月19日 20:43, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Tue, Apr 19, 2016 at 10:35:55AM +0800, Wei Ni wrote:
>>
>>
>> On 2016年04月18日 15:15, Thierry Reding wrote:
>>>> Old Signed by an unknown key
>>>
>>> On Sat, Apr 16, 2016 at 10:19:33PM +0200, Arnd Bergmann wrote:
>>>> After the PM support has been added to this driver, we get
>>>> a harmless warning when that support is disabled at compile
>>>> time:
>>>>
>>>> drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function]
>>>> static int soctherm_resume(struct device *dev)
>>>>
>>>> This marks the two PM functions as __maybe_unused to shut up
>>>> the warning. This is preferred over adding an #ifdef around
>>>> them, as it is harder to get wrong, and provides better
>>>> compile-time coverage.
>>>>
>>>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>>>> Fixes: a134b4143b65 ("thermal: tegra: add PM support")
>>>> ---
>>>> drivers/thermal/tegra/soctherm.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> The need for this should go away when Jon's generic power domain series
>>
>> Hi Thierry,
>> Could you please show me the Jon's generic power domain series, so that I can
>> verify it.
>
> Here are the remaining patches from Jon's series:
>
> https://patchwork.ozlabs.org/patch/603285/
> https://patchwork.ozlabs.org/patch/603287/
> https://patchwork.ozlabs.org/patch/603284/
I checked this generic power domain series, it select PM and PM_GENERIC_DOMAINS
for Tegra SoC Family. But the soctherm_suspend/resume callbacks defined by
SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled, so if the
CONFIG_PM_SLEEP is disabled, we still will get this warning.
So to avoid the warning, I think this patch is needed.
Wei.
>
> Thierry
>
> * Unknown Key
> * 0x7F3EB3A1
>
Powered by blists - more mailing lists