Re: [patch 3/3] x86: io-apic - code style cleaning for setup_IO_APIC_irqs

Cyrill Gorcunov
2008-09-08T04:18:19Z

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

On Mon, Sep 8, 2008 at 4:24 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> On Sat, Sep 6, 2008 at 6:12 AM, Ingo Molnar <mingo@elte.hu> wrote:
>>
>> * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
>>
>>> By changing printout form we are able to shrink code a bit.
>>>
>>> Former printout example:
>>>
>>> init IO_APIC IRQs
>>> IO-APIC (apicid-pin) 1-1, 1-2, 1-3 not connected.
>>> IO-APIC (apicid-pin) 2-1, 2-2, 2-3 not connected.
>>>
>>> New printout example:
>>>
>>> init IO_APIC IRQs
>>> 1-1 1-2 1-3 (apicid-pin) not connected
>>> 2-1 2-2 2-3 (apicid-pin) not connected
>>
>> applied to tip/irq/sparseirq - thanks Cyrill.
>
> got
> 0-16<7> 0-17<7> 0-18<7> 0-19<7> 0-20<7> 0-21<7> 0-22<7> 0-23<7>
> (apicid-pin) not connected
> 1-0<7> 1-1<7> 1-2<7> 1-3<7> 1-4<7> 1-5<7> 1-6<7> 1-7<7> 1-8<7> 1-9<7>
> 1-10<7> 1-11<7> 1-12<7> 1-13<7> 1-14<7> 1-15<7> 1-16<7> 1-17<7>
> 1-18<7> 1-19<7> 1-20<7> 1-21<7> 1-22<7> 1-23<7> (apicid-pin) not
> connected
>
> can you remove the extra <7>?
>
> YH
>

Thanks Yinghai! The patch enveloped.
I'm overzealous with KERN_DEBUG marker. Sorry.
(Can't send it inlined - hope it's not a big problem)

Cyrill

[-- Attachment #2: io-apic.patch --]
[-- Type: application/octet-stream, Size: 1386 bytes --]

From: Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [PATCH] x86: io-apic - do not use KERN_DEBUG marker too much

Do not use KERN_DEBUG several times on the same line being printed.
Introduced by mine previous patch, sorry.

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

--- a/arch/x86/kernel/io_apic.c Mon Sep 08 07:34:16 2008
+++ b/arch/x86/kernel/io_apic.c Mon Sep 08 08:06:30 2008
@@ -1526,11 +1526,16 @@ static void __init setup_IO_APIC_irqs(vo

idx = find_irq_entry(apic, pin, mp_INT);
if (idx == -1) {
- apic_printk(APIC_VERBOSE,
- KERN_DEBUG " %d-%d",
- mp_ioapics[apic].mp_apicid, pin);
- if (!notcon)
+ if (!notcon) {
notcon = 1;
+ apic_printk(APIC_VERBOSE,
+ KERN_DEBUG " %d-%d",
+ mp_ioapics[apic].mp_apicid,
+ pin);
+ } else
+ apic_printk(APIC_VERBOSE, " %d-%d",
+ mp_ioapics[apic].mp_apicid,
+ pin);
continue;
}

@@ -1546,14 +1551,14 @@ static void __init setup_IO_APIC_irqs(vo
}
if (notcon) {
apic_printk(APIC_VERBOSE,
- KERN_DEBUG " (apicid-pin) not connected\n");
+ " (apicid-pin) not connected\n");
notcon = 0;
}
}

if (notcon)
apic_printk(APIC_VERBOSE,
- KERN_DEBUG " (apicid-pin) not connected\n");
+ " (apicid-pin) not connected\n");
}

/*