[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260124202530.GA175580@bhelgaas>
Date: Sat, 24 Jan 2026 14:25:30 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: "Musham, Sai Krishna" <sai.krishna.musham@....com>
Cc: Rakuram Eswaran <rakuram.e96@...il.com>,
"lpieralisi@...nel.org" <lpieralisi@...nel.org>,
"kwilczynski@...nel.org" <kwilczynski@...nel.org>,
"mani@...nel.org" <mani@...nel.org>,
"robh@...nel.org" <robh@...nel.org>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"lkp@...el.com" <lkp@...el.com>,
"error27@...il.com" <error27@...il.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"jirislaby@...nel.org" <jirislaby@...nel.org>,
"Havalige, Thippeswamy" <thippeswamy.havalige@....com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error
message
On Sat, Jan 24, 2026 at 02:02:51PM +0000, Musham, Sai Krishna wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Hi Rakuram,
>
> > -----Original Message-----
> > From: Rakuram Eswaran <rakuram.e96@...il.com>
> > Sent: Wednesday, December 24, 2025 12:10 AM
> > To: lpieralisi@...nel.org; kwilczynski@...nel.org; mani@...nel.org;
> > robh@...nel.org; bhelgaas@...gle.com
> > Cc: lkp@...el.com; error27@...il.com; Musham, Sai Krishna
> > <sai.krishna.musham@....com>; tglx@...utronix.de; jirislaby@...nel.org;
> > Havalige, Thippeswamy <thippeswamy.havalige@....com>; linux-
> > pci@...r.kernel.org; linux-kernel@...r.kernel.org; Rakuram Eswaran
> > <rakuram.e96@...il.com>; Dan Carpenter <dan.carpenter@...aro.org>
> > Subject: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
> >
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> >
> >
> > The INTx devm_request_irq() failure path logs an incorrect IRQ
> > number. The printed 'irq' variable refers to a previous MDB
> > interrupt mapping and does not correspond to the INTx IRQ being
> > requested.
> >
> > Fix the error message to report pcie->intx_irq, which is the IRQ
> > associated with the failing request.
> >
> > Reported-by: kernel test robot <lkp@...el.com>
> > Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> > Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
> > Signed-off-by: Rakuram Eswaran <rakuram.e96@...il.com>
> > ---
> > Testing note:
> > Compile-tested only.
> >
> > Static analysis was performed with Smatch to ensure the reported warning
> > no longer reproduces after applying this fix.
> >
> > Command using for testing:
> > ~/project/smatch/smatch_scripts/kchecker ./drivers/pci/controller/dwc/pcie-amd-
> > mdb.c
> >
> > drivers/pci/controller/dwc/pcie-amd-mdb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-amd-mdb.c b/drivers/pci/controller/dwc/pcie-
> > amd-mdb.c
> > index 3c6e837465bb..7e50e11fbffd 100644
> > --- a/drivers/pci/controller/dwc/pcie-amd-mdb.c
> > +++ b/drivers/pci/controller/dwc/pcie-amd-mdb.c
> > @@ -389,7 +389,7 @@ static int amd_mdb_setup_irq(struct amd_mdb_pcie *pcie,
> > IRQF_NO_THREAD, NULL, pcie);
> > if (err) {
> > dev_err(dev, "Failed to request INTx IRQ %d, err=%d\n",
> > - irq, err);
> > + pcie->intx_irq, err);
>
> The fix is correct. The `irq` variable at that point contains the last
> IRQ mapped in the preceding for loop (an MDB event IRQ), not the INTx
> IRQ being requested via devm_request_irq(). Using `pcie->intx_irq`
> accurately reports the failing IRQ number.
>
> Thanks,
> Sai Krishna
Sai, if you include a "Reviewed-by: Sai Krishna <email-addr>", we can
add that when merging the fix. It sounds like that's your intent, but
I don't want to presume.
Powered by blists - more mailing lists