kernel/watchdog: Fix watchdog_allowed_mask not used warning
PATCH v2 1/1 kernel/watchdog: Fix watchdog_allowed_mask not used warning
Define watchdog_allowed_mask only when SOFTLOCKUP_DETECTOR is enabled.
Fixes 7feeb9cd4f5b ("watchdog/sysctl: Clean up sysctl variable name space")
Cc Thomas Gleixner <[email protected]>
Cc Andrew Morton <[email protected]>
Reviewed-by Petr Mladek <[email protected]>
Signed-off-by Santosh Sivaraj <[email protected]>
---
v2:
Added Petr's reviewed-by from [1] and add fixes tag as suggested by Christophe.
[1]: https://lkml.org/lkml/2020/8/20/1030
kernel/watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/watchdog.c +2 -2
@@ -44,8 +44,6 @@ int __read_mostly soft_watchdog_user_enabled = 1;int __read_mostly watchdog_thresh =10 ;static int __read_mostly nmi_watchdog_available; -static struct cpumask watchdog_allowed_mask__read_mostly ; -struct cpumask watchdog_cpumask__read_mostly ;unsigned long *watchdog_cpumask_bits =cpumask_bits (&watchdog_cpumask);
@@ -162,6 +160,8 @@ static void lockup_detector_update_enable(void)int __read_mostly sysctl_softlockup_all_cpu_backtrace;#endif +static struct cpumask watchdog_allowed_mask__read_mostly ; +/* Global variables, exported for sysctl */ unsigned int __read_mostly softlockup_panic =CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE ;
Signature · 1 line
2.26.2
Le 06/11/2020 à 02:50, Santosh Sivaraj a écrit :
Quoted 7 lines
Define
watchdog_allowed_maskonly whenSOFTLOCKUP_DETECTORis enabled.Fixes 7feeb9cd4f5b ("watchdog/sysctl: Clean up sysctl variable name space")Cc Thomas Gleixner <[email protected]>Cc Andrew Morton <[email protected]>Reviewed-by Petr Mladek <[email protected]>Signed-off-by Santosh Sivaraj <[email protected]>
Reviewed-by Christophe Leroy <[email protected]>
Quoted 32 lines
---
v2:
Added Petr's reviewed-by from [1] and add fixes tag as suggested by Christophe.[1]: https://lkml.org/lkml/2020/8/20/1030
kernel/watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/watchdog.c +2
-2@@ -44,8 +44,6 @@ int __read_mostly soft_watchdog_user_enabled = 1;int __read_mostly watchdog_thresh =10 ;static int __read_mostly nmi_watchdog_available; -static struct cpumask watchdog_allowed_mask__read_mostly ; -struct cpumask watchdog_cpumask__read_mostly ;unsigned long *watchdog_cpumask_bits =cpumask_bits (&watchdog_cpumask);@@ -162,6 +160,8 @@ static void lockup_detector_update_enable(void)int __read_mostly sysctl_softlockup_all_cpu_backtrace;#endif +static struct cpumask watchdog_allowed_mask__read_mostly ; +/* Global variables, exported for sysctl */ unsigned int __read_mostly softlockup_panic =CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE ;