* [patch] PCI: xilinx: testing wrong variable in setup irq function
@ 2014-09-09 12:11 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2014-09-09 12:11 UTC (permalink / raw)
To: Bjorn Helgaas, Srikanth Thokala
Cc: Michal Simek, Grant Likely, Rob Herring, Srikanth Thokala,
Arnd Bergmann, linux-pci, kernel-janitors
We should be testing "hwirq" instead of "irq". "irq" is unsigned so
it's never less than zero. Also it's uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index 44f8944..ccc496b 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip *chip,
phys_addr_t msg_addr;
hwirq = xilinx_pcie_assign_msi(port);
- if (irq < 0)
- return irq;
+ if (hwirq < 0)
+ return hwirq;
irq = irq_create_mapping(port->irq_domain, hwirq);
if (!irq)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [patch] PCI: xilinx: testing wrong variable in setup irq function
2014-09-09 12:11 ` Dan Carpenter
@ 2014-09-09 12:31 ` Srikanth Thokala
-1 siblings, 0 replies; 6+ messages in thread
From: Srikanth Thokala @ 2014-09-09 12:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bjorn Helgaas, Michal Simek, Grant Likely, Rob Herring,
Arnd Bergmann, linux-pci@vger.kernel.org,
kernel-janitors@vger.kernel.org
Hi Dan,
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Tuesday, September 09, 2014 5:42 PM
> To: Bjorn Helgaas; Srikanth Thokala
> Cc: Michal Simek; Grant Likely; Rob Herring; Srikanth Thokala; Arnd Bergmann;
> linux-pci@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] PCI: xilinx: testing wrong variable in setup irq function
>
> We should be testing "hwirq" instead of "irq". "irq" is unsigned so it's never less
> than zero. Also it's uninitialized.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index
> 44f8944..ccc496b 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip
> *chip,
> phys_addr_t msg_addr;
>
> hwirq = xilinx_pcie_assign_msi(port);
> - if (irq < 0)
> - return irq;
> + if (hwirq < 0)
> + return hwirq;
It is a typo from my end, thanks for sending this patch.
Really thanks for helping to improve this.
Acked-by: Srikanth Thokala <sthokal@xilinx.com>
- Srikanth
>
> irq = irq_create_mapping(port->irq_domain, hwirq);
> if (!irq)
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [patch] PCI: xilinx: testing wrong variable in setup irq function
@ 2014-09-09 12:31 ` Srikanth Thokala
0 siblings, 0 replies; 6+ messages in thread
From: Srikanth Thokala @ 2014-09-09 12:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bjorn Helgaas, Michal Simek, Grant Likely, Rob Herring,
Arnd Bergmann, linux-pci@vger.kernel.org,
kernel-janitors@vger.kernel.org
Hi Dan,
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Tuesday, September 09, 2014 5:42 PM
> To: Bjorn Helgaas; Srikanth Thokala
> Cc: Michal Simek; Grant Likely; Rob Herring; Srikanth Thokala; Arnd Bergmann;
> linux-pci@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] PCI: xilinx: testing wrong variable in setup irq function
>
> We should be testing "hwirq" instead of "irq". "irq" is unsigned so it's never less
> than zero. Also it's uninitialized.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index
> 44f8944..ccc496b 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip
> *chip,
> phys_addr_t msg_addr;
>
> hwirq = xilinx_pcie_assign_msi(port);
> - if (irq < 0)
> - return irq;
> + if (hwirq < 0)
> + return hwirq;
It is a typo from my end, thanks for sending this patch.
Really thanks for helping to improve this.
Acked-by: Srikanth Thokala <sthokal@xilinx.com>
- Srikanth
>
> irq = irq_create_mapping(port->irq_domain, hwirq);
> if (!irq)
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] PCI: xilinx: testing wrong variable in setup irq function
2014-09-09 12:11 ` Dan Carpenter
@ 2014-09-16 23:47 ` Bjorn Helgaas
-1 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2014-09-16 23:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: Srikanth Thokala, Michal Simek, Grant Likely, Rob Herring,
Arnd Bergmann, linux-pci, kernel-janitors
On Tue, Sep 09, 2014 at 03:11:50PM +0300, Dan Carpenter wrote:
> We should be testing "hwirq" instead of "irq". "irq" is unsigned so
> it's never less than zero. Also it's uninitialized.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied with Srikanth's ack to pci/host-xilinx for v3.18, thanks.
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index 44f8944..ccc496b 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip *chip,
> phys_addr_t msg_addr;
>
> hwirq = xilinx_pcie_assign_msi(port);
> - if (irq < 0)
> - return irq;
> + if (hwirq < 0)
> + return hwirq;
>
> irq = irq_create_mapping(port->irq_domain, hwirq);
> if (!irq)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] PCI: xilinx: testing wrong variable in setup irq function
@ 2014-09-16 23:47 ` Bjorn Helgaas
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2014-09-16 23:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: Srikanth Thokala, Michal Simek, Grant Likely, Rob Herring,
Arnd Bergmann, linux-pci, kernel-janitors
On Tue, Sep 09, 2014 at 03:11:50PM +0300, Dan Carpenter wrote:
> We should be testing "hwirq" instead of "irq". "irq" is unsigned so
> it's never less than zero. Also it's uninitialized.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied with Srikanth's ack to pci/host-xilinx for v3.18, thanks.
>
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index 44f8944..ccc496b 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip *chip,
> phys_addr_t msg_addr;
>
> hwirq = xilinx_pcie_assign_msi(port);
> - if (irq < 0)
> - return irq;
> + if (hwirq < 0)
> + return hwirq;
>
> irq = irq_create_mapping(port->irq_domain, hwirq);
> if (!irq)
^ permalink raw reply [flat|nested] 6+ messages in thread