mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: Rosen Penev <rosenp@gmail.com>, linux-pci@vger.kernel.org
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"moderated list:ARM/ZYNQ ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
	<llvm@lists.linux.dev>
Subject: Re: [PATCH] PCI: xilinx: use fwnode_irq_get() for INTx IRQ lookup
Date: Wed, 15 Jul 2026 18:24:33 +0530	[thread overview]
Message-ID: <4d582140-72a5-47a8-b99e-125e7f0f743b@amd.com> (raw)
In-Reply-To: <20260715011142.1261469-1-rosenp@gmail.com>

> Replace irq_of_parse_and_map() with fwnode_irq_get(dev_fwnode(dev), 0)
> in xilinx_pcie_parse_dt(). For an OF-backed device this is equivalent to
> the previous call, but uses the generic firmware-node API.
> 
> Unlike irq_of_parse_and_map(), fwnode_irq_get() returns a positive IRQ or
> a negative errno and never 0 (it rewrites 0 to -EINVAL). Store the result
> in an int and check for irq < 0, returning the error (including
> -EPROBE_DEFER). This also adds the error handling the previous code
> lacked, where irq_of_parse_and_map() failures were passed straight into
> devm_request_irq().
> 
> Built for ARM (multi_v7_defconfig + CONFIG_PCIE_XILINX) with LLVM=1;
> drivers/pci/controller/pcie-xilinx.o compiles cleanly.
> 
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>   drivers/pci/controller/pcie-xilinx.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/controller/pcie-xilinx.c b/drivers/pci/controller/pcie-xilinx.c
> index 4aa139abac16..a7b069f7673a 100644
> --- a/drivers/pci/controller/pcie-xilinx.c
> +++ b/drivers/pci/controller/pcie-xilinx.c
> @@ -20,10 +20,10 @@
>   #include <linux/of_address.h>
>   #include <linux/of_pci.h>
>   #include <linux/of_platform.h>
> -#include <linux/of_irq.h>
>   #include <linux/pci.h>
>   #include <linux/pci-ecam.h>
>   #include <linux/platform_device.h>
> +#include <linux/property.h>
>   
>   #include "../pci.h"
>   
> @@ -535,7 +535,7 @@ static int xilinx_pcie_parse_dt(struct xilinx_pcie *pcie)
>   	struct device *dev = pcie->dev;
>   	struct device_node *node = dev->of_node;
>   	struct resource regs;
> -	unsigned int irq;
> +	int irq;
>   	int err;
>   
>   	err = of_address_to_resource(node, 0, &regs);
> @@ -548,7 +548,10 @@ static int xilinx_pcie_parse_dt(struct xilinx_pcie *pcie)
>   	if (IS_ERR(pcie->reg_base))
>   		return PTR_ERR(pcie->reg_base);
>   
> -	irq = irq_of_parse_and_map(node, 0);
> +	irq = fwnode_irq_get(dev_fwnode(dev), 0);
> +	if (irq < 0)
> +		return irq;
> 

Thanks for the patch.
Nit - as Sashiko review mentioned better to update xilinx_pcie_probe() 
to use dev_err_probe() to avoid noise on defer.

Rest changes looks fine.

Thanks,
Radhey>   	err = devm_request_irq(dev, irq, xilinx_pcie_intr_handler,
>   			       IRQF_SHARED | IRQF_NO_THREAD,
>   			       "xilinx-pcie", pcie);


      reply	other threads:[~2026-07-15 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  1:11 Rosen Penev
2026-07-15 12:54 ` Pandey, Radhey Shyam [this message]

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=4d582140-72a5-47a8-b99e-125e7f0f743b@amd.com \
    --to=radheys@amd.com \
    --cc=bhelgaas@google.com \
    --cc=justinstitt@google.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.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

all inboxes | Powered by JetHome®