mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] PCI: rcar-host: Remove unused LIST_HEAD(res)
@ 2026-05-21  9:12 Prabhakar
  2026-06-10 16:37 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar @ 2026-05-21  9:12 UTC (permalink / raw)
  To: Marek Vasut, Yoshihiro Shimoda, Manivannan Sadhasivam,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas, Geert Uytterhoeven, Magnus Damm
  Cc: linux-pci, linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Remove the unused LIST_HEAD(res) declaration from rcar_pcie_hw_enable().

The macro instantiation defines an unused 'struct list_head res' variable,
which conflicts with a valid resource loop-local 'struct resource *res'
declaration further down in the function, triggering a compiler variable
shadowing warning:

drivers/pci/controller/pcie-rcar-host.c:357:34: warning: declaration of 'res' shadows a previous local [-Wshadow]
357 |                  struct resource *res = win->res;

Fixes: ce351636c67f75a9 ("PCI: rcar: Add suspend/resume")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
v1->v2:
- Updated the commit message to include the warning.
- Added the Fixes tag.
- Added Reviewed-by tags for Geert and Marek.
---
 drivers/pci/controller/pcie-rcar-host.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index 213028052aa5..cd9171eebc28 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -346,7 +346,6 @@ static void rcar_pcie_hw_enable(struct rcar_pcie_host *host)
 	struct rcar_pcie *pcie = &host->pcie;
 	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
 	struct resource_entry *win;
-	LIST_HEAD(res);
 	int i = 0;
 
 	/* Try setting 5 GT/s link speed */
-- 
2.54.0


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

* Re: [PATCH v2] PCI: rcar-host: Remove unused LIST_HEAD(res)
  2026-05-21  9:12 [PATCH v2] PCI: rcar-host: Remove unused LIST_HEAD(res) Prabhakar
@ 2026-06-10 16:37 ` Manivannan Sadhasivam
  0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2026-06-10 16:37 UTC (permalink / raw)
  To: Marek Vasut, Yoshihiro Shimoda, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
	Geert Uytterhoeven, Magnus Damm, Prabhakar
  Cc: linux-pci, linux-renesas-soc, linux-kernel, Biju Das,
	Fabrizio Castro, Lad Prabhakar


On Thu, 21 May 2026 10:12:56 +0100, Prabhakar wrote:
> Remove the unused LIST_HEAD(res) declaration from rcar_pcie_hw_enable().
> 
> The macro instantiation defines an unused 'struct list_head res' variable,
> which conflicts with a valid resource loop-local 'struct resource *res'
> declaration further down in the function, triggering a compiler variable
> shadowing warning:
> 
> [...]

Applied, thanks!

[1/1] PCI: rcar-host: Remove unused LIST_HEAD(res)
      commit: 6ba90ce2069ae923b0ec787aebdf2d786e5d2a58

Best regards,
-- 
Manivannan Sadhasivam <mani@kernel.org>


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

end of thread, other threads:[~2026-06-10 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-21  9:12 [PATCH v2] PCI: rcar-host: Remove unused LIST_HEAD(res) Prabhakar
2026-06-10 16:37 ` Manivannan Sadhasivam

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

Powered by JetHome