Skip to content

Commit b879743

Browse files
Narendra Kjbarnes993
authored andcommitted
PCI: Fix warnings when CONFIG_DMI unset
This patch fixes the below warnings introduced by the commit 911e1c9 ("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>
1 parent 3d2a531 commit b879743

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pci/pci.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
1313
extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
1414
#ifndef CONFIG_DMI
1515
static inline void pci_create_firmware_label_files(struct pci_dev *pdev)
16-
{ return 0; }
16+
{ return; }
1717
static inline void pci_remove_firmware_label_files(struct pci_dev *pdev)
18-
{ return 0; }
18+
{ return; }
1919
#else
2020
extern void pci_create_firmware_label_files(struct pci_dev *pdev);
2121
extern void pci_remove_firmware_label_files(struct pci_dev *pdev);

0 commit comments

Comments
 (0)