* [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64
@ 2020-08-14 4:39 Balamuruhan S
2020-08-14 13:13 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Balamuruhan S @ 2020-08-14 4:39 UTC (permalink / raw)
To: mpe; +Cc: ravi.bangoria, naveen.n.rao, linuxppc-dev, sandipan,
Balamuruhan S
In ppc64 config if `CONFIG_SOFTLOCKUP_DETECTOR` is not set then it
warns for unused declaration of `watchdog_allowed_mask` while building,
move the declaration inside ifdef later in the code.
```
kernel/watchdog.c:47:23: warning: ‘watchdog_allowed_mask’ defined but not used [-Wunused-variable]
static struct cpumask watchdog_allowed_mask __read_mostly;
```
Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
---
kernel/watchdog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 5abb5b22ad13..33c9b8a3d51b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -44,7 +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);
@@ -166,6 +165,7 @@ int __read_mostly sysctl_softlockup_all_cpu_backtrace;
unsigned int __read_mostly softlockup_panic =
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE;
+static struct cpumask watchdog_allowed_mask __read_mostly;
static bool softlockup_initialized __read_mostly;
static u64 __read_mostly sample_period;
base-commit: a3a28c4451dff698d0c7ef5a3e80423aa5774e2b
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64
2020-08-14 4:39 [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64 Balamuruhan S
@ 2020-08-14 13:13 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-08-14 13:13 UTC (permalink / raw)
To: Balamuruhan S
Cc: ravi.bangoria, naveen.n.rao, linuxppc-dev, sandipan,
Balamuruhan S
Balamuruhan S <bala24@linux.ibm.com> writes:
> In ppc64 config if `CONFIG_SOFTLOCKUP_DETECTOR` is not set then it
> warns for unused declaration of `watchdog_allowed_mask` while building,
> move the declaration inside ifdef later in the code.
>
> ```
> kernel/watchdog.c:47:23: warning: ‘watchdog_allowed_mask’ defined but not used [-Wunused-variable]
> static struct cpumask watchdog_allowed_mask __read_mostly;
> ```
>
> Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
> ---
> kernel/watchdog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I don't maintain that file.
Please resend and Cc it to:
$ ./scripts/get_maintainer.pl -f kernel/watchdog.c
tglx@linutronix.de
peterz@infradead.org
Jisheng.Zhang@synaptics.com
rdna@fb.com
viro@zeniv.linux.org.uk
gpiccoli@canonical.com
pmladek@suse.com
linux-kernel@vger.kernel.org
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64
@ 2020-08-14 13:33 Balamuruhan S
2020-08-20 11:30 ` Petr Mladek
0 siblings, 1 reply; 4+ messages in thread
From: Balamuruhan S @ 2020-08-14 13:33 UTC (permalink / raw)
To: linux-kernel
Cc: pmladek, ravi.bangoria, peterz, gpiccoli, rdna, Balamuruhan S,
Jisheng.Zhang, viro, tglx, linuxppc-dev, naveen.n.rao, sandipan
In ppc64 config if `CONFIG_SOFTLOCKUP_DETECTOR` is not set then it
warns for unused declaration of `watchdog_allowed_mask` while building,
move the declaration inside ifdef later in the code.
```
kernel/watchdog.c:47:23: warning: ‘watchdog_allowed_mask’ defined but not used [-Wunused-variable]
static struct cpumask watchdog_allowed_mask __read_mostly;
```
Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
---
kernel/watchdog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 5abb5b22ad13..33c9b8a3d51b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -44,7 +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);
@@ -166,6 +165,7 @@ int __read_mostly sysctl_softlockup_all_cpu_backtrace;
unsigned int __read_mostly softlockup_panic =
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE;
+static struct cpumask watchdog_allowed_mask __read_mostly;
static bool softlockup_initialized __read_mostly;
static u64 __read_mostly sample_period;
base-commit: a3a28c4451dff698d0c7ef5a3e80423aa5774e2b
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64
2020-08-14 13:33 Balamuruhan S
@ 2020-08-20 11:30 ` Petr Mladek
0 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2020-08-20 11:30 UTC (permalink / raw)
To: Balamuruhan S
Cc: ravi.bangoria, peterz, gpiccoli, linux-kernel, rdna,
Jisheng.Zhang, viro, tglx, linuxppc-dev, naveen.n.rao, sandipan
On Fri 2020-08-14 19:03:30, Balamuruhan S wrote:
> In ppc64 config if `CONFIG_SOFTLOCKUP_DETECTOR` is not set then it
> warns for unused declaration of `watchdog_allowed_mask` while building,
> move the declaration inside ifdef later in the code.
>
> ```
> kernel/watchdog.c:47:23: warning: ‘watchdog_allowed_mask’ defined but not used [-Wunused-variable]
> static struct cpumask watchdog_allowed_mask __read_mostly;
> ```
>
> Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
> ---
> kernel/watchdog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 5abb5b22ad13..33c9b8a3d51b 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -44,7 +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);
> @@ -166,6 +165,7 @@ int __read_mostly sysctl_softlockup_all_cpu_backtrace;
> unsigned int __read_mostly softlockup_panic =
> CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE;
>
> +static struct cpumask watchdog_allowed_mask __read_mostly;
I could confirm that the variable is used only in code that is built
when CONFIG_SOFTLOCKUP_DETECTOR is enabled.
Note that the problem can't be seen on x86. There the softlockup
detector is enforced together with hardloclup detector via
via HARDLOCKUP_DETECTOR_PERF.
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-20 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 4:39 [PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64 Balamuruhan S
2020-08-14 13:13 ` Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2020-08-14 13:33 Balamuruhan S
2020-08-20 11:30 ` Petr Mladek
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).