Skip to contentSkip to conversation

PCI: sysfs: remove pci_bridge_groups and pcie_dev_groups

PATCH Applied Ben Dooks (Codethink) 2 participants 2 messages Oct 16, 2019 PCI

lore
Share & tools
lore
#0 lore raw

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

From: Ben Dooks <[email protected]>

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?

Also remove the unused pci_bridge_group and pcie_dev_group as they are not used any more.

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

fixup - more unused pci bits

---
 drivers/pci/pci-sysfs.c | 18 ------------------
 1 file changed, 18 deletions(-)
drivers/pci/pci-sysfs.c +0 -18
index 793412954529..eaffb477c5bf 100644
@@ -1539,24 +1539,6 @@ const struct attribute_group *pci_dev_groups[] = {
 	NULL,
 };
 
-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 6 lines · Ben Dooks (Codethink)

From: Ben Dooks <[email protected]>

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:

Quoted 7 lines

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?

Also remove the unused pci_bridge_group and pcie_dev_group as they are not used any more.

Applied to pci/misc for v5.5, thanks a lot, Ben!

Quoted 42 lines

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

fixup - more unused pci bits

---
 drivers/pci/pci-sysfs.c | 18 ------------------
 1 file changed, 18 deletions(-)
drivers/pci/pci-sysfs.c +0 -18
index 793412954529..eaffb477c5bf 100644
@@ -1539,24 +1539,6 @@ const struct attribute_group *pci_dev_groups[] = {
 	NULL,
 };
 
-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