* [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts()
@ 2020-12-15 10:30 Geert Uytterhoeven
2020-12-25 7:05 ` Zenghui Yu
2021-01-04 11:49 ` Catalin Marinas
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-12-15 10:30 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier, Catalin Marinas, Will Deacon
Cc: Gavin Shan, linux-arm-kernel, linux-kernel, Geert Uytterhoeven
arch/arm64/kernel/smp.c: In function ‘arch_show_interrupts’:
arch/arm64/kernel/smp.c:808:16: warning: unused variable ‘irq’ [-Wunused-variable]
808 | unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
| ^~~
The removal of the last user forgot to remove the variable.
Fixes: 2f516e34383d0e97 ("arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
One more issue in irq-core-2020-12-14.
arch/arm64/kernel/smp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 3aef3bc22d3250b5..10b39328268687e3 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -805,7 +805,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
unsigned int cpu, i;
for (i = 0; i < NR_IPI; i++) {
- unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
prec >= 4 ? " " : "");
for_each_online_cpu(cpu)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts()
2020-12-15 10:30 [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts() Geert Uytterhoeven
@ 2020-12-25 7:05 ` Zenghui Yu
2021-01-26 10:06 ` Geert Uytterhoeven
2021-01-04 11:49 ` Catalin Marinas
1 sibling, 1 reply; 4+ messages in thread
From: Zenghui Yu @ 2020-12-25 7:05 UTC (permalink / raw)
To: Geert Uytterhoeven, Thomas Gleixner, Marc Zyngier,
Catalin Marinas, Will Deacon
Cc: Gavin Shan, linux-kernel, linux-arm-kernel, wanghaibin.wang
On 2020/12/15 18:30, Geert Uytterhoeven wrote:
> arch/arm64/kernel/smp.c: In function ‘arch_show_interrupts’:
> arch/arm64/kernel/smp.c:808:16: warning: unused variable ‘irq’ [-Wunused-variable]
> 808 | unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
> | ^~~
>
> The removal of the last user forgot to remove the variable.
>
> Fixes: 2f516e34383d0e97 ("arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()")
This is in mainline now and the commit id is 5089bc51f81f.
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> One more issue in irq-core-2020-12-14.
>
> arch/arm64/kernel/smp.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 3aef3bc22d3250b5..10b39328268687e3 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -805,7 +805,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
> unsigned int cpu, i;
>
> for (i = 0; i < NR_IPI; i++) {
> - unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
> seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
> prec >= 4 ? " " : "");
> for_each_online_cpu(cpu)
And I guess we have the same problem on 32-bit ARM. 'irq' in
show_ipi_list() is no longer used since commit 88c637748e31
("ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list()").
Thanks,
Zenghui
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts()
2020-12-15 10:30 [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts() Geert Uytterhoeven
2020-12-25 7:05 ` Zenghui Yu
@ 2021-01-04 11:49 ` Catalin Marinas
1 sibling, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2021-01-04 11:49 UTC (permalink / raw)
To: Marc Zyngier, Will Deacon, Geert Uytterhoeven, Thomas Gleixner
Cc: linux-arm-kernel, linux-kernel, Gavin Shan
On Tue, 15 Dec 2020 11:30:26 +0100, Geert Uytterhoeven wrote:
> arch/arm64/kernel/smp.c: In function ‘arch_show_interrupts’:
> arch/arm64/kernel/smp.c:808:16: warning: unused variable ‘irq’ [-Wunused-variable]
> 808 | unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
> | ^~~
>
> The removal of the last user forgot to remove the variable.
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64/smp: Remove unused irq variable in arch_show_interrupts()
https://git.kernel.org/arm64/c/42e85f90171a
Also adjusted the Fixes tag (before seeing that you posted a v2).
--
Catalin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts()
2020-12-25 7:05 ` Zenghui Yu
@ 2021-01-26 10:06 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-01-26 10:06 UTC (permalink / raw)
To: Zenghui Yu
Cc: Thomas Gleixner, Marc Zyngier, Catalin Marinas, Will Deacon,
Gavin Shan, Linux Kernel Mailing List, Linux ARM,
wanghaibin.wang
Hi Zenghui,
On Fri, Dec 25, 2020 at 8:05 AM Zenghui Yu <yuzenghui@huawei.com> wrote:
> On 2020/12/15 18:30, Geert Uytterhoeven wrote:
> > arch/arm64/kernel/smp.c: In function ‘arch_show_interrupts’:
> > arch/arm64/kernel/smp.c:808:16: warning: unused variable ‘irq’ [-Wunused-variable]
> > 808 | unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
> > | ^~~
> >
> > The removal of the last user forgot to remove the variable.
> >
> > Fixes: 2f516e34383d0e97 ("arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()")
>
> This is in mainline now and the commit id is 5089bc51f81f.
>
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > One more issue in irq-core-2020-12-14.
> >
> > arch/arm64/kernel/smp.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> > index 3aef3bc22d3250b5..10b39328268687e3 100644
> > --- a/arch/arm64/kernel/smp.c
> > +++ b/arch/arm64/kernel/smp.c
> > @@ -805,7 +805,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
> > unsigned int cpu, i;
> >
> > for (i = 0; i < NR_IPI; i++) {
> > - unsigned int irq = irq_desc_get_irq(ipi_desc[i]);
> > seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
> > prec >= 4 ? " " : "");
> > for_each_online_cpu(cpu)
>
> And I guess we have the same problem on 32-bit ARM. 'irq' in
> show_ipi_list() is no longer used since commit 88c637748e31
> ("ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list()").
Indeed. I didn't see it with my compiler version, but Wolfram did, and
sent a patch:
https://lore.kernel.org/linux-arm-kernel/20201228120147.59387-1-wsa+renesas@sang-engineering.com/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-26 11:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 10:30 [PATCH] arm64/smp: Remove unused irq variable in arch_show_interrupts() Geert Uytterhoeven
2020-12-25 7:05 ` Zenghui Yu
2021-01-26 10:06 ` Geert Uytterhoeven
2021-01-04 11:49 ` Catalin Marinas
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).