Re: [PATCH] PCI: rcar-host: Remove unused LIST_HEAD(res)
From: Marek Vasut
Date: Wed May 20 2026 - 08:32:37 EST
On 5/20/26 12:04 PM, Lad, Prabhakar wrote:
Hi Geert,I think Fixes tag would be appropriate here, since the variable is redefined in the same function, which is confusing.
Thank you for the review.
On Wed, May 20, 2026 at 10:20 AM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
It does actually,
Hi Prabhakar,
On Wed, 20 May 2026 at 11:11, Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Remove the unused LIST_HEAD(res) declaration from
rcar_pcie_hw_enable().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Thanks for your patch!
--- 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 */
Indeed, this was never used since its introduction in commit
ce351636c67f75a9 ("PCI: rcar: Add suspend/resume").
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Since this does not seem to cause a warning, even with W=2 (TBH,
I had expected some shadowing warning), no Fixes-tag is needed?
drivers/pci/controller/pcie-rcar-host.c: In function ‘rcar_pcie_hw_enable’:
drivers/pci/controller/pcie-rcar-host.c:357:34: warning: declaration
of ‘res’ shadows a previous local [-Wshadow]
357 | struct resource *res = win->res;
So, I'll respin it with the fixes tag added.
Reviewed-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
Thank you !