lkml.org 
[lkml]   [2009]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/16] x86/ioapic.c: convert replace_pin_at_irq_node to conventional for() loop
Date
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

Use a conventional for() loop in replace_pin_at_irq_node().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
arch/x86/kernel/apic/io_apic.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 350d99b..b71d2a2 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -512,10 +512,10 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
int oldapic, int oldpin,
int newapic, int newpin)
{
- struct irq_pin_list *entry = cfg->irq_2_pin;
+ struct irq_pin_list *entry;
int replaced = 0;

- while (entry) {
+ for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
if (entry->apic == oldapic && entry->pin == oldpin) {
entry->apic = newapic;
entry->pin = newpin;
@@ -523,7 +523,6 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
/* every one is different, right? */
break;
}
- entry = entry->next;
}

/* why? call replace before add? */
--
1.6.2.2


\
 
 \ /
  Last update: 2009-06-16 22:21    [W:0.090 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site