From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jimmy Vance <jimmy.vance@hpe.com>,
Wim Van Sebroeck <wim@iguana.be>,
Guenter Roeck <linux@roeck-us.net>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: hpwdt: fix unused variable warning
Date: Wed, 6 Dec 2017 15:53:56 -0700 [thread overview]
Message-ID: <20171206225356.GC17031@anatevka.americas.hpqcorp.net> (raw)
In-Reply-To: <20171206210250.1222757-1-arnd@arndb.de>
On Wed, Dec 06, 2017 at 10:02:37PM +0100, Arnd Bergmann wrote:
> The new hpwdt_my_nmi() function is used conditionally, which produces
> a harmless warning in some configurations:
>
> drivers/watchdog/hpwdt.c:478:12: error: 'hpwdt_my_nmi' defined but not used [-Werror=unused-function]
>
> This moves it inside of the #ifdef that protects its caller, to silence
> the warning.
>
> Fixes: 621174a92851 ("watchdog: hpwdt: Check source of NMI")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/watchdog/hpwdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index e61658310381..f1f00dfc0e68 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -475,12 +475,12 @@ static int hpwdt_time_left(void)
> return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
> }
>
> +#ifdef CONFIG_HPWDT_NMI_DECODING
> static int hpwdt_my_nmi(void)
> {
> return ioread8(hpwdt_nmistat) & 0x6;
> }
>
> -#ifdef CONFIG_HPWDT_NMI_DECODING
> /*
> * NMI Handler
> */
> --
> 2.9.0
>
Looks fine. Thanks!
Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com>
--
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------
next prev parent reply other threads:[~2017-12-06 22:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 21:02 Arnd Bergmann
2017-12-06 22:53 ` Jerry Hoemann [this message]
2017-12-07 4:36 ` Guenter Roeck
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=20171206225356.GC17031@anatevka.americas.hpqcorp.net \
--to=jerry.hoemann@hpe.com \
--cc=arnd@arndb.de \
--cc=jimmy.vance@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/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®