]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: hpwdt: fix unused variable warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Dec 2017 21:02:37 +0000 (22:02 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 21 Mar 2018 03:49:51 +0000 (23:49 -0400)
commit41f9f2536b35b6e70d1f968d83f06b5c2ec87700
tree3da7659d487275e7b6acf5f44673fe71c9279b12
parentad0276f98ccd3021c2031076868d723fa318268c
watchdog: hpwdt: fix unused variable warning

[ Upstream commit aeebc6ba88ba3758ad95467ff6191fabf2074c13 ]

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: Sasha Levin <alexander.levin@microsoft.com>
drivers/watchdog/hpwdt.c