[PATCH 3/3] powerpc: Fix warning in powermac pci.c

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Mar 7 21:27:55 EST 2007


This fixes a warning due to unused result from pci_enable_device() in
powermac pci.c

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>

 arch/powerpc/platforms/powermac/pci.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: linux-tika/arch/powerpc/platforms/powermac/pci.c
===================================================================
--- linux-tika.orig/arch/powerpc/platforms/powermac/pci.c	2007-03-05 14:24:23.000000000 +0100
+++ linux-tika/arch/powerpc/platforms/powermac/pci.c	2007-03-05 14:25:17.000000000 +0100
@@ -1191,8 +1191,11 @@
 	 * -- BenH
 	 */
 	for_each_pci_dev(dev) {
-		if ((dev->class >> 16) == PCI_BASE_CLASS_STORAGE)
-			pci_enable_device(dev);
+		if ((dev->class >> 16) != PCI_BASE_CLASS_STORAGE)
+			continue;
+		if (pci_enable_device(dev))
+			printk(KERN_WARNING
+			       "pci: Failed to enable %s\n", pci_name(dev));
 	}
 #endif /* CONFIG_BLK_DEV_IDE */
 



More information about the Linuxppc-dev mailing list