linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: Make pcie_bandwidth_capable() static
@ 2024-05-07 12:17 Ilpo Järvinen
  2024-05-08 16:21 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Ilpo Järvinen @ 2024-05-07 12:17 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, linux-kernel; +Cc: Ilpo Järvinen

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

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/pci/pci.c | 4 ++--
 drivers/pci/pci.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e5f243dd4288..23fb5d6c25b0 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -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);
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 17fed1846847..fd44565c4756 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -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);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] PCI: Make pcie_bandwidth_capable() static
  2024-05-07 12:17 [PATCH 1/1] PCI: Make pcie_bandwidth_capable() static Ilpo Järvinen
@ 2024-05-08 16:21 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2024-05-08 16:21 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Tue, May 07, 2024 at 03:17:58PM +0300, Ilpo Järvinen wrote:
> pcie_bandwidth_capable() is only used within pci.c, make it static.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

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

> ---
>  drivers/pci/pci.c | 4 ++--
>  drivers/pci/pci.h | 2 --
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index e5f243dd4288..23fb5d6c25b0 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -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);
> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> index 17fed1846847..fd44565c4756 100644
> --- a/drivers/pci/pci.h
> +++ b/drivers/pci/pci.h
> @@ -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);
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-08 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 12:17 [PATCH 1/1] PCI: Make pcie_bandwidth_capable() static Ilpo Järvinen
2024-05-08 16:21 ` Bjorn Helgaas

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