mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Bjorn Helgaas <helgaas@kernel.org>,
	Prabhakar <prabhakar.csengg@gmail.com>
Cc: "Marek Vasut" <marek.vasut+renesas@mailbox.org>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v2] PCI: rcar-host: Remove unused LIST_HEAD(res)
Date: Sat, 3 Oct 2026 09:38:15 +0200	[thread overview]
Message-ID: <a66e37d7-36d9-4e46-a226-cf15f9c803ba@mailbox.org> (raw)
In-Reply-To: <20261002233229.GA401322@bhelgaas>

On 10/3/26 1:32 AM, Bjorn Helgaas wrote:
> On Thu, May 21, 2026 at 10:12:56AM +0100, Prabhakar wrote:
>> 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;
> 
> Internal Sashiko feedback while backporting this patch:
> 
> [Severity: High]
> This is a pre-existing issue, but does this function lack bounds checking
> for the outbound window index 'i' when configuring PCI resources?
I believe this is addressed in

[PATCH] PCI: rcar-host: Validate IO/MEM resource count in DT ranges property

Thank you.

      reply	other threads:[~2026-10-03  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  9:12 Prabhakar
2026-06-10 16:37 ` Manivannan Sadhasivam
2026-10-02 23:32 ` Bjorn Helgaas
2026-10-03  7:38   ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a66e37d7-36d9-4e46-a226-cf15f9c803ba@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=bhelgaas@google.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=helgaas@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mani@kernel.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®