linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: magn/ak8974: avoid unused function warning
Date: Mon, 29 Aug 2016 15:21:50 +0200	[thread overview]
Message-ID: <CACRpkdbD-=o6CiZLLrEufi1QU+y-598QGDb5cH-VLRgDaeETKg@mail.gmail.com> (raw)
In-Reply-To: <20160826153137.701672-1-arnd@arndb.de>

On Fri, Aug 26, 2016 at 5:31 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The ak8974_configure() function is used only from the PM code,
> but that can be hidden when CONFIG_PM is disabled:
>
> drivers/iio/magnetometer/ak8974.c:201:12: error: 'ak8974_configure' defined but not used [-Werror=unused-function]
>
> This replaces the #ifdef with a __maybe_unused annotation, which
> will work correctly in all configurations and avoid the warning,
> as the compiler can now see where ak8974_configure is called from.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")

Nice catch!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

  reply	other threads:[~2016-08-29 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 15:31 [PATCH] iio: magn/ak8974: avoid unused function warning Arnd Bergmann
2016-08-29 13:21 ` Linus Walleij [this message]
2016-08-29 18:55 ` Jonathan Cameron

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='CACRpkdbD-=o6CiZLLrEufi1QU+y-598QGDb5cH-VLRgDaeETKg@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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).