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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cyrill Gorcunov
Date: Friday, September 5, 2008 - 6:49 am

[Ingo Molnar - Fri, Sep 05, 2008 at 10:04:47AM +0200]
| 
| * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| 
| > Use a nested level for 'for' cycle and break long lines.
| > For apic_print we should countinue using KERNEL_DEBUG if
| > we have started to.
| 
| > @@ -1521,32 +1521,35 @@ static void __init setup_IO_APIC_irqs(vo
| >  	apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
| >  
| >  	for (apic = 0; apic < nr_ioapics; apic++) {
| > -	for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
| > +		for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
| >  
| > +			idx = find_irq_entry(apic, pin, mp_INT);
| > +			if (idx == -1) {
| 
| hm, i dont really like the super-deep nesting we do here. Could you 
| please split out the iterator into a separate function? That makes the 
| code a lot easier to understand and saves two extra tabs as well for 
| those ugly-looking printk lines.
| 
| 	Ingo
| 

ok Ingo, will take a look, thanks

		- Cyrill -
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 3/3] x86: io-apic - code style cleaning for set ..., Cyrill Gorcunov, (Fri Sep 5, 6:49 am)
Re: [patch 3/3] x86: io-apic - code style cleaning for set ..., Maciej W. Rozycki, (Sat Sep 6, 11:45 am)