summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-12-06 22:02:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-18 11:18:52 +0100
commit6cda76dc3f86d5dc6839cd894a9465a13eb91501 (patch)
tree9a69ef8d6c0e3544d217c891ae7e2ecd74f06b95 /drivers/watchdog
parentc387231337fbc4633bd7f42fca8d05e9ee5c18a8 (diff)
watchdog: hpwdt: fix unused variable warning
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>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/hpwdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 9a001c14819a..7f6cb3a93c54 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
*/