Re: linux-next: build warnings after merge of the pci tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Stephen Rothwell [mailto:sfr@xxxxxxxxxxxxxxxx] 
> Sent: Monday, August 02, 2010 6:49 AM
> To: Jesse Barnes
> Cc: linux-next@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; K,
> Narendra; Hargrave, Jordan
> Subject: linux-next: build warnings after merge of the pci tree
> 
> Hi Jesse,
> 
> After merging the rr tree, today's linux-next build (powerpc
> ppc64_defconfig) produced lots of these warnings:
> 
> 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
> 
> Introduced by commit 911e1c9b05a8e3559a7aa89083930700a0b9e7ee ("PCI:
> export SMBIOS provided firmware instance and label to sysfs").
> 
> Please build with and without the CONFIG options your new code depends
> on ...  This adds considerably to the build noise.

Jesse,

Sorry, I missed fixing these warnings that come when CONFIG_DMI is
unset. I have fixed them in the below patch. Please consider it for
inclusion.

From: Narendra K <narendra_k@xxxxxxxx>
Subject: [PATCH] PCI: Fix warnings when CONFIG_DMI unset

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@xxxxxxxx>
---
 drivers/pci/pci.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d930338..95186ca 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -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);
-- 
1.7.0.1

With regards,
Narendra K
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux