Skip to contentSkip to conversation

PCI: Make pcie_bandwidth_capable() static

PATCH Applied Ilpo Järvinen 2 participants 2 messages May 7, 2024 – May 8, 2024 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Make pcie_bandwidth_capable() static

pcie_bandwidth_capable() is only used within pci.c, make it static.

---
 drivers/pci/pci.c | 4 ++--
 drivers/pci/pci.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/pci/pci.c +2 -2
index e5f243dd4288..23fb5d6c25b0 100644
@@ -6065,8 +6065,8 @@ EXPORT_SYMBOL(pcie_get_width_cap);
  * and width, multiplying them, and applying encoding overhead.  The result
  * is in Mb/s, i.e., megabits/second of raw bandwidth.
  */
-u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
-			   enum pcie_link_width *width)
+static u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
+				  enum pcie_link_width *width)
 {
 	*speed = pcie_get_speed_cap(dev);
 	*width = pcie_get_width_cap(dev);
drivers/pci/pci.h +0 -2
index 17fed1846847..fd44565c4756 100644
@@ -293,8 +293,6 @@ void pci_bus_put(struct pci_bus *bus);
 const char *pci_speed_string(enum pci_bus_speed speed);
 enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
 enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
-u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
-			   enum pcie_link_width *width);
 void __pcie_print_link_status(struct pci_dev *dev, bool verbose);
 void pcie_report_downtraining(struct pci_dev *dev);
 void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines · Ilpo Järvinen

pcie_bandwidth_capable() is only used within pci.c, make it static.

Applied to pci/misc for v6.10, thanks!

Quoted 36 lines
---
 drivers/pci/pci.c | 4 ++--
 drivers/pci/pci.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/pci/pci.c +2 -2
index e5f243dd4288..23fb5d6c25b0 100644
@@ -6065,8 +6065,8 @@ EXPORT_SYMBOL(pcie_get_width_cap);
  * and width, multiplying them, and applying encoding overhead.  The result
  * is in Mb/s, i.e., megabits/second of raw bandwidth.
  */
-u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
-			   enum pcie_link_width *width)
+static u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
+				  enum pcie_link_width *width)
 {
 	*speed = pcie_get_speed_cap(dev);
 	*width = pcie_get_width_cap(dev);
drivers/pci/pci.h +0 -2
index 17fed1846847..fd44565c4756 100644
@@ -293,8 +293,6 @@ void pci_bus_put(struct pci_bus *bus);
 const char *pci_speed_string(enum pci_bus_speed speed);
 enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
 enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
-u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
-			   enum pcie_link_width *width);
 void __pcie_print_link_status(struct pci_dev *dev, bool verbose);
 void pcie_report_downtraining(struct pci_dev *dev);
 void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
Signature · 1 line
2.39.2