mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Gabriele Mazzotta <gabriele.mzt@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: cmos: avoid unused function warning
Date: Thu, 22 Sep 2016 14:24:25 +0200	[thread overview]
Message-ID: <20160922122425.ovw5kss2h7zh4vsc@piout.net> (raw)
In-Reply-To: <20160922094817.2325831-1-arnd@arndb.de>

On 22/09/2016 at 11:48:00 +0200, Arnd Bergmann wrote :
> A bug fix for the ACPI side of this driver caused a harmless
> build warning:
> 
> drivers/rtc/rtc-cmos.c:1115:13: error: 'cmos_check_acpi_rtc_status' defined but not used [-Werror=unused-function]
>  static void cmos_check_acpi_rtc_status(struct device *dev,
> 
> We can avoid the warning and simplify the driver at the same time
> by removing the #ifdef for CONFIG_PM and rely on the SIMPLE_DEV_PM_OPS()
> to set everything up correctly. cmos_resume() has to get marked
> as __maybe_unused so we don't introduce another warning, and
> the two variants of cmos_poweroff() can get merged into one using
> an IS_ENABLED() check.
> 
> Fixes: 983bf1256edb ("rtc: cmos: Clear ACPI-driven alarms upon resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/rtc/rtc-cmos.c | 21 ++++-----------------
>  1 file changed, 4 insertions(+), 17 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2016-09-22 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  9:48 Arnd Bergmann
2016-09-22 12:24 ` Alexandre Belloni [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=20160922122425.ovw5kss2h7zh4vsc@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gabriele.mzt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.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

all inboxes | Powered by JetHome®