]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: Fix warnings when CONFIG_DMI unset
authorNarendra K <Narendra_K@dell.com>
Mon, 2 Aug 2010 12:44:29 +0000 (07:44 -0500)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 2 Aug 2010 16:11:10 +0000 (09:11 -0700)
This patch fixes the below warnings introduced by the commit
911e1c9b05a8e3559a7aa89083930700a0b9e7ee ("PCI:
export SMBIOS provided firmware instance and label to sysfs").

drivers/pci/pci.h: In function ‘pci_create_firmware_label_files’:
drivers/pci/pci.h:16: warning: ‘return’ with a value, in function returning void
drivers/pci/pci.h: In function ‘pci_remove_firmware_label_files’:
drivers/pci/pci.h:18: warning: ‘return’ with a value, in function returning void

The warnings are seen because of the below code, doing a retun 0
from the functions 'pci_create_firmware_label_files' and
'pci_remove_firmware_label_files' defined as void.

+#ifndef CONFIG_DMI
+static inline void pci_create_firmware_label_files(struct pci_dev *pdev)
+{ return 0; }
+static inline void pci_remove_firmware_label_files(struct pci_dev *pdev)
+{ return 0; }

Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci.h

index d930338e09223e001138f1294daa2de18f6b2314..95186caa149277759506ab8eb2d0b028457852ef 100644 (file)
@@ -13,9 +13,9 @@ extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
 extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
 #ifndef CONFIG_DMI
 static inline void pci_create_firmware_label_files(struct pci_dev *pdev)
-{ return 0; }
+{ return; }
 static inline void pci_remove_firmware_label_files(struct pci_dev *pdev)
-{ return 0; }
+{ return; }
 #else
 extern void pci_create_firmware_label_files(struct pci_dev *pdev);
 extern void pci_remove_firmware_label_files(struct pci_dev *pdev);