* [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups
@ 2019-10-15 14:00 Ben Dooks
2019-10-15 21:21 ` Bjorn Helgaas
2019-10-16 6:28 ` Christoph Hellwig
0 siblings, 2 replies; 5+ messages in thread
From: Ben Dooks @ 2019-10-15 14:00 UTC (permalink / raw)
To: linux-kernel; +Cc: Ben Dooks, Bjorn Helgaas, linux-pci, linux-kernel
The pci_bridge_groups and pcie_dev_groups objects are
not exported and not used at-all, so remove them to
fix the following warnings from sparse:
drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static?
drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/pci/pci-sysfs.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 793412954529..f7028cf3649a 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1543,20 +1543,10 @@ static const struct attribute_group pci_bridge_group = {
.attrs = pci_bridge_attrs,
};
-const struct attribute_group *pci_bridge_groups[] = {
- &pci_bridge_group,
- NULL,
-};
-
static const struct attribute_group pcie_dev_group = {
.attrs = pcie_dev_attrs,
};
-const struct attribute_group *pcie_dev_groups[] = {
- &pcie_dev_group,
- NULL,
-};
-
static const struct attribute_group pci_dev_hp_attr_group = {
.attrs = pci_dev_hp_attrs,
.is_visible = pci_dev_hp_attrs_are_visible,
--
2.23.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups
2019-10-15 14:00 [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups Ben Dooks
@ 2019-10-15 21:21 ` Bjorn Helgaas
2019-10-16 6:28 ` Christoph Hellwig
1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2019-10-15 21:21 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-kernel, linux-pci, linux-kernel
On Tue, Oct 15, 2019 at 03:00:59PM +0100, Ben Dooks wrote:
> The pci_bridge_groups and pcie_dev_groups objects are
> not exported and not used at-all, so remove them to
> fix the following warnings from sparse:
>
> drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static?
> drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/pci/pci-sysfs.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 793412954529..f7028cf3649a 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -1543,20 +1543,10 @@ static const struct attribute_group pci_bridge_group = {
> .attrs = pci_bridge_attrs,
> };
>
> -const struct attribute_group *pci_bridge_groups[] = {
> - &pci_bridge_group,
> - NULL,
> -};
> -
> static const struct attribute_group pcie_dev_group = {
> .attrs = pcie_dev_attrs,
> };
>
> -const struct attribute_group *pcie_dev_groups[] = {
> - &pcie_dev_group,
> - NULL,
> -};
> -
> static const struct attribute_group pci_dev_hp_attr_group = {
> .attrs = pci_dev_hp_attrs,
> .is_visible = pci_dev_hp_attrs_are_visible,
I find the sysfs attribute/group/groups stuff quite confusing, but
aren't these now unused also?
pci_bridge_group
pcie_dev_group
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups
2019-10-15 14:00 [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups Ben Dooks
2019-10-15 21:21 ` Bjorn Helgaas
@ 2019-10-16 6:28 ` Christoph Hellwig
2019-10-16 7:31 ` Ben Dooks
2019-10-16 8:04 ` Ben Dooks
1 sibling, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2019-10-16 6:28 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-kernel, Bjorn Helgaas, linux-pci, linux-kernel
On Tue, Oct 15, 2019 at 03:00:59PM +0100, Ben Dooks wrote:
> The pci_bridge_groups and pcie_dev_groups objects are
> not exported and not used at-all, so remove them to
> fix the following warnings from sparse:
>
> drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static?
> drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static?
But now pci_bridge_group is unused, and if you remove that the
attributes, etc..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups
2019-10-16 6:28 ` Christoph Hellwig
@ 2019-10-16 7:31 ` Ben Dooks
2019-10-16 8:04 ` Ben Dooks
1 sibling, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2019-10-16 7:31 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-kernel, Bjorn Helgaas, linux-pci, linux-kernel
On 16/10/2019 07:28, Christoph Hellwig wrote:
> On Tue, Oct 15, 2019 at 03:00:59PM +0100, Ben Dooks wrote:
>> The pci_bridge_groups and pcie_dev_groups objects are
>> not exported and not used at-all, so remove them to
>> fix the following warnings from sparse:
>>
>> drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static?
>> drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static?
>
> But now pci_bridge_group is unused, and if you remove that the
> attributes, etc..
Hmm, didn't get a warning for that. I'll go check.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups
2019-10-16 6:28 ` Christoph Hellwig
2019-10-16 7:31 ` Ben Dooks
@ 2019-10-16 8:04 ` Ben Dooks
1 sibling, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2019-10-16 8:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-kernel, Bjorn Helgaas, linux-pci, linux-kernel
On 16/10/2019 07:28, Christoph Hellwig wrote:
> On Tue, Oct 15, 2019 at 03:00:59PM +0100, Ben Dooks wrote:
>> The pci_bridge_groups and pcie_dev_groups objects are
>> not exported and not used at-all, so remove them to
>> fix the following warnings from sparse:
>>
>> drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static?
>> drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static?
>
> But now pci_bridge_group is unused, and if you remove that the
> attributes, etc..
Ok, thanks for spotting, i've removed those too.
I've no idea why we're not getting compiler warnings for this.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-16 8:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 14:00 [PATCH] PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups Ben Dooks
2019-10-15 21:21 ` Bjorn Helgaas
2019-10-16 6:28 ` Christoph Hellwig
2019-10-16 7:31 ` Ben Dooks
2019-10-16 8:04 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).