lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWTSnHnO7wm04TSBKPu+-aAO9JehW6rK5y6D0uBWu+6Pg@mail.gmail.com>
Date: Tue, 10 Dec 2024 16:48:51 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: David Wang <00107082@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Michael Ellerman <mpe@...erman.id.au>, 
	Nicholas Piggin <npiggin@...il.com>, Christophe Leroy <christophe.leroy@...roup.eu>, 
	Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, 
	Marek Behún <kabel@...nel.org>, 
	Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>, 
	linuxppc-dev@...ts.ozlabs.org, linux-arm-msm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] genirq: Remove leading space from .irq_print_chip() callbacks

Hi David,

On Tue, Dec 3, 2024 at 4:34 PM David Wang <00107082@....com> wrote:
> At 2024-12-03 23:02:31, "Geert Uytterhoeven" <geert+renesas@...der.be> wrote:
> >The space separator was factored out from the multiple chip name prints,
> >but several irq_chip.irq_print_chip() callbacks still print a leading
> >space.  Remove the superfluous double spaces.
> >
> >Fixes: 9d9f204bdf7243bf ("genirq/proc: Add missing space separator back")
> >Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

> >--- a/drivers/irqchip/irq-partition-percpu.c
> >+++ b/drivers/irqchip/irq-partition-percpu.c
> >@@ -98,7 +98,7 @@ static void partition_irq_print_chip(struct irq_data *d, struct seq_file *p)
> >       struct irq_chip *chip = irq_desc_get_chip(part->chained_desc);
> >       struct irq_data *data = irq_desc_get_irq_data(part->chained_desc);
> >
> >-      seq_printf(p, " %5s-%lu", chip->name, data->hwirq);
> >+      seq_printf(p, "%5s-%lu", chip->name, data->hwirq);
> > }
> >
> > static struct irq_chip partition_irq_chip = {
> >diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
> >index 4783ab1adb8d953b..a3e88ced328a91f1 100644
> >--- a/drivers/soc/qcom/smp2p.c
> >+++ b/drivers/soc/qcom/smp2p.c
> >@@ -365,7 +365,7 @@ static void smp2p_irq_print_chip(struct irq_data *irqd, struct seq_file *p)
> > {
> >       struct smp2p_entry *entry = irq_data_get_irq_chip_data(irqd);
> >
> >-      seq_printf(p, " %8s", dev_name(entry->smp2p->dev));
> >+      seq_printf(p, "%8s", dev_name(entry->smp2p->dev));
> > }
> >
> > static struct irq_chip smp2p_irq_chip = {
> >--
> >2.34.1
>
> Match with my check result against .irq_print_chip implementation under drivers.
> But I think "%8s" and "%5s-%lu" should be "%s" and "%s-%lu", otherwise there would still
> be leading spaces when the device name string is short.

I believe these are present for alignment of later columns within the
same irqchip.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ