Skip to contentSkip to conversation

PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups

PATCH Superseded Ben Dooks 3 participants 5 messages Oct 15, 2019 – Oct 16, 2019 PCI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups

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?

---
Cc: Bjorn Helgaas <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/pci/pci-sysfs.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/pci/pci-sysfs.c +0 -10
index 793412954529..f7028cf3649a 100644
@@ -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,
Signature · 1 line
2.23.0
#1 lore raw
Quoted 31 lines · Ben Dooks

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?

---
Cc: Bjorn Helgaas <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/pci/pci-sysfs.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/pci/pci-sysfs.c +0 -5
index 793412954529..f7028cf3649a 100644
@@ -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,

drivers/pci/pci-sysfs.c static const struct attribute_group pci_bridge_group = { · line 1552

Quoted 10 lines
drivers/pci/pci-sysfs.c +0 -5
 };
 
-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

#2 lore raw
In reply to Ben Dooks
Quoted 6 lines · Ben Dooks

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..

author
#3 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Ben Dooks

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.

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html
author
#4 lore raw
In reply to Christoph Hellwig
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Ben Dooks

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.

Signature · 4 lines
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html