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] [thread-next>] [day] [month] [year] [list]
Message-ID: <875xo9zyeq.ffs@tglx>
Date: Tue, 26 Nov 2024 18:40:29 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: David Wang <00107082@....com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, linux-kernel@...r.kernel.org,
 linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 01/13] kernel/irq/proc: use seq_put_decimal_ull_width()
 for decimal values

On Wed, Nov 20 2024 at 12:24, David Wang wrote:
> At 2024-11-20 09:20:59, "Thomas Gleixner" <tglx@...utronix.de> wrote:
>>diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
>>index f36c33bd2da4..9b715ce8cf2e 100644
>>--- a/kernel/irq/proc.c
>>+++ b/kernel/irq/proc.c
>>@@ -501,6 +501,7 @@ 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) {
>
> On second thought,   considering other paths have already had a leading space, 
> maybe it is more clean to just add a leading space before irq_print_chip:
>
>         raw_spin_lock_irqsave(&desc->lock, flags);
>         if (desc->irq_data.chip) {
> -               if (desc->irq_data.chip->irq_print_chip)
> +               if (desc->irq_data.chip->irq_print_chip) {
> +                       seq_putc(p, ' ');
>                         desc->irq_data.chip->irq_print_chip(&desc->irq_data, p);
> -               else if (desc->irq_data.chip->name)
> +               } else if (desc->irq_data.chip->name)
>                         seq_printf(p, " %8s", desc->irq_data.chip->name);
>                 else
>                         seq_printf(p, " %8s", "-");

I rather keep the seq_putc() and remove the trailing space from the
other prints.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ