public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Rakuram Eswaran <rakuram.e96@gmail.com>
To: lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
	robh@kernel.org, bhelgaas@google.com
Cc: lkp@intel.com, error27@gmail.com, sai.krishna.musham@amd.com,
	tglx@linutronix.de, jirislaby@kernel.org,
	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
Date: Wed, 24 Dec 2025 00:10:03 +0530	[thread overview]
Message-ID: <20251223184003.32950-1-rakuram.e96@gmail.com> (raw)

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


             reply	other threads:[~2025-12-23 18:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 18:40 Rakuram Eswaran [this message]
2026-01-12 17:21 ` [PATCH] PCI: amd-mdb: fix incorrect IRQ number in INTx error message 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

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=20251223184003.32950-1-rakuram.e96@gmail.com \
    --to=rakuram.e96@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=dan.carpenter@linaro.org \
    --cc=error27@gmail.com \
    --cc=jirislaby@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=sai.krishna.musham@amd.com \
    --cc=tglx@linutronix.de \
    --cc=thippeswamy.havalige@amd.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