linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@codeaurora.org>
To: Arnd Bergmann <arnd@arndb.de>, Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>, Lina Iyer <lina.iyer@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal: qcom: tsens-8916: mark PM functions __maybe_unused
Date: Tue, 05 Jul 2016 08:07:24 +0530	[thread overview]
Message-ID: <577B1D64.2020509@codeaurora.org> (raw)
In-Reply-To: <20160704131318.990672-1-arnd@arndb.de>


On 07/04/2016 06:42 PM, Arnd Bergmann wrote:
> The newly added tsens-8916 driver produces warnings when CONFIG_PM
> is disabled:
> 
> drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function]
>  static int tsens_resume(struct device *dev)
>             ^~~~~~~~~~~~
> drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function]
>  static int tsens_suspend(struct device *dev)
>             ^~~~~~~~~~~~~
> 
> This marks both functions __maybe_unused to let the compiler
> know that they might be used in other configurations, without
> adding ugly #ifdef logic.

Thanks Arnd,
Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>

> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/thermal/qcom/tsens.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 446f70b5dbb2..e4fca3350d26 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -40,7 +40,7 @@ static int tsens_get_trend(void *p, int trip, enum thermal_trend *trend)
>  	return -ENOTSUPP;
>  }
>  
> -static int tsens_suspend(struct device *dev)
> +static int  __maybe_unused tsens_suspend(struct device *dev)
>  {
>  	struct tsens_device *tmdev = dev_get_drvdata(dev);
>  
> @@ -50,7 +50,7 @@ static int tsens_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int tsens_resume(struct device *dev)
> +static int __maybe_unused  tsens_resume(struct device *dev)
>  {
>  	struct tsens_device *tmdev = dev_get_drvdata(dev);
>  
> 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2016-07-05  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 13:12 [PATCH] thermal: qcom: tsens-8916: mark PM functions __maybe_unused Arnd Bergmann
2016-07-05  2:37 ` Rajendra Nayak [this message]
2016-08-19 12:44 ` Zhang Rui

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=577B1D64.2020509@codeaurora.org \
    --to=rnayak@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=edubezval@gmail.com \
    --cc=lina.iyer@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).