* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs [not found] ` <AANLkTimz662+L6eYJm2gh0NwWOxxzQV3503bcs-GMFGu@mail.gmail.com> @ 2011-03-07 19:44 ` Narendra_K 2011-03-07 19:56 ` Greg KH 0 siblings, 1 reply; 6+ messages in thread From: Narendra_K @ 2011-03-07 19:44 UTC (permalink / raw) To: a.beregalov, linux-next Cc: jbarnes, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Jordan_Hargrave, Shyam_Iyer, sfr On Mon, Mar 07, 2011 at 11:34:05PM +0530, Alexander Beregalov wrote: > On 4 March 2011 21:43, Jesse Barnes <jbarnes@virtuousgeek.org> wrote: > > On Wed, 2 Mar 2011 22:34:17 +0530 > > <Narendra_K@Dell.com> wrote: > > > >> On Wed, Feb 23, 2011 at 06:06:42PM +0530, K, Narendra wrote: > >> > Hello, > >> > > >> > This patch exports ACPI _DSM provided firmware instance number and > >> > string name to sysfs. > >> > > >> > V1 -> V2: > >> > The attribute 'index' is changed to 'acpi_index' as the semantics of > >> > SMBIOS provided device type instance and ACPI _DSM provided firmware > >> > instance number are different. > >> > > >> > V2 -> V3: > >> > Matthew Garrett pointed out that 'sysfs_create_groups' does return an > >> > error when there are no ACPI _DSM attributes available and because of > >> > that the fallback to SMBIOS will not happen. As a result SMBIOS provided > >> > attributes are not created. This version of the patch addresses the issue. > >> > > >> > >> V3 -> V4: > >> Select NLS if (DMI || ACPI) in drivers/pci/Kconfig to prevent build > >> breakage from an 'allmodconfig' > > > > Applied, fingers crossed this time. :) > > > > Hi, > > It cannot be compiled if CONFIG_ACPI is not set. > > drivers/pci/pci-label.c: In function 'pci_create_firmware_label_files': > drivers/pci/pci-label.c:366:2: error: implicit declaration of function > 'device_has_dsm' Hello, Sorry for the inconvenience. Please find the fix here - From: Narendra K <narendra_k@dell.com> Subject: [PATCH] Fix compilation error when CONFIG_ACPI unset This patch fixes compilation error descibed below introduced by the commit 6058989bad05b82e78baacce69ec14f27a11b5fd drivers/pci/pci-label.c: In function ‘pci_create_firmware_label_files’: drivers/pci/pci-label.c:366:2: error: implicit declaration of function ‘device_has_dsm’ Signed-off-by: Narendra K <narendra_k@dell.com> --- drivers/pci/pci-label.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index 824e247..82fd73d 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c @@ -29,7 +29,9 @@ #include <linux/nls.h> #include <linux/acpi.h> #include <linux/pci-acpi.h> +#ifdef CONFIG_ACPI #include <acpi/acpi_drivers.h> +#endif #include <acpi/acpi_bus.h> #include "pci.h" @@ -174,6 +176,12 @@ pci_remove_acpi_index_label_files(struct pci_dev *pdev) return -1; } +static inline bool +device_has_dsm(struct device *dev) +{ + return false; +} + #else static const char device_label_dsm_uuid[] = { -- 1.7.3.1 With regards, Narendra K ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-07 19:44 ` [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs Narendra_K @ 2011-03-07 19:56 ` Greg KH 2011-03-07 20:55 ` Narendra_K 2011-03-10 0:35 ` Jordan_Hargrave 0 siblings, 2 replies; 6+ messages in thread From: Greg KH @ 2011-03-07 19:56 UTC (permalink / raw) To: Narendra_K Cc: a.beregalov, linux-next, jbarnes, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Jordan_Hargrave, Shyam_Iyer, sfr On Mon, Mar 07, 2011 at 11:44:52AM -0800, Narendra_K@Dell.com wrote: > --- a/drivers/pci/pci-label.c > +++ b/drivers/pci/pci-label.c > @@ -29,7 +29,9 @@ > #include <linux/nls.h> > #include <linux/acpi.h> > #include <linux/pci-acpi.h> > +#ifdef CONFIG_ACPI > #include <acpi/acpi_drivers.h> > +#endif You should never need a #ifdef in a .c file for an include file. If so, something is really wrong. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-07 19:56 ` Greg KH @ 2011-03-07 20:55 ` Narendra_K 2011-03-10 22:05 ` Shyam_Iyer 2011-03-10 0:35 ` Jordan_Hargrave 1 sibling, 1 reply; 6+ messages in thread From: Narendra_K @ 2011-03-07 20:55 UTC (permalink / raw) To: greg Cc: a.beregalov, linux-next, jbarnes, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Jordan_Hargrave, Shyam_Iyer, sfr On Tue, Mar 08, 2011 at 01:26:16AM +0530, Greg KH wrote: > On Mon, Mar 07, 2011 at 11:44:52AM -0800, Narendra_K@Dell.com wrote: > > --- a/drivers/pci/pci-label.c > > +++ b/drivers/pci/pci-label.c > > @@ -29,7 +29,9 @@ > > #include <linux/nls.h> > > #include <linux/acpi.h> > > #include <linux/pci-acpi.h> > > +#ifdef CONFIG_ACPI > > #include <acpi/acpi_drivers.h> > > +#endif > > You should never need a #ifdef in a .c file for an include file. If so, > something is really wrong. I agree. Also, i realized that the include was not required to address the reported error. Please find the revised patch here. From: Narendra K <narendra_k@dell.com> Subject: [PATCH] Fix compilation error when CONFIG_ACPI is unset This patch fixes compilation error descibed below introduced by the commit 6058989bad05b82e78baacce69ec14f27a11b5fd drivers/pci/pci-label.c: In function ‘pci_create_firmware_label_files’: drivers/pci/pci-label.c:366:2: error: implicit declaration of function ‘device_has_dsm’ Signed-off-by: Narendra K <narendra_k@dell.com> --- drivers/pci/pci-label.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index 824e247..8c80138 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c @@ -174,6 +174,12 @@ pci_remove_acpi_index_label_files(struct pci_dev *pdev) return -1; } +static inline bool +device_has_dsm(struct device *dev) +{ + return false; +} + #else static const char device_label_dsm_uuid[] = { -- 1.7.3.1 With regards, Narendra K ^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-07 20:55 ` Narendra_K @ 2011-03-10 22:05 ` Shyam_Iyer 2011-03-16 17:41 ` Jesse Barnes 0 siblings, 1 reply; 6+ messages in thread From: Shyam_Iyer @ 2011-03-10 22:05 UTC (permalink / raw) To: Narendra_K, greg Cc: a.beregalov, linux-next, jbarnes, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Jordan_Hargrave, sfr > -----Original Message----- > From: K, Narendra > Sent: Monday, March 07, 2011 3:56 PM > To: Greg KH > Cc: a.beregalov@gmail.com; linux-next@vger.kernel.org; > jbarnes@virtuousgeek.org; linux-pci@vger.kernel.org; linux- > hotplug@vger.kernel.org; netdev@vger.kernel.org; mjg@redhat.com; > Domsch, Matt; Rose, Charles; Hargrave, Jordan; Iyer, Shyam; > sfr@canb.auug.org.au > Subject: Re: [PATCH V4] Export ACPI _DSM provided firmware instance > number and string name to sysfs > > On Tue, Mar 08, 2011 at 01:26:16AM +0530, Greg KH wrote: > > On Mon, Mar 07, 2011 at 11:44:52AM -0800, Narendra_K@Dell.com wrote: > > > --- a/drivers/pci/pci-label.c > > > +++ b/drivers/pci/pci-label.c > > > @@ -29,7 +29,9 @@ > > > #include <linux/nls.h> > > > #include <linux/acpi.h> > > > #include <linux/pci-acpi.h> > > > +#ifdef CONFIG_ACPI > > > #include <acpi/acpi_drivers.h> > > > +#endif > > > > You should never need a #ifdef in a .c file for an include file. If > so, > > something is really wrong. > > I agree. Also, i realized that the include was not required to address > the > reported error. Please find the revised patch here. > > From: Narendra K <narendra_k@dell.com> > Subject: [PATCH] Fix compilation error when CONFIG_ACPI is unset > > This patch fixes compilation error descibed below introduced by > the commit 6058989bad05b82e78baacce69ec14f27a11b5fd > > drivers/pci/pci-label.c: In function ‘pci_create_firmware_label_files’: > drivers/pci/pci-label.c:366:2: error: implicit declaration of function > ‘device_has_dsm’ > > Signed-off-by: Narendra K <narendra_k@dell.com> > --- > drivers/pci/pci-label.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c > index 824e247..8c80138 100644 > --- a/drivers/pci/pci-label.c > +++ b/drivers/pci/pci-label.c > @@ -174,6 +174,12 @@ pci_remove_acpi_index_label_files(struct pci_dev > *pdev) > return -1; > } > > +static inline bool > +device_has_dsm(struct device *dev) > +{ > + return false; > +} > + > #else > > static const char device_label_dsm_uuid[] = { > -- > 1.7.3.1 > > With regards, > Narendra K So this works and fixes the additional build failure. I tested with CONFIG_ACPI set/unset and with "make allmodconfig" Additionally I found that including acpi/apci_drivers.h is not necessary and introduces these warnings.. The below patch fixes the additional warnigs.. In file included from drivers/pci/pci-label.c:32: include/acpi/acpi_drivers.h:103: warning: ‘struct acpi_device’ declared inside parameter list include/acpi/acpi_drivers.h:103: warning: its scope is only this definition or declaration, which is probably not what you want include/acpi/acpi_drivers.h:107: warning: ‘struct acpi_pci_root’ declared inside parameter list Signed-off-by: Shyam Iyer <shyam_iyer@dell.com> --- drivers/pci/pci-label.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index bf4ebee..488b0ce 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c @@ -29,7 +29,6 @@ #include <linux/nls.h> #include <linux/acpi.h> #include <linux/pci-acpi.h> -#include <acpi/acpi_drivers.h> #include <acpi/acpi_bus.h> #include "pci.h" -- 1.7.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-10 22:05 ` Shyam_Iyer @ 2011-03-16 17:41 ` Jesse Barnes 0 siblings, 0 replies; 6+ messages in thread From: Jesse Barnes @ 2011-03-16 17:41 UTC (permalink / raw) To: Shyam_Iyer Cc: Narendra_K, greg, a.beregalov, linux-next, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Jordan_Hargrave, sfr On Fri, 11 Mar 2011 03:35:56 +0530 <Shyam_Iyer@Dell.com> wrote: > > > -----Original Message----- > > From: K, Narendra > > Sent: Monday, March 07, 2011 3:56 PM > > To: Greg KH > > Cc: a.beregalov@gmail.com; linux-next@vger.kernel.org; > > jbarnes@virtuousgeek.org; linux-pci@vger.kernel.org; linux- > > hotplug@vger.kernel.org; netdev@vger.kernel.org; mjg@redhat.com; > > Domsch, Matt; Rose, Charles; Hargrave, Jordan; Iyer, Shyam; > > sfr@canb.auug.org.au > > Subject: Re: [PATCH V4] Export ACPI _DSM provided firmware instance > > number and string name to sysfs > > > > On Tue, Mar 08, 2011 at 01:26:16AM +0530, Greg KH wrote: > > > On Mon, Mar 07, 2011 at 11:44:52AM -0800, Narendra_K@Dell.com wrote: > > > > --- a/drivers/pci/pci-label.c > > > > +++ b/drivers/pci/pci-label.c > > > > @@ -29,7 +29,9 @@ > > > > #include <linux/nls.h> > > > > #include <linux/acpi.h> > > > > #include <linux/pci-acpi.h> > > > > +#ifdef CONFIG_ACPI > > > > #include <acpi/acpi_drivers.h> > > > > +#endif > > > > > > You should never need a #ifdef in a .c file for an include file. If > > so, > > > something is really wrong. > > > > I agree. Also, i realized that the include was not required to address > > the > > reported error. Please find the revised patch here. > > > > From: Narendra K <narendra_k@dell.com> > > Subject: [PATCH] Fix compilation error when CONFIG_ACPI is unset > > > > This patch fixes compilation error descibed below introduced by > > the commit 6058989bad05b82e78baacce69ec14f27a11b5fd > > > > drivers/pci/pci-label.c: In function ‘pci_create_firmware_label_files’: > > drivers/pci/pci-label.c:366:2: error: implicit declaration of function > > ‘device_has_dsm’ > > > > Signed-off-by: Narendra K <narendra_k@dell.com> > > --- > > drivers/pci/pci-label.c | 6 ++++++ > > 1 files changed, 6 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c > > index 824e247..8c80138 100644 > > --- a/drivers/pci/pci-label.c > > +++ b/drivers/pci/pci-label.c > > @@ -174,6 +174,12 @@ pci_remove_acpi_index_label_files(struct pci_dev > > *pdev) > > return -1; > > } > > > > +static inline bool > > +device_has_dsm(struct device *dev) > > +{ > > + return false; > > +} > > + > > #else > > > > static const char device_label_dsm_uuid[] = { > > -- > > 1.7.3.1 > > > > With regards, > > Narendra K > > So this works and fixes the additional build failure. > > I tested with CONFIG_ACPI set/unset and with "make allmodconfig" > > Additionally I found that including acpi/apci_drivers.h is not necessary and introduces these warnings.. > > The below patch fixes the additional warnigs.. > > In file included from drivers/pci/pci-label.c:32: > include/acpi/acpi_drivers.h:103: warning: ‘struct acpi_device’ declared inside parameter list > include/acpi/acpi_drivers.h:103: warning: its scope is only this definition or declaration, which is probably not what you want > include/acpi/acpi_drivers.h:107: warning: ‘struct acpi_pci_root’ declared inside parameter list > > Signed-off-by: Shyam Iyer <shyam_iyer@dell.com> Ok, I've applied these two fixes, thanks guys. I hope that's the last of the issues we'll see with this patch! -- Jesse Barnes, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs 2011-03-07 19:56 ` Greg KH 2011-03-07 20:55 ` Narendra_K @ 2011-03-10 0:35 ` Jordan_Hargrave 1 sibling, 0 replies; 6+ messages in thread From: Jordan_Hargrave @ 2011-03-10 0:35 UTC (permalink / raw) To: greg, Narendra_K Cc: a.beregalov, linux-next, jbarnes, linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose, Shyam_Iyer, sfr That happens though for CONFIG_XXXX, though usually the include file is further down in the #ifdef region. --jordan hargrave Dell Enterprise Linux Engineering -----Original Message----- From: Greg KH [mailto:greg@kroah.com] Sent: Monday, March 07, 2011 1:56 PM To: K, Narendra Cc: a.beregalov@gmail.com; linux-next@vger.kernel.org; jbarnes@virtuousgeek.org; linux-pci@vger.kernel.org; linux-hotplug@vger.kernel.org; netdev@vger.kernel.org; mjg@redhat.com; Domsch, Matt; Rose, Charles; Hargrave, Jordan; Iyer, Shyam; sfr@canb.auug.org.au Subject: Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs On Mon, Mar 07, 2011 at 11:44:52AM -0800, Narendra_K@Dell.com wrote: > --- a/drivers/pci/pci-label.c > +++ b/drivers/pci/pci-label.c > @@ -29,7 +29,9 @@ > #include <linux/nls.h> > #include <linux/acpi.h> > #include <linux/pci-acpi.h> > +#ifdef CONFIG_ACPI > #include <acpi/acpi_drivers.h> > +#endif You should never need a #ifdef in a .c file for an include file. If so, something is really wrong. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-16 17:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110223125741.GA16473@fedora14-r610.blr.amer.dell.com>
[not found] ` <20110302172508.GA2794@fedora14-r610.oslab.blr.amer.dell.com>
[not found] ` <20110304104314.26265021@jbarnes-desktop>
[not found] ` <AANLkTimz662+L6eYJm2gh0NwWOxxzQV3503bcs-GMFGu@mail.gmail.com>
2011-03-07 19:44 ` [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs Narendra_K
2011-03-07 19:56 ` Greg KH
2011-03-07 20:55 ` Narendra_K
2011-03-10 22:05 ` Shyam_Iyer
2011-03-16 17:41 ` Jesse Barnes
2011-03-10 0:35 ` Jordan_Hargrave
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox