drivers/pci/controller/pcie-rcar-host.c | 1 - 1 file changed, 1 deletion(-)
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Remove the unused LIST_HEAD(res) declaration from
rcar_pcie_hw_enable().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
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
Hi Prabhakar,
On Wed, 20 May 2026 at 11:11, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Remove the unused LIST_HEAD(res) declaration from
> rcar_pcie_hw_enable().
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
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@glider.be>
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?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Thank you for the review.
On Wed, May 20, 2026 at 10:20 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Wed, 20 May 2026 at 11:11, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Remove the unused LIST_HEAD(res) declaration from
> > rcar_pcie_hw_enable().
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> 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@glider.be>
>
> 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?
>
It does actually,
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.
Cheers,
Prabhakar
On 5/20/26 12:04 PM, Lad, Prabhakar wrote:
> Hi Geert,
>
> Thank you for the review.
>
> On Wed, May 20, 2026 at 10:20 AM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>>
>> Hi Prabhakar,
>>
>> On Wed, 20 May 2026 at 11:11, Prabhakar <prabhakar.csengg@gmail.com> wrote:
>>> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>>
>>> Remove the unused LIST_HEAD(res) declaration from
>>> rcar_pcie_hw_enable().
>>>
>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>
>> 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@glider.be>
>>
>> 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?
>>
> It does actually,
> 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.
I think Fixes tag would be appropriate here, since the variable is
redefined in the same function, which is confusing.
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Thank you !
© 2016 - 2026 Red Hat, Inc.