2010-08-02 01:18:45

by Stephen Rothwell

[permalink] [raw]
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.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (777.00 B)
(No filename) (490.00 B)
Download all attachments

2010-08-02 01:38:24

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings after merge of the pci tree

Hi Jesse,

On Mon, 2 Aug 2010 11:18:38 +1000 Stephen Rothwell <[email protected]> wrote:
>
> After merging the rr tree, today's linux-next build (powerpc
^^
I meant the pci tree, of course.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (317.00 B)
(No filename) (490.00 B)
Download all attachments

2010-08-02 12:44:32

by Narendra K

[permalink] [raw]
Subject: Re: linux-next: build warnings after merge of the pci tree

> -----Original Message-----
> From: Stephen Rothwell [mailto:[email protected]]
> Sent: Monday, August 02, 2010 6:49 AM
> To: Jesse Barnes
> Cc: [email protected]; [email protected]; 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 <[email protected]>
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 <[email protected]>
---
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