public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
@ 2025-05-07 22:04 Paul E. McKenney
  2025-05-08  8:59 ` Ilpo Järvinen
  2025-05-08  9:08 ` Stephen Rothwell
  0 siblings, 2 replies; 4+ messages in thread
From: Paul E. McKenney @ 2025-05-07 22:04 UTC (permalink / raw)
  To: ilpo.jarvinen
  Cc: bhelgaas, linux-pci, kernel-team, linux-kernel, sfr, linux-next

PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem

Builds with CONFIG_PREEMPT_RT=y get the following build error:

drivers/pci/pcie/bwctrl.c:56:22: error: ‘pcie_bwctrl_lbms_rwsem’ defined but not used [-Werror=unused-variable]

Therefore, remove this unused variable.  Perhaps this should be folded
into the commit shown below.

Fixes: 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>

diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
index fdafa20e4587d..841ab8725aff7 100644
--- a/drivers/pci/pcie/bwctrl.c
+++ b/drivers/pci/pcie/bwctrl.c
@@ -53,7 +53,6 @@ struct pcie_bwctrl_data {
  * (using just one rwsem triggers "possible recursive locking detected"
  * warning).
  */
-static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
 static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
 
 static bool pcie_valid_speed(enum pci_bus_speed speed)

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

* Re: [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
  2025-05-07 22:04 [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem Paul E. McKenney
@ 2025-05-08  8:59 ` Ilpo Järvinen
  2025-05-08  9:08 ` Stephen Rothwell
  1 sibling, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2025-05-08  8:59 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: bhelgaas, linux-pci, kernel-team, LKML, sfr, linux-next

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

On Wed, 7 May 2025, Paul E. McKenney wrote:

> PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
> 
> Builds with CONFIG_PREEMPT_RT=y get the following build error:
> 
> drivers/pci/pcie/bwctrl.c:56:22: error: ‘pcie_bwctrl_lbms_rwsem’ defined but not used [-Werror=unused-variable]
> 
> Therefore, remove this unused variable.  Perhaps this should be folded
> into the commit shown below.
> 
> Fixes: 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: <linux-pci@vger.kernel.org>
> 
> diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> index fdafa20e4587d..841ab8725aff7 100644
> --- a/drivers/pci/pcie/bwctrl.c
> +++ b/drivers/pci/pcie/bwctrl.c
> @@ -53,7 +53,6 @@ struct pcie_bwctrl_data {
>   * (using just one rwsem triggers "possible recursive locking detected"
>   * warning).
>   */
> -static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
>  static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
>  
>  static bool pcie_valid_speed(enum pci_bus_speed speed)
> 

I've a patch which removes not only the rwsem but also the comment details 
related to it. I've just not sent it yet because lkp has been very cranky 
recently to build test things in a reasonable time.

-- 
 i.

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

* Re: [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
  2025-05-07 22:04 [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem Paul E. McKenney
  2025-05-08  8:59 ` Ilpo Järvinen
@ 2025-05-08  9:08 ` Stephen Rothwell
  2025-05-08 15:14   ` Paul E. McKenney
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2025-05-08  9:08 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: ilpo.jarvinen, bhelgaas, linux-pci, kernel-team, linux-kernel,
	linux-next

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

Hi Paul,

On Wed, 7 May 2025 15:04:57 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:
>
> PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
> 
> Builds with CONFIG_PREEMPT_RT=y get the following build error:
> 
> drivers/pci/pcie/bwctrl.c:56:22: error: ‘pcie_bwctrl_lbms_rwsem’ defined but not used [-Werror=unused-variable]
> 
> Therefore, remove this unused variable.  Perhaps this should be folded
> into the commit shown below.
> 
> Fixes: 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: <linux-pci@vger.kernel.org>
> 
> diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> index fdafa20e4587d..841ab8725aff7 100644
> --- a/drivers/pci/pcie/bwctrl.c
> +++ b/drivers/pci/pcie/bwctrl.c
> @@ -53,7 +53,6 @@ struct pcie_bwctrl_data {
>   * (using just one rwsem triggers "possible recursive locking detected"
>   * warning).
>   */
> -static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
>  static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
>  
>  static bool pcie_valid_speed(enum pci_bus_speed speed)

I added that to linux-next today and will remove it when it is no
longer needed.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
  2025-05-08  9:08 ` Stephen Rothwell
@ 2025-05-08 15:14   ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2025-05-08 15:14 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: ilpo.jarvinen, bhelgaas, linux-pci, kernel-team, linux-kernel,
	linux-next

On Thu, May 08, 2025 at 07:08:45PM +1000, Stephen Rothwell wrote:
> Hi Paul,
> 
> On Wed, 7 May 2025 15:04:57 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:
> >
> > PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem
> > 
> > Builds with CONFIG_PREEMPT_RT=y get the following build error:
> > 
> > drivers/pci/pcie/bwctrl.c:56:22: error: ‘pcie_bwctrl_lbms_rwsem’ defined but not used [-Werror=unused-variable]
> > 
> > Therefore, remove this unused variable.  Perhaps this should be folded
> > into the commit shown below.
> > 
> > Fixes: 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: <linux-pci@vger.kernel.org>
> > 
> > diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> > index fdafa20e4587d..841ab8725aff7 100644
> > --- a/drivers/pci/pcie/bwctrl.c
> > +++ b/drivers/pci/pcie/bwctrl.c
> > @@ -53,7 +53,6 @@ struct pcie_bwctrl_data {
> >   * (using just one rwsem triggers "possible recursive locking detected"
> >   * warning).
> >   */
> > -static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
> >  static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
> >  
> >  static bool pcie_valid_speed(enum pci_bus_speed speed)
> 
> I added that to linux-next today and will remove it when it is no
> longer needed.

Thank you, Stephen!

Ilpo, I look forward to seeing this patch replaced by your improved
version with better comments.

							Thanx, Paul

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

end of thread, other threads:[~2025-05-08 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 22:04 [PATCH] PCI/bwctrl: Remove unused pcie_bwctrl_lbms_rwsem Paul E. McKenney
2025-05-08  8:59 ` Ilpo Järvinen
2025-05-08  9:08 ` Stephen Rothwell
2025-05-08 15:14   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox