drivers/pci/controller/pcie-altera.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
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.
----
I checked the other PCI host bridge drivers as well, this is the
only one with that problem.
Fixes: bbc94e6f72f2 ("PCI: Switch to irq_domain_create_linear()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
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.49.0
On Wed, Jun 11, 2025 at 12:43:30PM +0200, Jiri Slaby (SUSE) wrote: > 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. > > ---- > I checked the other PCI host bridge drivers as well, this is the > only one with that problem. > > Fixes: bbc94e6f72f2 ("PCI: Switch to irq_domain_create_linear()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Reviewed-by: Jiri Slaby <jirislaby@kernel.org> > Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Applied by Mani to pci/controller/altera. I amended the subject to match history. > --- > 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.49.0 >
© 2016 - 2025 Red Hat, Inc.