From: Arnd Bergmann <arnd@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Joyce Ooi <joyce.ooi@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pci: altera: remove unused 'node' variable
Date: Wed, 21 May 2025 18:29:48 +0200 [thread overview]
Message-ID: <20250521163329.2137973-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
This variable is only used when CONFIG_OF is enabled:
drivers/pci/controller/pcie-altera.c: In function 'altera_pcie_init_irq_domain':
drivers/pci/controller/pcie-altera.c:855:29: error: unused variable 'node' [-Werror=unused-variable]
855 | struct device_node *node = dev->of_node;
Use dev_fwnode() in place of of_node_to_fwnode() to avoid this.
Fixes: bbc94e6f72f2 ("PCI: Switch to irq_domain_create_linear()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
----
I checked the other PCI host bridge drivers as well, this is the
only one with that problem.
---
drivers/pci/controller/pcie-altera.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c
index 0fc77176a52e..3dbb7adc421c 100644
--- a/drivers/pci/controller/pcie-altera.c
+++ b/drivers/pci/controller/pcie-altera.c
@@ -852,10 +852,9 @@ static void aglx_isr(struct irq_desc *desc)
static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
- struct device_node *node = dev->of_node;
/* Setup INTx */
- pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), PCI_NUM_INTX,
+ pcie->irq_domain = irq_domain_create_linear(dev_fwnode(dev), PCI_NUM_INTX,
&intx_domain_ops, pcie);
if (!pcie->irq_domain) {
dev_err(dev, "Failed to get a INTx IRQ domain\n");
--
2.39.5
next reply other threads:[~2025-05-21 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 16:29 Arnd Bergmann [this message]
2025-05-22 1:48 ` [PATCH] pci: altera: remove unused 'node' variable Hans Zhang
2025-05-22 5:53 ` Jiri Slaby
2025-05-22 6:32 ` Arnd Bergmann
2025-05-23 16:33 ` Bjorn Helgaas
2025-06-13 9:25 ` Manivannan Sadhasivam
-- strict thread matches above, loose matches on Subject: below --
2025-06-11 10:43 [PATCH] mfd: fix building without CONFIG_OF Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] pci: altera: remove unused 'node' variable Jiri Slaby (SUSE)
2025-06-13 15:41 ` Bjorn Helgaas
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=20250521163329.2137973-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=jirislaby@kernel.org \
--cc=joyce.ooi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.