From mboxrd@z Thu Jan 1 00:00:00 1970 From: Narendra K Subject: Re: linux-next: build warnings after merge of the pci tree Date: Mon, 2 Aug 2010 07:44:29 -0500 Message-ID: <20100802124429.GA8013@auslistsprd01.us.dell.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from ausc60pc101.us.dell.com ([143.166.85.206]:54867 "EHLO ausc60pc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152Ab0HBMob (ORCPT ); Mon, 2 Aug 2010 08:44:31 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: sfr@canb.auug.org.au, jbarnes@virtuousgeek.org Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, jordan_hargrave@dell.com, matt_domsch@dell.com, charles_rose@dell.com > -----Original Message----- > From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]=20 > Sent: Monday, August 02, 2010 6:49 AM > To: Jesse Barnes > Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; K, > Narendra; Hargrave, Jordan > Subject: linux-next: build warnings after merge of the pci tree >=20 > Hi Jesse, >=20 > After merging the rr tree, today's linux-next build (powerpc > ppc64_defconfig) produced lots of these warnings: >=20 > 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 >=20 > Introduced by commit 911e1c9b05a8e3559a7aa89083930700a0b9e7ee ("PCI: > export SMBIOS provided firmware instance and label to sysfs"). >=20 > Please build with and without the CONFIG options your new code depend= s > 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. =46rom: Narendra K 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 =E2=80=98pci_create_firmware_label_files= =E2=80=99: drivers/pci/pci.h:16: warning: =E2=80=98return=E2=80=99 with a value, i= n function returning void drivers/pci/pci.h: In function =E2=80=98pci_remove_firmware_label_files= =E2=80=99: drivers/pci/pci.h:18: warning: =E2=80=98return=E2=80=99 with a value, i= n 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 *pde= v) +{ return 0; } +static inline void pci_remove_firmware_label_files(struct pci_dev *pde= v) +{ return 0; } Signed-off-by: Narendra K --- 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 *pde= v) -{ return 0; } +{ return; } static inline void pci_remove_firmware_label_files(struct pci_dev *pde= v) -{ 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); --=20 1.7.0.1 With regards, Narendra K