diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-12-07 00:02:37 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2017-12-28 22:45:55 +0300 |
commit | aeebc6ba88ba3758ad95467ff6191fabf2074c13 (patch) | |
tree | 1583e01d0bd697768f4df43842fedd3b75aa7e49 /drivers/watchdog | |
parent | 13983959e804691b09322c2c8d71cd94f365655f (diff) | |
download | linux-aeebc6ba88ba3758ad95467ff6191fabf2074c13.tar.xz |
watchdog: hpwdt: fix unused variable warning
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>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |