All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Ni <wni@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal: tegra: mark PM functions __maybe_unused
Date: Wed, 20 Apr 2016 14:44:22 +0800	[thread overview]
Message-ID: <57172546.6090106@nvidia.com> (raw)
In-Reply-To: <20160419124319.GG8284@ulmo.ba.sec>



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@arndb.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
> 

WARNING: multiple messages have this Message-ID (diff)
From: Wei Ni <wni@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>, <linux-pm@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] thermal: tegra: mark PM functions __maybe_unused
Date: Wed, 20 Apr 2016 14:44:22 +0800	[thread overview]
Message-ID: <57172546.6090106@nvidia.com> (raw)
In-Reply-To: <20160419124319.GG8284@ulmo.ba.sec>



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@arndb.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
> 

  reply	other threads:[~2016-04-20  6:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16 20:19 [PATCH] thermal: tegra: mark PM functions __maybe_unused Arnd Bergmann
2016-04-16 20:19 ` Arnd Bergmann
2016-04-18  7:15 ` Thierry Reding
     [not found]   ` <20160418071513.GA13078-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-19  2:35     ` Wei Ni
2016-04-19  2:35       ` Wei Ni
2016-04-19 12:43       ` Thierry Reding
2016-04-20  6:44         ` Wei Ni [this message]
2016-04-20  6:44           ` Wei Ni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57172546.6090106@nvidia.com \
    --to=wni@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=edubezval@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.