public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
@ 2025-12-23 18:40 Rakuram Eswaran
  2026-01-12 17:21 ` Rakuram Eswaran
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Rakuram Eswaran @ 2025-12-23 18:40 UTC (permalink / raw)
  To: lpieralisi, kwilczynski, mani, robh, bhelgaas
  Cc: lkp, error27, sai.krishna.musham, tglx, jirislaby,
	thippeswamy.havalige, linux-pci, linux-kernel, Rakuram Eswaran,
	Dan Carpenter

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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.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);
 		return err;
 	}
 
-- 
2.51.0


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

* Re: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
  2025-12-23 18:40 [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message Rakuram Eswaran
@ 2026-01-12 17:21 ` Rakuram Eswaran
  2026-01-24 14:02 ` Musham, Sai Krishna
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Rakuram Eswaran @ 2026-01-12 17:21 UTC (permalink / raw)
  To: rakuram.e96
  Cc: bhelgaas, dan.carpenter, error27, jirislaby, kwilczynski,
	linux-kernel, linux-pci, lkp, lpieralisi, mani, robh,
	sai.krishna.musham, tglx, thippeswamy.havalige

On Wed, 24 Dec 2025 at 00:10, Rakuram Eswaran <rakuram.e96@gmail.com> wrote:
>
> 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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
> Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.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);
>                 return err;
>         }
>

Hello, 

Gentle ping — any feedback on this patch?

Best Regards,
Rakuram

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

* RE: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
  2025-12-23 18:40 [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message Rakuram Eswaran
  2026-01-12 17:21 ` Rakuram Eswaran
@ 2026-01-24 14:02 ` Musham, Sai Krishna
  2026-01-24 20:25   ` Bjorn Helgaas
  2026-01-27  9:04 ` Musham, Sai Krishna
  2026-02-26  6:00 ` Manivannan Sadhasivam
  3 siblings, 1 reply; 6+ messages in thread
From: Musham, Sai Krishna @ 2026-01-24 14:02 UTC (permalink / raw)
  To: Rakuram Eswaran, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, bhelgaas@google.com
  Cc: lkp@intel.com, error27@gmail.com, tglx@linutronix.de,
	jirislaby@kernel.org, Havalige, Thippeswamy,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Carpenter

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Rakuram,

> -----Original Message-----
> From: Rakuram Eswaran <rakuram.e96@gmail.com>
> Sent: Wednesday, December 24, 2025 12:10 AM
> To: lpieralisi@kernel.org; kwilczynski@kernel.org; mani@kernel.org;
> robh@kernel.org; bhelgaas@google.com
> Cc: lkp@intel.com; error27@gmail.com; Musham, Sai Krishna
> <sai.krishna.musham@amd.com>; tglx@linutronix.de; jirislaby@kernel.org;
> Havalige, Thippeswamy <thippeswamy.havalige@amd.com>; linux-
> pci@vger.kernel.org; linux-kernel@vger.kernel.org; Rakuram Eswaran
> <rakuram.e96@gmail.com>; Dan Carpenter <dan.carpenter@linaro.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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
> Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.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

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

* Re: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
  2026-01-24 14:02 ` Musham, Sai Krishna
@ 2026-01-24 20:25   ` Bjorn Helgaas
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2026-01-24 20:25 UTC (permalink / raw)
  To: Musham, Sai Krishna
  Cc: Rakuram Eswaran, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, bhelgaas@google.com,
	lkp@intel.com, error27@gmail.com, tglx@linutronix.de,
	jirislaby@kernel.org, Havalige, Thippeswamy,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Carpenter

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@gmail.com>
> > Sent: Wednesday, December 24, 2025 12:10 AM
> > To: lpieralisi@kernel.org; kwilczynski@kernel.org; mani@kernel.org;
> > robh@kernel.org; bhelgaas@google.com
> > Cc: lkp@intel.com; error27@gmail.com; Musham, Sai Krishna
> > <sai.krishna.musham@amd.com>; tglx@linutronix.de; jirislaby@kernel.org;
> > Havalige, Thippeswamy <thippeswamy.havalige@amd.com>; linux-
> > pci@vger.kernel.org; linux-kernel@vger.kernel.org; Rakuram Eswaran
> > <rakuram.e96@gmail.com>; Dan Carpenter <dan.carpenter@linaro.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@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
> > Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.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.

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

* RE: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
  2025-12-23 18:40 [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message Rakuram Eswaran
  2026-01-12 17:21 ` Rakuram Eswaran
  2026-01-24 14:02 ` Musham, Sai Krishna
@ 2026-01-27  9:04 ` Musham, Sai Krishna
  2026-02-26  6:00 ` Manivannan Sadhasivam
  3 siblings, 0 replies; 6+ messages in thread
From: Musham, Sai Krishna @ 2026-01-27  9:04 UTC (permalink / raw)
  To: Rakuram Eswaran, lpieralisi@kernel.org, kwilczynski@kernel.org,
	mani@kernel.org, robh@kernel.org, bhelgaas@google.com
  Cc: lkp@intel.com, error27@gmail.com, tglx@linutronix.de,
	jirislaby@kernel.org, Havalige, Thippeswamy,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Carpenter

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Rakuram Eswaran <rakuram.e96@gmail.com>
> Sent: Wednesday, December 24, 2025 12:10 AM
> To: lpieralisi@kernel.org; kwilczynski@kernel.org; mani@kernel.org;
> robh@kernel.org; bhelgaas@google.com
> Cc: lkp@intel.com; error27@gmail.com; Musham, Sai Krishna
> <sai.krishna.musham@amd.com>; tglx@linutronix.de; jirislaby@kernel.org;
> Havalige, Thippeswamy <thippeswamy.havalige@amd.com>; linux-
> pci@vger.kernel.org; linux-kernel@vger.kernel.org; Rakuram Eswaran
> <rakuram.e96@gmail.com>; Dan Carpenter <dan.carpenter@linaro.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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202512230112.AaiGqMWM-lkp@intel.com/
> Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.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(-)
>
Reviewed-by: Sai Krishna Musham <sai.krishna.musham@amd.com>

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

* Re: [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
  2025-12-23 18:40 [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message Rakuram Eswaran
                   ` (2 preceding siblings ...)
  2026-01-27  9:04 ` Musham, Sai Krishna
@ 2026-02-26  6:00 ` Manivannan Sadhasivam
  3 siblings, 0 replies; 6+ messages in thread
From: Manivannan Sadhasivam @ 2026-02-26  6:00 UTC (permalink / raw)
  To: lpieralisi, kwilczynski, robh, bhelgaas, Rakuram Eswaran
  Cc: lkp, error27, sai.krishna.musham, jirislaby, thippeswamy.havalige,
	linux-pci, linux-kernel, Dan Carpenter, Thomas Gleixner


On Wed, 24 Dec 2025 00:10:03 +0530, Rakuram Eswaran wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] PCI: amd-mdb: fix incorrect IRQ number in INTx error message
      commit: 821578559ef68583dc3f1fcaaf9dfa00147348b7

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


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

end of thread, other threads:[~2026-02-26  6:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 18:40 [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message Rakuram Eswaran
2026-01-12 17:21 ` Rakuram Eswaran
2026-01-24 14:02 ` Musham, Sai Krishna
2026-01-24 20:25   ` Bjorn Helgaas
2026-01-27  9:04 ` Musham, Sai Krishna
2026-02-26  6:00 ` Manivannan Sadhasivam

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