* [PATCH] pci: altera: remove unused 'node' variable
@ 2025-05-21 16:29 Arnd Bergmann
2025-05-22 1:48 ` Hans Zhang
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Arnd Bergmann @ 2025-05-21 16:29 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Arnd Bergmann, Joyce Ooi, Bjorn Helgaas, Jiri Slaby (SUSE),
linux-pci, linux-kernel
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-05-21 16:29 [PATCH] pci: altera: remove unused 'node' variable Arnd Bergmann
@ 2025-05-22 1:48 ` Hans Zhang
2025-05-22 5:53 ` Jiri Slaby
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Hans Zhang @ 2025-05-22 1:48 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner
Cc: Arnd Bergmann, Joyce Ooi, Bjorn Helgaas, Jiri Slaby (SUSE),
linux-pci, linux-kernel
On 2025/5/22 00:29, Arnd Bergmann 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.
>
> 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);
Hello,
Please align the code by the way.
pcie->irq_domain = irq_domain_create_linear(dev_fwnode(dev), PCI_NUM_INTX,
&intx_domain_ops, pcie);
Besides, I didn't see this commit in the linux master branch and the PCI
next branch. It should be in some branch of Thomas Gleixner, right?
Fixes: bbc94e6f72f2 ("PCI: Switch to irq_domain_create_linear()")
Best regards,
Hans
> if (!pcie->irq_domain) {
> dev_err(dev, "Failed to get a INTx IRQ domain\n");
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-05-21 16:29 [PATCH] pci: altera: remove unused 'node' variable Arnd Bergmann
2025-05-22 1:48 ` 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
3 siblings, 1 reply; 8+ messages in thread
From: Jiri Slaby @ 2025-05-22 5:53 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner
Cc: Arnd Bergmann, Joyce Ooi, Bjorn Helgaas, linux-pci, linux-kernel
On 21. 05. 25, 18:29, Arnd Bergmann 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.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Right, this reminds me that my dev_fwnode() patches (in my local queue
-- they were supposed to be in v3) are not only cleanup, but also fix
warnings.
I was thinking to send those after the merge window (so that I can route
through subsys maintainers and not bother Thomas, as they touch many
files [1]), but I will send them when I am back from a conf.
[1]
arch/powerpc/platforms/8xx/cpm1-ic.c
arch/powerpc/sysdev/fsl_msi.c
drivers/edac/altera_edac.c
drivers/gpio/gpio-brcmstb.c
drivers/gpio/gpio-davinci.c
drivers/gpio/gpio-em.c
drivers/gpio/gpio-grgpio.c
drivers/gpio/gpio-lpc18xx.c
drivers/gpio/gpio-mvebu.c
drivers/gpio/gpio-mxc.c
drivers/gpio/gpio-mxs.c
drivers/gpio/gpio-pxa.c
drivers/gpio/gpio-rockchip.c
drivers/gpio/gpio-sodaville.c
drivers/gpio/gpio-tb10x.c
drivers/gpio/gpio-twl4030.c
drivers/gpu/drm/msm/msm_mdss.c
drivers/gpu/ipu-v3/ipu-common.c
drivers/i2c/muxes/i2c-mux-pca954x.c
drivers/iio/adc/stm32-adc-core.c
drivers/irqchip/irq-imgpdc.c
drivers/irqchip/irq-imx-irqsteer.c
drivers/irqchip/irq-keystone.c
drivers/irqchip/irq-mvebu-pic.c
drivers/irqchip/irq-pruss-intc.c
drivers/irqchip/irq-renesas-intc-irqpin.c
drivers/irqchip/irq-renesas-irqc.c
drivers/irqchip/irq-renesas-rza1.c
drivers/irqchip/irq-renesas-rzg2l.c
drivers/irqchip/irq-renesas-rzv2h.c
drivers/irqchip/irq-stm32mp-exti.c
drivers/irqchip/irq-ti-sci-inta.c
drivers/irqchip/irq-ti-sci-intr.c
drivers/irqchip/irq-ts4800.c
drivers/mailbox/qcom-ipcc.c
drivers/memory/omap-gpmc.c
drivers/mfd/88pm860x-core.c
drivers/mfd/ab8500-core.c
drivers/mfd/fsl-imx25-tsadc.c
drivers/mfd/lp8788-irq.c
drivers/mfd/max8925-core.c
drivers/mfd/mt6358-irq.c
drivers/mfd/mt6397-irq.c
drivers/mfd/qcom-pm8xxx.c
drivers/mfd/stmfx.c
drivers/mfd/tps65217.c
drivers/mfd/tps6586x.c
drivers/mfd/twl4030-irq.c
drivers/mfd/twl6030-irq.c
drivers/mfd/wm831x-irq.c
drivers/misc/hi6421v600-irq.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/dsa/qca/ar9331.c
drivers/net/usb/lan78xx.c
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
drivers/pci/controller/pcie-altera.c
drivers/pci/controller/pcie-mediatek-gen3.c
drivers/pinctrl/mediatek/mtk-eint.c
drivers/pinctrl/pinctrl-at91-pio4.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c
drivers/soc/fsl/qe/qe_ic.c
drivers/soc/tegra/pmc.c
drivers/thermal/qcom/lmh.c
drivers/thermal/tegra/soctherm.c
> 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");
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-05-22 5:53 ` Jiri Slaby
@ 2025-05-22 6:32 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2025-05-22 6:32 UTC (permalink / raw)
To: Jiri Slaby, Arnd Bergmann, Thomas Gleixner
Cc: Joyce Ooi, Bjorn Helgaas, linux-pci, linux-kernel
On Thu, May 22, 2025, at 07:53, Jiri Slaby wrote:
> On 21. 05. 25, 18:29, Arnd Bergmann 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.
>
> Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
>
> Right, this reminds me that my dev_fwnode() patches (in my local queue
> -- they were supposed to be in v3) are not only cleanup, but also fix
> warnings.
>
> I was thinking to send those after the merge window (so that I can route
> through subsys maintainers and not bother Thomas, as they touch many
> files [1]), but I will send them when I am back from a conf.
Ok. As far as I can tell, my two patches (mfd and pci) touching
four of those files are sufficient to address all the warnings
I see on x86, arm64 and arm. I came to the same conclusion about
being able to do more as cleanups but not needing them before the
merge window.
I also checked the power and mips specific files in your list
and they should be warning-free as far as I can tell.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-05-21 16:29 [PATCH] pci: altera: remove unused 'node' variable Arnd Bergmann
2025-05-22 1:48 ` Hans Zhang
2025-05-22 5:53 ` Jiri Slaby
@ 2025-05-23 16:33 ` Bjorn Helgaas
2025-06-13 9:25 ` Manivannan Sadhasivam
3 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2025-05-23 16:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Arnd Bergmann, Joyce Ooi, Bjorn Helgaas,
Jiri Slaby (SUSE), linux-pci, linux-kernel
On Wed, May 21, 2025 at 06:29:48PM +0200, Arnd Bergmann 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.
>
> Fixes: bbc94e6f72f2 ("PCI: Switch to irq_domain_create_linear()")
Deferring this until bbc94e6f72f2 is merged.
> 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
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-05-21 16:29 [PATCH] pci: altera: remove unused 'node' variable Arnd Bergmann
` (2 preceding siblings ...)
2025-05-23 16:33 ` Bjorn Helgaas
@ 2025-06-13 9:25 ` Manivannan Sadhasivam
3 siblings, 0 replies; 8+ messages in thread
From: Manivannan Sadhasivam @ 2025-06-13 9:25 UTC (permalink / raw)
To: Thomas Gleixner, Arnd Bergmann
Cc: Manivannan Sadhasivam, Arnd Bergmann, Joyce Ooi, Bjorn Helgaas,
Jiri Slaby (SUSE), linux-pci, linux-kernel
On Wed, 21 May 2025 18:29:48 +0200, Arnd Bergmann wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] pci: altera: remove unused 'node' variable
commit: 693594d0e5d8d236fc4172c864afdcbe6993a2bd
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] mfd: fix building without CONFIG_OF
@ 2025-06-11 10:43 Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] pci: altera: remove unused 'node' variable Jiri Slaby (SUSE)
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2025-06-11 10:43 UTC (permalink / raw)
To: linux-kernel
Cc: tglx, Arnd Bergmann, Mario Limonciello, Nathan Chancellor,
Jiri Slaby (SUSE)
From: Arnd Bergmann <arnd@arndb.de>
Using the of_fwnode_handle() means that local 'node' variables are unused
whenever CONFIG_OF is disabled for compile testing:
drivers/mfd/88pm860x-core.c: In function 'device_irq_init':
drivers/mfd/88pm860x-core.c:576:29: error: unused variable 'node' [-Werror=unused-variable]
576 | struct device_node *node = i2c->dev.of_node;
| ^~~~
drivers/mfd/max8925-core.c: In function 'max8925_irq_init':
drivers/mfd/max8925-core.c:659:29: error: unused variable 'node' [-Werror=unused-variable]
659 | struct device_node *node = chip->dev->of_node;
| ^~~~
drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq':
drivers/mfd/twl4030-irq.c:679:46: error: unused variable 'node' [-Werror=unused-variable]
679 | struct device_node *node = dev->of_node;
| ^~~~
Replace these with the corresponding dev_fwnode() lookups that
keep the code simpler in addition to avoiding the warnings.
Fixes: e3d44f11da04 ("mfd: Switch to irq_domain_create_*()")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
drivers/mfd/88pm860x-core.c | 3 +--
drivers/mfd/max8925-core.c | 6 +++---
drivers/mfd/twl4030-irq.c | 3 +--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index 488e346047c1..77230fbe07be 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -573,7 +573,6 @@ static int device_irq_init(struct pm860x_chip *chip,
unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
int data, mask, ret = -EINVAL;
int nr_irqs, irq_base = -1;
- struct device_node *node = i2c->dev.of_node;
mask = PM8607_B0_MISC1_INV_INT | PM8607_B0_MISC1_INT_CLEAR
| PM8607_B0_MISC1_INT_MASK;
@@ -624,7 +623,7 @@ static int device_irq_init(struct pm860x_chip *chip,
ret = -EBUSY;
goto out;
}
- irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip->irq_base, 0,
+ irq_domain_create_legacy(dev_fwnode(&i2c->dev), nr_irqs, chip->irq_base, 0,
&pm860x_irq_domain_ops, chip);
chip->core_irq = i2c->irq;
if (!chip->core_irq)
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 78b16c67a5fc..25377dcce60e 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -656,7 +656,6 @@ static int max8925_irq_init(struct max8925_chip *chip, int irq,
{
unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
int ret;
- struct device_node *node = chip->dev->of_node;
/* clear all interrupts */
max8925_reg_read(chip->i2c, MAX8925_CHG_IRQ1);
@@ -682,8 +681,9 @@ static int max8925_irq_init(struct max8925_chip *chip, int irq,
return -EBUSY;
}
- irq_domain_create_legacy(of_fwnode_handle(node), MAX8925_NR_IRQS, chip->irq_base, 0,
- &max8925_irq_domain_ops, chip);
+ irq_domain_create_legacy(dev_fwnode(chip->dev), MAX8925_NR_IRQS,
+ chip->irq_base, 0, &max8925_irq_domain_ops,
+ chip);
/* request irq handler for pmic main irq*/
chip->core_irq = irq;
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 232c2bfe8c18..d3ab40651307 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -676,7 +676,6 @@ int twl4030_init_irq(struct device *dev, int irq_num)
static struct irq_chip twl4030_irq_chip;
int status, i;
int irq_base, irq_end, nr_irqs;
- struct device_node *node = dev->of_node;
/*
* TWL core and pwr interrupts must be contiguous because
@@ -691,7 +690,7 @@ int twl4030_init_irq(struct device *dev, int irq_num)
return irq_base;
}
- irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, irq_base, 0,
+ irq_domain_create_legacy(dev_fwnode(dev), nr_irqs, irq_base, 0,
&irq_domain_simple_ops, NULL);
irq_end = irq_base + TWL4030_CORE_NR_IRQS;
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH] pci: altera: remove unused 'node' variable
2025-06-11 10:43 [PATCH] mfd: fix building without CONFIG_OF Jiri Slaby (SUSE)
@ 2025-06-11 10:43 ` Jiri Slaby (SUSE)
2025-06-13 15:41 ` Bjorn Helgaas
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2025-06-11 10:43 UTC (permalink / raw)
To: linux-kernel; +Cc: tglx, Arnd Bergmann, Jiri Slaby
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] pci: altera: remove unused 'node' variable
2025-06-11 10:43 ` [PATCH] pci: altera: remove unused 'node' variable Jiri Slaby (SUSE)
@ 2025-06-13 15:41 ` Bjorn Helgaas
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2025-06-13 15:41 UTC (permalink / raw)
To: Jiri Slaby (SUSE)
Cc: linux-kernel, tglx, Arnd Bergmann, Manivannan Sadhasivam
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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-06-13 15:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 16:29 [PATCH] pci: altera: remove unused 'node' variable Arnd Bergmann
2025-05-22 1:48 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox