From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: as3722: mark PM functions as __maybe_unused
Date: Mon, 11 Jan 2016 06:21:14 +0000 [thread overview]
Message-ID: <20160111062114.GO3331@x1> (raw)
In-Reply-To: <2162790.qeSmLiztNV@wuerfel>
On Tue, 08 Dec 2015, Arnd Bergmann wrote:
> The newly introduced as3722_i2c_suspend/resume functions are built
> unconditionally, but only used when power management is enabled,
> so we get a warning otherwise:
>
> drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function]
> drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function]
>
> This marks them both as __maybe_unused, which avoids an ugly #ifdef
> and gives us best compile-time coverage. When they are unused, the
> compiler will silently drop the functions from its output.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 35deff7eb212 ("mfd: as3722: Handle interrupts on suspend")
> ---
> drivers/mfd/as3722.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/as3722.c b/drivers/mfd/as3722.c
> index 3b21eb4bc480..e1f597f97f86 100644
> --- a/drivers/mfd/as3722.c
> +++ b/drivers/mfd/as3722.c
> @@ -424,7 +424,7 @@ static int as3722_i2c_remove(struct i2c_client *i2c)
> return 0;
> }
>
> -static int as3722_i2c_suspend(struct device *dev)
> +static int __maybe_unused as3722_i2c_suspend(struct device *dev)
> {
> struct as3722 *as3722 = dev_get_drvdata(dev);
>
> @@ -435,7 +435,7 @@ static int as3722_i2c_suspend(struct device *dev)
> return 0;
> }
>
> -static int as3722_i2c_resume(struct device *dev)
> +static int __maybe_unused as3722_i2c_resume(struct device *dev)
> {
> struct as3722 *as3722 = dev_get_drvdata(dev);
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2016-01-11 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 15:21 [PATCH] mfd: as3722: mark PM functions as __maybe_unused Arnd Bergmann
2016-01-11 6:21 ` Lee Jones [this message]
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=20160111062114.GO3331@x1 \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).