From: Bjorn Helgaas <helgaas@kernel.org>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: bhelgaas@google.com, michal.simek@xilinx.com,
soren.brinkmann@xilinx.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, julia.lawall@lip6.fr
Subject: Re: [PATCH] PCI: xilinx: Modify error handling
Date: Mon, 25 Jul 2016 12:42:27 -0500 [thread overview]
Message-ID: <20160725174227.GE12484@localhost> (raw)
In-Reply-To: <20160629151820.GA14282@amitoj-Inspiron-3542>
On Wed, Jun 29, 2016 at 08:48:20PM +0530, Amitoj Kaur Chawla wrote:
> Failure of of_get_next_child returns NULL, not an ERR_PTR. Use
> appropriate error code -ENODEV to be returned on failure instead.
>
> The Coccinelle semantic patch used to find this issue is as follows:
> @@
> expression E,E1;
> @@
>
> if (
> * E == NULL
> ) { <+... when != E = E1
> PTR_ERR(E)
> ...+> }
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> drivers/pci/host/pcie-xilinx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index 65f0fe0..d76ea8d 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -550,7 +550,7 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port)
> pcie_intc_node = of_get_next_child(node, NULL);
> if (!pcie_intc_node) {
> dev_err(dev, "No PCIe Intc node found\n");
> - return PTR_ERR(pcie_intc_node);
> + return -ENODEV;
This fix is included in the patch posted by Christophe JAILLET
<christophe.jaillet@wanadoo.fr>, along with two other similar fixes.
I applied Christophe's patch to pci/host-xilinx for v4.8.
> }
>
> port->irq_domain = irq_domain_add_linear(pcie_intc_node, 4,
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: xilinx: Modify error handling
Date: Mon, 25 Jul 2016 12:42:27 -0500 [thread overview]
Message-ID: <20160725174227.GE12484@localhost> (raw)
In-Reply-To: <20160629151820.GA14282@amitoj-Inspiron-3542>
On Wed, Jun 29, 2016 at 08:48:20PM +0530, Amitoj Kaur Chawla wrote:
> Failure of of_get_next_child returns NULL, not an ERR_PTR. Use
> appropriate error code -ENODEV to be returned on failure instead.
>
> The Coccinelle semantic patch used to find this issue is as follows:
> @@
> expression E,E1;
> @@
>
> if (
> * E == NULL
> ) { <+... when != E = E1
> PTR_ERR(E)
> ...+> }
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> drivers/pci/host/pcie-xilinx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index 65f0fe0..d76ea8d 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -550,7 +550,7 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port)
> pcie_intc_node = of_get_next_child(node, NULL);
> if (!pcie_intc_node) {
> dev_err(dev, "No PCIe Intc node found\n");
> - return PTR_ERR(pcie_intc_node);
> + return -ENODEV;
This fix is included in the patch posted by Christophe JAILLET
<christophe.jaillet@wanadoo.fr>, along with two other similar fixes.
I applied Christophe's patch to pci/host-xilinx for v4.8.
> }
>
> port->irq_domain = irq_domain_add_linear(pcie_intc_node, 4,
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-07-25 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 15:18 [PATCH] PCI: xilinx: Modify error handling Amitoj Kaur Chawla
2016-06-29 15:18 ` Amitoj Kaur Chawla
2016-07-25 17:42 ` Bjorn Helgaas [this message]
2016-07-25 17:42 ` 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=20160725174227.GE12484@localhost \
--to=helgaas@kernel.org \
--cc=amitoj1606@gmail.com \
--cc=bhelgaas@google.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=soren.brinkmann@xilinx.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 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.