Re: [patch 08/15] x86/ioapic: Cleanup guarded debug printk()s

Qiuxu Zhuo
2024-08-04T14:46:17Z

> From: Thomas Gleixner <tglx@linutronix.de>
> To: LKML <linux-kernel@vger.kernel.org>
> Cc: x86@kernel.org
> Subject: [patch 08/15] x86/ioapic: Cleanup guarded debug printk()s
>
> Cleanup the APIC printk()s which are inside of a apic verbosity guarded
> region by using apic_dbg() for the KERN_DEBUG level prints.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/x86/kernel/apic/io_apic.c | 67 +++++++++++++++++------------------------
> 1 file changed, 29 insertions(+), 38 deletions(-)
>
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -1186,26 +1186,21 @@ static void io_apic_print_entries(unsign
> char buf[256];
> int i;
>
> - printk(KERN_DEBUG "IOAPIC %d:\n", apic);
> + apic_dbg("IOAPIC %d:\n", apic);
> for (i = 0; i <= nr_entries; i++) {
> entry = ioapic_read_entry(apic, i);
> - snprintf(buf, sizeof(buf),
> - " pin%02x, %s, %s, %s, V(%02X), IRR(%1d), S(%1d)",
> - i,
> - entry.masked ? "disabled" : "enabled ",
> + snprintf(buf, sizeof(buf)," pin%02x, %s, %s, %s, V(%02X), IRR(%1d), S(%1d)",

Need a space after the 2nd ','.

> + i, entry.masked ? "disabled" : "enabled ",
> entry.is_level ? "level" : "edge ",

> [...]

> @@ -1226,19 +1221,15 @@ static void __init print_IO_APIC(int ioa
> reg_03.raw = io_apic_read(ioapic_idx, 3);
> }
>
> [...]
> + apic_dbg(".... register #01: %08X\n", *(int *)&reg_01);
> + apic_dbg("....... : max redirection entries: %02X\n",reg_01.bits.entries);

Need a space after ','.