diff for duplicates of <20130926021130.GD13318@ZenIV.linux.org.uk> diff --git a/a/1.txt b/N1/1.txt index ce610bf..7b97b64 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -20,7 +20,7 @@ breaks. Let's experiment... Aha. In drivers/pci/hotplug/ibmphp_pci.c, <avert your eyes if you've got a weak stomach> -=================================== +====================================================================== int ibmphp_configure_card (struct pci_func *func, u8 slotno) { u16 vendor_id; @@ -65,7 +65,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) ++valid_device; /* header: x x x x x x x x - * | |___________|=> 1=PPB bridge, 0=normal device, 2ÊrdBus Bridge + * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge * |_=> 0 = single function device, 1 = multi-function device */ @@ -75,11 +75,11 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) class_code = class >> 24; debug ("hrd_type = %x, class = %x, class_code %x\n", hdr_type, class, class_code); class >>= 8; /* to take revision out, class = class.subclass.prog i/f */ - if (class = PCI_CLASS_NOT_DEFINED_VGA) { + if (class == PCI_CLASS_NOT_DEFINED_VGA) { err ("The device %x is VGA compatible and as is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; - } else if (class = PCI_CLASS_DISPLAY_VGA) { + } else if (class == PCI_CLASS_DISPLAY_VGA) { err ("The device %x is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; @@ -128,7 +128,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) } assign_alt_irq (cur_func, class_code); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -199,7 +199,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) debug ("cur_func->busno b4 configure_bridge is %x\n", cur_func->busno); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -280,7 +280,7 @@ error: } return rc; } -=================================== +====================================================================== Note the lovely comments /* end of for */ et.al. - nice to see that somebody understood that keeping track of that nesting might be not quite trivial. @@ -300,7 +300,7 @@ form The same cure, of course... Oh, and switch with long cases definitely should not be indented that way. With all that dealt with, we get still overindented and hard to read -=================================== +====================================================================== int ibmphp_configure_card (struct pci_func *func, u8 slotno) { u16 vendor_id; @@ -338,7 +338,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) pci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); debug ("vendor_id is %x\n", vendor_id); - if (vendor_id = PCI_VENDOR_ID_NOTVALID) + if (vendor_id == PCI_VENDOR_ID_NOTVALID) continue; /* found correct device!!! */ @@ -347,7 +347,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) ++valid_device; /* header: x x x x x x x x - * | |___________|=> 1=PPB bridge, 0=normal device, 2ÊrdBus Bridge + * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge * |_=> 0 = single function device, 1 = multi-function device */ @@ -357,11 +357,11 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) class_code = class >> 24; debug ("hrd_type = %x, class = %x, class_code %x\n", hdr_type, class, class_code); class >>= 8; /* to take revision out, class = class.subclass.prog i/f */ - if (class = PCI_CLASS_NOT_DEFINED_VGA) { + if (class == PCI_CLASS_NOT_DEFINED_VGA) { err ("The device %x is VGA compatible and as is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; - } else if (class = PCI_CLASS_DISPLAY_VGA) { + } else if (class == PCI_CLASS_DISPLAY_VGA) { err ("The device %x is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; @@ -410,7 +410,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) } assign_alt_irq (cur_func, class_code); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -481,7 +481,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) debug ("cur_func->busno b4 configure_bridge is %x\n", cur_func->busno); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -561,7 +561,7 @@ error: } return rc; } -=================================== +====================================================================== What's really deeply indented here? Right, if (flag) { @@ -621,7 +621,7 @@ have to report it to caller, but that's not hard to do. Separate story, anyway. OK, with aforementioned bug fixed that becomes -=================================== +====================================================================== static void append(struct pci_func *head, struct pci_func *new) { while (head->next) @@ -665,7 +665,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) pci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); debug ("vendor_id is %x\n", vendor_id); - if (vendor_id = PCI_VENDOR_ID_NOTVALID) + if (vendor_id == PCI_VENDOR_ID_NOTVALID) continue; /* found correct device!!! */ @@ -674,7 +674,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) ++valid_device; /* header: x x x x x x x x - * | |___________|=> 1=PPB bridge, 0=normal device, 2ÊrdBus Bridge + * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge * |_=> 0 = single function device, 1 = multi-function device */ @@ -684,11 +684,11 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) class_code = class >> 24; debug ("hrd_type = %x, class = %x, class_code %x\n", hdr_type, class, class_code); class >>= 8; /* to take revision out, class = class.subclass.prog i/f */ - if (class = PCI_CLASS_NOT_DEFINED_VGA) { + if (class == PCI_CLASS_NOT_DEFINED_VGA) { err ("The device %x is VGA compatible and as is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; - } else if (class = PCI_CLASS_DISPLAY_VGA) { + } else if (class == PCI_CLASS_DISPLAY_VGA) { err ("The device %x is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; @@ -737,7 +737,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) } assign_alt_irq (cur_func, class_code); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -801,7 +801,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) debug ("cur_func->busno b4 configure_bridge is %x\n", cur_func->busno); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -875,7 +875,7 @@ error: } return rc; } -=================================== +====================================================================== Now, a look at the places where we are appending suggests that it might be worth folding kzalloc + setting busno/device/irq into append(), making @@ -887,7 +887,7 @@ looked where it gets us). I think that my point is made, though - deeply nested code is a very good predictor of shitty code. Not guaranteed, of course, but as a Bayesian filter it works very well. -=================================== +====================================================================== static struct pci_func *append(struct pci_func *head, u8 busno, u8 device) { struct pci_func *new = kzalloc(sizeof(*new), GFP_KERNEL); @@ -942,7 +942,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) pci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); debug ("vendor_id is %x\n", vendor_id); - if (vendor_id = PCI_VENDOR_ID_NOTVALID) + if (vendor_id == PCI_VENDOR_ID_NOTVALID) continue; /* found correct device!!! */ @@ -951,7 +951,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) ++valid_device; /* header: x x x x x x x x - * | |___________|=> 1=PPB bridge, 0=normal device, 2ÊrdBus Bridge + * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge * |_=> 0 = single function device, 1 = multi-function device */ @@ -961,11 +961,11 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) class_code = class >> 24; debug ("hrd_type = %x, class = %x, class_code %x\n", hdr_type, class, class_code); class >>= 8; /* to take revision out, class = class.subclass.prog i/f */ - if (class = PCI_CLASS_NOT_DEFINED_VGA) { + if (class == PCI_CLASS_NOT_DEFINED_VGA) { err ("The device %x is VGA compatible and as is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; - } else if (class = PCI_CLASS_DISPLAY_VGA) { + } else if (class == PCI_CLASS_DISPLAY_VGA) { err ("The device %x is not supported for hot plugging. " "Please choose another device.\n", cur_func->device); return -ENODEV; @@ -1006,7 +1006,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) } assign_alt_irq (cur_func, class_code); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -1053,7 +1053,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno) debug ("cur_func->busno b4 configure_bridge is %x\n", cur_func->busno); rc = configure_bridge (&cur_func, slotno); - if (rc = -ENODEV) { + if (rc == -ENODEV) { err ("You chose to insert Single Bridge, or nested bridges, this is not supported...\n"); err ("Bus %x, devfunc %x\n", cur_func->busno, cur_func->device); return rc; @@ -1119,7 +1119,3 @@ error: } return rc; } --- -To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 0afe1a1..d9a5e76 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -6,7 +6,7 @@ "ref\052420DF1.7060108@ahsoftware.de\0" "From\0Al Viro <viro@zeniv.linux.org.uk>\0" "Subject\0Re: checkpatch guide for newbies\0" - "Date\0Thu, 26 Sep 2013 02:11:30 +0000\0" + "Date\0Thu, 26 Sep 2013 03:11:30 +0100\0" "To\0Alexander Holler <holler@ahsoftware.de>\0" "Cc\0Bjorn Helgaas <bhelgaas@google.com>" Peter Senna Tschudin <peter.senna@gmail.com> @@ -37,7 +37,7 @@ "\n" "<avert your eyes if you've got a weak stomach>\n" "\n" - "===================================\n" + "======================================================================\n" "int ibmphp_configure_card (struct pci_func *func, u8 slotno)\n" "{\n" "\tu16 vendor_id;\n" @@ -82,7 +82,7 @@ "\t\t\t++valid_device;\n" "\n" "\t\t\t/* header: x x x x x x x x\n" - "\t\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2\303\212rdBus Bridge\n" + "\t\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge\n" "\t\t\t * |_=> 0 = single function device, 1 = multi-function device\n" "\t\t\t */\n" "\n" @@ -92,11 +92,11 @@ "\t\t\tclass_code = class >> 24;\n" "\t\t\tdebug (\"hrd_type = %x, class = %x, class_code %x\\n\", hdr_type, class, class_code);\n" "\t\t\tclass >>= 8;\t/* to take revision out, class = class.subclass.prog i/f */\n" - "\t\t\tif (class = PCI_CLASS_NOT_DEFINED_VGA) {\n" + "\t\t\tif (class == PCI_CLASS_NOT_DEFINED_VGA) {\n" "\t\t\t\terr (\"The device %x is VGA compatible and as is not supported for hot plugging. \"\n" "\t\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\t\treturn -ENODEV;\n" - "\t\t\t} else if (class = PCI_CLASS_DISPLAY_VGA) {\n" + "\t\t\t} else if (class == PCI_CLASS_DISPLAY_VGA) {\n" "\t\t\t\terr (\"The device %x is not supported for hot plugging. \"\n" "\t\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\t\treturn -ENODEV;\n" @@ -145,7 +145,7 @@ "\t\t\t\t\t}\n" "\t\t\t\t\tassign_alt_irq (cur_func, class_code);\n" "\t\t\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\t\t\tif (rc = -ENODEV) {\n" + "\t\t\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\t\t\treturn rc;\n" @@ -216,7 +216,7 @@ "\n" "\t\t\t\t\tdebug (\"cur_func->busno b4 configure_bridge is %x\\n\", cur_func->busno);\n" "\t\t\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\t\t\tif (rc = -ENODEV) {\n" + "\t\t\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\t\t\treturn rc;\n" @@ -297,7 +297,7 @@ "\t}\n" "\treturn rc;\n" "}\n" - "===================================\n" + "======================================================================\n" "\n" "Note the lovely comments /* end of for */ et.al. - nice to see that somebody\n" "understood that keeping track of that nesting might be not quite trivial.\n" @@ -317,7 +317,7 @@ "The same cure, of course... Oh, and switch with long cases definitely\n" "should not be indented that way. With all that dealt with, we get\n" "still overindented and hard to read\n" - "===================================\n" + "======================================================================\n" "int ibmphp_configure_card (struct pci_func *func, u8 slotno)\n" "{\n" "\tu16 vendor_id;\n" @@ -355,7 +355,7 @@ "\t\tpci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id);\n" "\n" "\t\tdebug (\"vendor_id is %x\\n\", vendor_id);\n" - "\t\tif (vendor_id = PCI_VENDOR_ID_NOTVALID)\n" + "\t\tif (vendor_id == PCI_VENDOR_ID_NOTVALID)\n" "\t\t\tcontinue;\n" "\n" "\t\t/* found correct device!!! */\n" @@ -364,7 +364,7 @@ "\t\t++valid_device;\n" "\n" "\t\t/* header: x x x x x x x x\n" - "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2\303\212rdBus Bridge\n" + "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge\n" "\t\t * |_=> 0 = single function device, 1 = multi-function device\n" "\t\t */\n" "\n" @@ -374,11 +374,11 @@ "\t\tclass_code = class >> 24;\n" "\t\tdebug (\"hrd_type = %x, class = %x, class_code %x\\n\", hdr_type, class, class_code);\n" "\t\tclass >>= 8;\t/* to take revision out, class = class.subclass.prog i/f */\n" - "\t\tif (class = PCI_CLASS_NOT_DEFINED_VGA) {\n" + "\t\tif (class == PCI_CLASS_NOT_DEFINED_VGA) {\n" "\t\t\terr (\"The device %x is VGA compatible and as is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" - "\t\t} else if (class = PCI_CLASS_DISPLAY_VGA) {\n" + "\t\t} else if (class == PCI_CLASS_DISPLAY_VGA) {\n" "\t\t\terr (\"The device %x is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" @@ -427,7 +427,7 @@ "\t\t\t}\n" "\t\t\tassign_alt_irq (cur_func, class_code);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -498,7 +498,7 @@ "\n" "\t\t\tdebug (\"cur_func->busno b4 configure_bridge is %x\\n\", cur_func->busno);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -578,7 +578,7 @@ "\t}\n" "\treturn rc;\n" "}\n" - "===================================\n" + "======================================================================\n" "\n" "What's really deeply indented here? Right,\n" " if (flag) {\n" @@ -638,7 +638,7 @@ "anyway.\n" "\n" "OK, with aforementioned bug fixed that becomes\n" - "===================================\n" + "======================================================================\n" "static void append(struct pci_func *head, struct pci_func *new)\n" "{\n" "\twhile (head->next)\n" @@ -682,7 +682,7 @@ "\t\tpci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id);\n" "\n" "\t\tdebug (\"vendor_id is %x\\n\", vendor_id);\n" - "\t\tif (vendor_id = PCI_VENDOR_ID_NOTVALID)\n" + "\t\tif (vendor_id == PCI_VENDOR_ID_NOTVALID)\n" "\t\t\tcontinue;\n" "\n" "\t\t/* found correct device!!! */\n" @@ -691,7 +691,7 @@ "\t\t++valid_device;\n" "\n" "\t\t/* header: x x x x x x x x\n" - "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2\303\212rdBus Bridge\n" + "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge\n" "\t\t * |_=> 0 = single function device, 1 = multi-function device\n" "\t\t */\n" "\n" @@ -701,11 +701,11 @@ "\t\tclass_code = class >> 24;\n" "\t\tdebug (\"hrd_type = %x, class = %x, class_code %x\\n\", hdr_type, class, class_code);\n" "\t\tclass >>= 8;\t/* to take revision out, class = class.subclass.prog i/f */\n" - "\t\tif (class = PCI_CLASS_NOT_DEFINED_VGA) {\n" + "\t\tif (class == PCI_CLASS_NOT_DEFINED_VGA) {\n" "\t\t\terr (\"The device %x is VGA compatible and as is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" - "\t\t} else if (class = PCI_CLASS_DISPLAY_VGA) {\n" + "\t\t} else if (class == PCI_CLASS_DISPLAY_VGA) {\n" "\t\t\terr (\"The device %x is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" @@ -754,7 +754,7 @@ "\t\t\t}\n" "\t\t\tassign_alt_irq (cur_func, class_code);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -818,7 +818,7 @@ "\n" "\t\t\tdebug (\"cur_func->busno b4 configure_bridge is %x\\n\", cur_func->busno);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -892,7 +892,7 @@ "\t}\n" "\treturn rc;\n" "}\n" - "===================================\n" + "======================================================================\n" "\n" "Now, a look at the places where we are appending suggests that it might\n" "be worth folding kzalloc + setting busno/device/irq into append(), making\n" @@ -904,7 +904,7 @@ "nested code is a very good predictor of shitty code. Not guaranteed,\n" "of course, but as a Bayesian filter it works very well.\n" "\n" - "===================================\n" + "======================================================================\n" "static struct pci_func *append(struct pci_func *head, u8 busno, u8 device)\n" "{\n" "\tstruct pci_func *new = kzalloc(sizeof(*new), GFP_KERNEL);\n" @@ -959,7 +959,7 @@ "\t\tpci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id);\n" "\n" "\t\tdebug (\"vendor_id is %x\\n\", vendor_id);\n" - "\t\tif (vendor_id = PCI_VENDOR_ID_NOTVALID)\n" + "\t\tif (vendor_id == PCI_VENDOR_ID_NOTVALID)\n" "\t\t\tcontinue;\n" "\n" "\t\t/* found correct device!!! */\n" @@ -968,7 +968,7 @@ "\t\t++valid_device;\n" "\n" "\t\t/* header: x x x x x x x x\n" - "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2\303\212rdBus Bridge\n" + "\t\t * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge\n" "\t\t * |_=> 0 = single function device, 1 = multi-function device\n" "\t\t */\n" "\n" @@ -978,11 +978,11 @@ "\t\tclass_code = class >> 24;\n" "\t\tdebug (\"hrd_type = %x, class = %x, class_code %x\\n\", hdr_type, class, class_code);\n" "\t\tclass >>= 8;\t/* to take revision out, class = class.subclass.prog i/f */\n" - "\t\tif (class = PCI_CLASS_NOT_DEFINED_VGA) {\n" + "\t\tif (class == PCI_CLASS_NOT_DEFINED_VGA) {\n" "\t\t\terr (\"The device %x is VGA compatible and as is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" - "\t\t} else if (class = PCI_CLASS_DISPLAY_VGA) {\n" + "\t\t} else if (class == PCI_CLASS_DISPLAY_VGA) {\n" "\t\t\terr (\"The device %x is not supported for hot plugging. \"\n" "\t\t\t \"Please choose another device.\\n\", cur_func->device);\n" "\t\t\treturn -ENODEV;\n" @@ -1023,7 +1023,7 @@ "\t\t\t}\n" "\t\t\tassign_alt_irq (cur_func, class_code);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -1070,7 +1070,7 @@ "\n" "\t\t\tdebug (\"cur_func->busno b4 configure_bridge is %x\\n\", cur_func->busno);\n" "\t\t\trc = configure_bridge (&cur_func, slotno);\n" - "\t\t\tif (rc = -ENODEV) {\n" + "\t\t\tif (rc == -ENODEV) {\n" "\t\t\t\terr (\"You chose to insert Single Bridge, or nested bridges, this is not supported...\\n\");\n" "\t\t\t\terr (\"Bus %x, devfunc %x\\n\", cur_func->busno, cur_func->device);\n" "\t\t\t\treturn rc;\n" @@ -1135,10 +1135,6 @@ "\t\t}\n" "\t}\n" "\treturn rc;\n" - "}\n" - "--\n" - "To unsubscribe from this list: send the line \"unsubscribe kernel-janitors\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + } -ade2169f65b6d83a6b81d2e652a9e3fae2ca0e97374b3528fad18bef44d555f5 +843dbe16b41933c9939c05fe2d09c99eb301a32caf1a25613db69f1bdc1818ff
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.