kernel/irq/proc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
The recent conversion of show_interrupts() to seq_put_decimal_ull_width()
caused a formatting regression as it drops a previosuly existing space
separator.
Add it back by unconditionally inserting a space after the interrupt
counts and removing the extra leading space from the chip name prints.
Fixes: f9ed1f7c2e26 ("genirq/proc: Use seq_put_decimal_ull_width() for decimal values")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/all/4ce18851-6e9f-bbe-8319-cc5e69fb45c@linux-m68k.org
---
kernel/irq/proc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -501,17 +501,18 @@ int show_interrupts(struct seq_file *p,
seq_put_decimal_ull_width(p, " ", cnt, 10);
}
+ seq_putc(p, ' ');
raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->irq_data.chip) {
if (desc->irq_data.chip->irq_print_chip)
desc->irq_data.chip->irq_print_chip(&desc->irq_data, p);
else if (desc->irq_data.chip->name)
- seq_printf(p, " %8s", desc->irq_data.chip->name);
+ seq_printf(p, "%8s", desc->irq_data.chip->name);
else
- seq_printf(p, " %8s", "-");
+ seq_printf(p, "%8s", "-");
} else {
- seq_printf(p, " %8s", "None");
+ seq_printf(p, "%8s", "None");
}
if (desc->irq_data.domain)
seq_printf(p, " %*lu", prec, desc->irq_data.hwirq);
Hi Thomas,
On Tue, Dec 3, 2024 at 11:40 AM Thomas Gleixner <tglx@linutronix.de> wrote:
> The recent conversion of show_interrupts() to seq_put_decimal_ull_width()
> caused a formatting regression as it drops a previosuly existing space
> separator.
>
> Add it back by unconditionally inserting a space after the interrupt
> counts and removing the extra leading space from the chip name prints.
>
> Fixes: f9ed1f7c2e26 ("genirq/proc: Use seq_put_decimal_ull_width() for decimal values")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/all/4ce18851-6e9f-bbe-8319-cc5e69fb45c@linux-m68k.org
Thanks for your patch!
> --- a/kernel/irq/proc.c
> +++ b/kernel/irq/proc.c
> @@ -501,17 +501,18 @@ int show_interrupts(struct seq_file *p,
>
> seq_put_decimal_ull_width(p, " ", cnt, 10);
> }
> + seq_putc(p, ' ');
>
> raw_spin_lock_irqsave(&desc->lock, flags);
> if (desc->irq_data.chip) {
> if (desc->irq_data.chip->irq_print_chip)
> desc->irq_data.chip->irq_print_chip(&desc->irq_data, p);
You should also remove the leading space from the few .irq_print_chip()
callbacks that print such a space. According to
git grep -lw irq_print_chip | xargs git grep -W "seq_.*\" "
and filterng out the false positives:
arch/powerpc/sysdev/fsl_msi.c: seq_printf(p, " fsl-msi-%d", cascade_virq);
drivers/bus/moxtet.c: seq_printf(p, " moxtet-%s.%i#%i",
mox_module_name(id), pos->idx,
drivers/irqchip/irq-partition-percpu.c: seq_printf(p, " %5s-%lu",
chip->name, data->hwirq);
drivers/soc/qcom/smp2p.c: seq_printf(p, " %8s",
dev_name(entry->smp2p->dev));
> else if (desc->irq_data.chip->name)
> - seq_printf(p, " %8s", desc->irq_data.chip->name);
> + seq_printf(p, "%8s", desc->irq_data.chip->name);
> else
> - seq_printf(p, " %8s", "-");
> + seq_printf(p, "%8s", "-");
> } else {
> - seq_printf(p, " %8s", "None");
> + seq_printf(p, "%8s", "None");
> }
> if (desc->irq_data.domain)
> seq_printf(p, " %*lu", prec, desc->irq_data.hwirq);
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
On Tue, Dec 03 2024 at 12:21, Geert Uytterhoeven wrote:
>
> You should also remove the leading space from the few .irq_print_chip()
> callbacks that print such a space. According to
>
> git grep -lw irq_print_chip | xargs git grep -W "seq_.*\" "
>
> and filterng out the false positives:
>
> arch/powerpc/sysdev/fsl_msi.c: seq_printf(p, " fsl-msi-%d", cascade_virq);
> drivers/bus/moxtet.c: seq_printf(p, " moxtet-%s.%i#%i",
> mox_module_name(id), pos->idx,
> drivers/irqchip/irq-partition-percpu.c: seq_printf(p, " %5s-%lu",
> chip->name, data->hwirq);
> drivers/soc/qcom/smp2p.c: seq_printf(p, " %8s",
> dev_name(entry->smp2p->dev));
Care to send a patch?
Thanks,
tglx
At 2024-12-03 18:40:43, "Thomas Gleixner" <tglx@linutronix.de> wrote:
>The recent conversion of show_interrupts() to seq_put_decimal_ull_width()
>caused a formatting regression as it drops a previosuly existing space
>separator.
>
>Add it back by unconditionally inserting a space after the interrupt
>counts and removing the extra leading space from the chip name prints.
>
>Fixes: f9ed1f7c2e26 ("genirq/proc: Use seq_put_decimal_ull_width() for decimal values")
>Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
>Closes: https://lore.kernel.org/all/4ce18851-6e9f-bbe-8319-cc5e69fb45c@linux-m68k.org
>---
> kernel/irq/proc.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
>--- a/kernel/irq/proc.c
>+++ b/kernel/irq/proc.c
>@@ -501,17 +501,18 @@ int show_interrupts(struct seq_file *p,
>
> seq_put_decimal_ull_width(p, " ", cnt, 10);
> }
>+ seq_putc(p, ' ');
>
> raw_spin_lock_irqsave(&desc->lock, flags);
> if (desc->irq_data.chip) {
> if (desc->irq_data.chip->irq_print_chip)
> desc->irq_data.chip->irq_print_chip(&desc->irq_data, p);
> else if (desc->irq_data.chip->name)
>- seq_printf(p, " %8s", desc->irq_data.chip->name);
>+ seq_printf(p, "%8s", desc->irq_data.chip->name);
> else
>- seq_printf(p, " %8s", "-");
>+ seq_printf(p, "%8s", "-");
> } else {
>- seq_printf(p, " %8s", "None");
>+ seq_printf(p, "%8s", "None");
> }
> if (desc->irq_data.domain)
> seq_printf(p, " %*lu", prec, desc->irq_data.hwirq);
Reviewed-by: David Wang <00107082@163.com>
And again, sorry for the regression...
Thanks
David
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 9d9f204bdf7243bfc2c6a023d63c63f7cbf8ef0b
Gitweb: https://git.kernel.org/tip/9d9f204bdf7243bfc2c6a023d63c63f7cbf8ef0b
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 03 Dec 2024 11:40:43 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 03 Dec 2024 14:59:34 +01:00
genirq/proc: Add missing space separator back
The recent conversion of show_interrupts() to seq_put_decimal_ull_width()
caused a formatting regression as it drops a previosuly existing space
separator.
Add it back by unconditionally inserting a space after the interrupt
counts and removing the extra leading space from the chip name prints.
Fixes: f9ed1f7c2e26 ("genirq/proc: Use seq_put_decimal_ull_width() for decimal values")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: David Wang <00107082@163.com>
Link: https://lore.kernel.org/all/87zfldt5g4.ffs@tglx
Closes: https://lore.kernel.org/all/4ce18851-6e9f-bbe-8319-cc5e69fb45c@linux-m68k.org
---
kernel/irq/proc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index f36c33b..8e29809 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -501,17 +501,18 @@ int show_interrupts(struct seq_file *p, void *v)
seq_put_decimal_ull_width(p, " ", cnt, 10);
}
+ seq_putc(p, ' ');
raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->irq_data.chip) {
if (desc->irq_data.chip->irq_print_chip)
desc->irq_data.chip->irq_print_chip(&desc->irq_data, p);
else if (desc->irq_data.chip->name)
- seq_printf(p, " %8s", desc->irq_data.chip->name);
+ seq_printf(p, "%8s", desc->irq_data.chip->name);
else
- seq_printf(p, " %8s", "-");
+ seq_printf(p, "%8s", "-");
} else {
- seq_printf(p, " %8s", "None");
+ seq_printf(p, "%8s", "None");
}
if (desc->irq_data.domain)
seq_printf(p, " %*lu", prec, desc->irq_data.hwirq);
© 2016 - 2026 Red Hat, Inc.