Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7bcbc78dea92fdf0947fa48e248da3c993a5690f
Commit:     7bcbc78dea92fdf0947fa48e248da3c993a5690f
Parent:     3b095a04e71243bd0f1679c04f1e8d73a3c9c5a9
Author:     Neil Horman <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:31:26 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:31:26 2008 +0100

    x86: clean up arch/x86/kernel/early-quirks.c
    
    clean up checkpatch errors. No code changed.
    
          text    data     bss     dec     hex filename
           705     120       0     825     339 early-quirks.o.before
           705     120       0     825     339 early-quirks.o.after
    
    Signed-off-by: Neil Horman <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/early-quirks.c |   91 ++++++++++++++++++++-------------------
 1 files changed, 47 insertions(+), 44 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index b55258e..3f88e43 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -32,10 +32,13 @@ static void __init fix_hypertransport_config(int num, int 
slot, int func)
         */
        htcfg = read_pci_config(num, slot, func, 0x68);
        if (htcfg & (1 << 18)) {
-               printk(KERN_INFO "Detected use of extended apic ids on 
hypertransport bus\n");
+               printk(KERN_INFO "Detected use of extended apic ids "
+                                "on hypertransport bus\n");
                if ((htcfg & (1 << 17)) == 0) {
-                       printk(KERN_INFO "Enabling hypertransport extended apic 
interrupt broadcast\n");
-                       printk(KERN_INFO "Note this is a bios bug, please 
contact your hw vendor\n");
+                       printk(KERN_INFO "Enabling hypertransport extended "
+                                        "apic interrupt broadcast\n");
+                       printk(KERN_INFO "Note this is a bios bug, "
+                                        "please contact your hw vendor\n");
                        htcfg |= (1 << 17);
                        write_pci_config(num, slot, func, 0x68, htcfg);
                }
@@ -130,6 +133,43 @@ static struct chipset early_qrk[] __initdata = {
        {}
 };
 
+static void check_dev_quirk(int num, int slot, int func)
+{
+       u16 class;
+       u16 vendor;
+       u16 device;
+       u8 type;
+       int i;
+
+       class = read_pci_config_16(num, slot, func, PCI_CLASS_DEVICE);
+
+       if (class == 0xffff)
+               return;
+
+       vendor = read_pci_config_16(num, slot, func, PCI_VENDOR_ID);
+
+       device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
+
+       for (i = 0; early_qrk[i].f != NULL; i++) {
+               if (((early_qrk[i].vendor == PCI_ANY_ID) ||
+                       (early_qrk[i].vendor == vendor)) &&
+                       ((early_qrk[i].device == PCI_ANY_ID) ||
+                       (early_qrk[i].device == device)) &&
+                       (!((early_qrk[i].class ^ class) &
+                           early_qrk[i].class_mask))) {
+                               if ((early_qrk[i].flags &
+                                    QFLAG_DONE) != QFLAG_DONE)
+                                       early_qrk[i].f(num, slot, func);
+                               early_qrk[i].flags |= QFLAG_APPLIED;
+                       }
+       }
+
+       type = read_pci_config_byte(num, slot, func,
+                                   PCI_HEADER_TYPE);
+       if (!(type & 0x80))
+               return;
+}
+
 void __init early_quirks(void)
 {
        int num, slot, func;
@@ -138,45 +178,8 @@ void __init early_quirks(void)
                return;
 
        /* Poor man's PCI discovery */
-       for (num = 0; num < 32; num++) {
-               for (slot = 0; slot < 32; slot++) {
-                       for (func = 0; func < 8; func++) {
-                               u16 class;
-                               u16 vendor;
-                               u16 device;
-                               u8 type;
-                               int i;
-
-                               class = read_pci_config_16(num,slot,func,
-                                                       PCI_CLASS_REVISION);
-                               if (class == 0xffff)
-                                       break;
-
-                               vendor = read_pci_config_16(num, slot, func,
-                                                        PCI_VENDOR_ID);
-
-                               device = read_pci_config_16(num, slot, func,
-                                                       PCI_DEVICE_ID);
-
-                               for(i=0;early_qrk[i].f != NULL;i++) {
-                                       if (((early_qrk[i].vendor == 
PCI_ANY_ID) ||
-                                           (early_qrk[i].vendor == vendor)) &&
-                                          ((early_qrk[i].device == PCI_ANY_ID) 
||
-                                           (early_qrk[i].device == device)) &&
-                                          (!((early_qrk[i].class ^ class) &
-                                            early_qrk[i].class_mask))) {
-                                               if ((early_qrk[i].flags & 
QFLAG_DONE) != QFLAG_DONE)
-                                                       early_qrk[i].f(num, 
slot, func);
-                                               early_qrk[i].flags |= 
QFLAG_APPLIED;
-
-                                       }
-                               }
-
-                               type = read_pci_config_byte(num, slot, func,
-                                                           PCI_HEADER_TYPE);
-                               if (!(type & 0x80))
-                                       break;
-                       }
-               }
-       }
+       for (num = 0; num < 32; num++)
+               for (slot = 0; slot < 32; slot++)
+                       for (func = 0; func < 8; func++)
+                               check_dev_quirk(num, slot, func);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to