From: Andrew Morton WARNING: line over 80 characters #38: FILE: drivers/pci/quirks.c:1788: + if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == 0) { ERROR: open brace '{' following function declarations go on the next line #50: FILE: drivers/pci/quirks.c:1800: +static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) { ERROR: use tabs not spaces #57: FILE: drivers/pci/quirks.c:1807: + ^I */$ ERROR: need space after that ',' (ctx:VxV) #59: FILE: drivers/pci/quirks.c:1809: + if ((host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0,0))) == NULL) { ^ ERROR: do not use assignment in if condition (+ if ((host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0,0))) == NULL)) #59: FILE: drivers/pci/quirks.c:1809: + if ((host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0,0))) == NULL) { WARNING: line over 80 characters #65: FILE: drivers/pci/quirks.c:1815: + if ((pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE)) != 0) { ERROR: do not use assignment in if condition (+ if ((pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE)) != 0)) #65: FILE: drivers/pci/quirks.c:1815: + if ((pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE)) != 0) { WARNING: line over 80 characters #77: FILE: drivers/pci/quirks.c:1827: + if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == 0) { WARNING: line over 80 characters #78: FILE: drivers/pci/quirks.c:1828: + printk(KERN_INFO "PCI: Quirk disabling HT MSI mapping on %s\n", total: 5 errors, 4 warnings, 70 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: "Eric W. Biederman" Cc: Andi Kleen Cc: Andy Currid Cc: Greg KH Cc: Ingo Molnar Cc: Peer Chen Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- drivers/pci/quirks.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff -puN drivers/pci/quirks.c~quirks-set-en-bit-of-msi-mapping-for-devices-onht-based-nvidia-platform-checkpatch-fixes drivers/pci/quirks.c --- a/drivers/pci/quirks.c~quirks-set-en-bit-of-msi-mapping-for-devices-onht-based-nvidia-platform-checkpatch-fixes +++ a/drivers/pci/quirks.c @@ -1797,22 +1797,26 @@ static inline void ht_enable_msi_mapping } } -static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) { +static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) +{ struct pci_dev *host_bridge; int pos, ttl = 48; - /* HT MSI mapping should be disabled on devices that are below + /* + * HT MSI mapping should be disabled on devices that are below * a non-Hypertransport host bridge. Locate the host bridge... - */ + */ - if ((host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0,0))) == NULL) { + host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0,0)); + if (host_bridge == NULL) { printk(KERN_WARNING "PCI: nv_msi_ht_cap_quirk didn't locate host bridge\n"); return; } - if ((pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE)) != 0) { + pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE); + if (pos != 0) { /* Host bridge is to HT */ ht_enable_msi_mapping(dev); return; @@ -1825,8 +1829,8 @@ static void __devinit nv_msi_ht_cap_quir u8 flags; if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == 0) { - printk(KERN_INFO "PCI: Quirk disabling HT MSI mapping on %s\n", - pci_name(dev)); + printk(KERN_INFO "PCI: Quirk disabling HT MSI mapping " + "on %s\n", pci_name(dev)); pci_write_config_byte(dev, pos + HT_MSI_FLAGS, flags & ~HT_MSI_FLAGS_ENABLE); _