Skip to contentSkip to conversation

pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes

PATCH In review [email protected] 2 participants 2 messages Dec 14, 2007 – Dec 18, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 2/9 pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes

From: Andrew Morton <[email protected]>

WARNING: line over 80 characters
#70: FILE: drivers/ata/pata_hpt37x.c:850:
+ struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);

ERROR: else should follow close brace '}'
#78: FILE: drivers/ata/pata_hpt37x.c:858:
+ }
+ else

total: 1 errors, 1 warnings, 100 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

---

 drivers/ata/pata_hpt37x.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/ata/pata_hpt37x.c renamed from drivers/ata/pata_hpt37x.c~pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes +4 -3
diff -puN drivers/ata/pata_hpt37x.c~pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes drivers/ata/pata_hpt37x.c
@@ -847,15 +847,16 @@ static u32 hpt374_read_freq(struct pci_d
 	u32 freq;
 	unsigned long io_base = pci_resource_start(pdev, 4);
 	if (PCI_FUNC(pdev->devfn) & 1) {
-		struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);
+		struct pci_dev *pdev_0;
+
+		pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);
 		/* Someone hot plugged the controller on us ? */
 		if (pdev_0 == NULL)
 			return 0;
 		io_base = pci_resource_start(pdev_0, 4);
 		freq = inl(io_base + 0x90);
 		pci_dev_put(pdev_0);
-	}
-	else
+	} else
 		freq = inl(io_base + 0x90);
 	return freq;
 }

_

#1 lore raw
Quoted 37 lines · [email protected] wrote:

From: Andrew Morton <[email protected]>

WARNING: line over 80 characters
#70: FILE: drivers/ata/pata_hpt37x.c:850:

(quoted diff) +1 -0
+		struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);

ERROR: else should follow close brace '}'
#78: FILE: drivers/ata/pata_hpt37x.c:858:

(quoted diff) +2 -0
+	}
+	else

total: 1 errors, 1 warnings, 100 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

---

 drivers/ata/pata_hpt37x.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff -puN drivers/ata/pata_hpt37x.c~pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes drivers/ata/pata_hpt37x.c

drivers/ata/pata_hpt37x.c renamed from drivers/ata/pata_hpt37x.c~pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes +3 -1
@@ -847,15 +847,16 @@ static u32 hpt374_read_freq(struct pci_d
 	u32 freq;
 	unsigned long io_base = pci_resource_start(pdev, 4);
 	if (PCI_FUNC(pdev->devfn) & 1) {
-		struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);
+		struct pci_dev *pdev_0;
+
+		pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1);
 		/* Someone hot plugged the controller on us ? */

drivers/ata/pata_hpt37x.c static u32 hpt374_read_freq(struct pci_d · line 861

Quoted 10 lines
drivers/ata/pata_hpt37x.c renamed from drivers/ata/pata_hpt37x.c~pata_hpt37x-fix-outstanding-bug-reports-on-the-hpt374-and-37x-cable-detect-checkpatch-fixes +1 -2
 		if (pdev_0 == NULL)
 			return 0;
 		io_base = pci_resource_start(pdev_0, 4);
 		freq = inl(io_base + 0x90);
 		pci_dev_put(pdev_0);
-	}
-	else
+	} else
 		freq = inl(io_base + 0x90);
 	return freq;

applied #upstream after fixing subject line