stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "watchdog: hpwdt: fix unused variable warning" has been added to the 4.15-stable tree
@ 2018-03-13 10:35 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-13 10:35 UTC (permalink / raw)
  To: arnd, gregkh, jerry.hoemann, linux, wim; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    watchdog: hpwdt: fix unused variable warning

to the 4.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     watchdog-hpwdt-fix-unused-variable-warning.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From aeebc6ba88ba3758ad95467ff6191fabf2074c13 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 6 Dec 2017 22:02:37 +0100
Subject: watchdog: hpwdt: fix unused variable warning

From: Arnd Bergmann <arnd@arndb.de>

commit aeebc6ba88ba3758ad95467ff6191fabf2074c13 upstream.

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>
Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/watchdog/hpwdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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
  */


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.15/watchdog-hpwdt-fix-unused-variable-warning.patch
queue-4.15/dm-bufio-avoid-false-positive-wmaybe-uninitialized-warning.patch
queue-4.15/objtool-fix-another-switch-table-detection-issue.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-13 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 10:35 Patch "watchdog: hpwdt: fix unused variable warning" has been added to the 4.15-stable tree gregkh

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).