* [PATCH 1/4] block: xsysace: Don't use NO_IRQ
@ 2011-12-21 14:32 Michal Simek
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-21 14:32 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, devicetree-discuss, Michal Simek, Grant Likely,
Rob Herring, Ryan Mallon
Drivers shouldn't use NO_IRQ. Microblaze and PPC
define NO_IRQ as 0 and this reference will be removed
in near future.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Rob Herring <rob.herring@calxeda.com>
CC: Ryan Mallon <rmallon@gmail.com>
---
drivers/block/xsysace.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index fb1975d..1a17e33 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -456,7 +456,7 @@ static inline void ace_fsm_yieldirq(struct ace_device *ace)
{
dev_dbg(ace->dev, "ace_fsm_yieldirq()\n");
- if (ace->irq == NO_IRQ)
+ if (!ace->irq)
/* No IRQ assigned, so need to poll */
tasklet_schedule(&ace->fsm_tasklet);
ace->fsm_continue_flag = 0;
@@ -1034,12 +1034,12 @@ static int __devinit ace_setup(struct ace_device *ace)
ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ);
/* Now we can hook up the irq handler */
- if (ace->irq != NO_IRQ) {
+ if (ace->irq) {
rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace);
if (rc) {
/* Failure - fall back to polled mode */
dev_err(ace->dev, "request_irq failed\n");
- ace->irq = NO_IRQ;
+ ace->irq = 0;
}
}
@@ -1086,7 +1086,7 @@ static void __devexit ace_teardown(struct ace_device *ace)
tasklet_kill(&ace->fsm_tasklet);
- if (ace->irq != NO_IRQ)
+ if (ace->irq)
free_irq(ace->irq, ace);
iounmap(ace->baseaddr);
@@ -1156,7 +1156,7 @@ static int __devinit ace_probe(struct platform_device *dev)
resource_size_t physaddr = 0;
int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
u32 id = dev->id;
- int irq = NO_IRQ;
+ int irq = 0;
int i;
dev_dbg(&dev->dev, "ace_probe(%p)\n", dev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx
2011-12-21 14:32 [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
@ 2011-12-21 14:32 ` Michal Simek
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
` (2 more replies)
2011-12-29 9:27 ` [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
2012-01-02 8:21 ` Grant Likely
2 siblings, 3 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-21 14:32 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, devicetree-discuss, Michal Simek, David S. Miller,
Stephen Rothwell, Grant Likely, Ryan Mallon
Fix ll_temac and emaclite drivers. Only Microblaze and Xilinx PPC
use then and both use NO_IRQ as 0. It will be removed in near future.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: "David S. Miller" <davem@davemloft.net> (commit_signer:7/10=70%)
CC: Stephen Rothwell <sfr@canb.auug.org.au> (commit_signer:1/10=10%)
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Ryan Mallon <rmallon@gmail.com>
---
drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 2681b53..87775d7 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1077,7 +1077,7 @@ static int __devinit temac_of_probe(struct platform_device *op)
of_node_put(np); /* Finished with the DMA node; drop the reference */
- if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) {
+ if (!lp->rx_irq || !lp->tx_irq) {
dev_err(&op->dev, "could not determine irqs\n");
rc = -ENOMEM;
goto err_iounmap_2;
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 8018d7d..252edf7 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1129,7 +1129,7 @@ static int __devinit xemaclite_of_probe(struct platform_device *ofdev)
/* Get IRQ for the device */
rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
- if (rc == NO_IRQ) {
+ if (!rc) {
dev_err(dev, "no IRQ found\n");
return rc;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
@ 2011-12-21 14:32 ` Michal Simek
2011-12-21 14:32 ` [PATCH 4/4] microblaze: Remove NO_IRQ from architecture Michal Simek
2012-01-02 8:21 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Grant Likely
2011-12-21 20:43 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx David Miller
2012-01-02 8:21 ` Grant Likely
2 siblings, 2 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-21 14:32 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, devicetree-discuss, Michal Simek, Grant Likely,
Rob Herring, Ryan Mallon
Drivers shouldn't use NO_IRQ. Microblaze and PPC
define NO_IRQ as 0 and this reference will be removed
in near future.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Rob Herring <rob.herring@calxeda.com>
CC: Ryan Mallon <rmallon@gmail.com>
---
drivers/input/serio/xilinx_ps2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index d64c5a4..f3e54b9 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -253,7 +253,7 @@ static int __devinit xps2_of_probe(struct platform_device *ofdev)
}
/* Get IRQ for the device */
- if (of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq) == NO_IRQ) {
+ if (!of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq)) {
dev_err(dev, "no IRQ found\n");
return -ENODEV;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] microblaze: Remove NO_IRQ from architecture
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
@ 2011-12-21 14:32 ` Michal Simek
2011-12-21 22:09 ` Ryan Mallon
2012-01-02 8:22 ` Grant Likely
2012-01-02 8:21 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Grant Likely
1 sibling, 2 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-21 14:32 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, devicetree-discuss, Michal Simek, Grant Likely,
Benjamin Herrenschmidt, Ryan Mallon
NO_IRQ shouldn't be used by any driver. All Microblaze
drivers are fixed that's why NO_IRQ can be removed.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Ryan Mallon <rmallon@gmail.com>
---
arch/microblaze/include/asm/irq.h | 2 --
arch/microblaze/pci/pci-common.c | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h
index b116a82..a175132 100644
--- a/arch/microblaze/include/asm/irq.h
+++ b/arch/microblaze/include/asm/irq.h
@@ -27,8 +27,6 @@ typedef unsigned long irq_hw_number_t;
extern unsigned int nr_irq;
-#define NO_IRQ 0
-
struct pt_regs;
extern void do_IRQ(struct pt_regs *regs);
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index db841c7..0d71b2e 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -242,7 +242,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
line, pin);
virq = irq_create_mapping(NULL, line);
- if (virq != NO_IRQ)
+ if (virq)
irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
} else {
pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
@@ -253,7 +253,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size);
}
- if (virq == NO_IRQ) {
+ if (!virq) {
pr_debug(" Failed to map !\n");
return -1;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
@ 2011-12-21 20:43 ` David Miller
2012-01-02 8:21 ` Grant Likely
2 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2011-12-21 20:43 UTC (permalink / raw)
To: monstr
Cc: linux-kernel, netdev, devicetree-discuss, sfr, grant.likely, rmallon
From: Michal Simek <monstr@monstr.eu>
Date: Wed, 21 Dec 2011 15:32:10 +0100
> Fix ll_temac and emaclite drivers. Only Microblaze and Xilinx PPC
> use then and both use NO_IRQ as 0. It will be removed in near future.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
Applied, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] microblaze: Remove NO_IRQ from architecture
2011-12-21 14:32 ` [PATCH 4/4] microblaze: Remove NO_IRQ from architecture Michal Simek
@ 2011-12-21 22:09 ` Ryan Mallon
2011-12-22 8:06 ` Michal Simek
2012-01-02 8:22 ` Grant Likely
1 sibling, 1 reply; 12+ messages in thread
From: Ryan Mallon @ 2011-12-21 22:09 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, netdev, devicetree-discuss, Grant Likely,
Benjamin Herrenschmidt
On 22/12/11 01:32, Michal Simek wrote:
> NO_IRQ shouldn't be used by any driver. All Microblaze
> drivers are fixed that's why NO_IRQ can be removed.
This only describes half of what the patch does. You should also state
that arch/microblaze/pci/pci-common.c has references to NO_IRQ removed.
Maybe it' worth splitting this patch in half so the final patch just
does the removal of the NO_IRQ definition, but maybe that is overkill?
Other than that, for the whole series:
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Ryan Mallon <rmallon@gmail.com>
> ---
> arch/microblaze/include/asm/irq.h | 2 --
> arch/microblaze/pci/pci-common.c | 4 ++--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h
> index b116a82..a175132 100644
> --- a/arch/microblaze/include/asm/irq.h
> +++ b/arch/microblaze/include/asm/irq.h
> @@ -27,8 +27,6 @@ typedef unsigned long irq_hw_number_t;
>
> extern unsigned int nr_irq;
>
> -#define NO_IRQ 0
> -
> struct pt_regs;
> extern void do_IRQ(struct pt_regs *regs);
>
> diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
> index db841c7..0d71b2e 100644
> --- a/arch/microblaze/pci/pci-common.c
> +++ b/arch/microblaze/pci/pci-common.c
> @@ -242,7 +242,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
> line, pin);
>
> virq = irq_create_mapping(NULL, line);
> - if (virq != NO_IRQ)
> + if (virq)
> irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
> } else {
> pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
> @@ -253,7 +253,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
> virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
> oirq.size);
> }
> - if (virq == NO_IRQ) {
> + if (!virq) {
> pr_debug(" Failed to map !\n");
> return -1;
> }
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] microblaze: Remove NO_IRQ from architecture
2011-12-21 22:09 ` Ryan Mallon
@ 2011-12-22 8:06 ` Michal Simek
0 siblings, 0 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-22 8:06 UTC (permalink / raw)
To: Ryan Mallon
Cc: linux-kernel, netdev, devicetree-discuss, Grant Likely,
Benjamin Herrenschmidt
Ryan Mallon wrote:
> On 22/12/11 01:32, Michal Simek wrote:
>
>> NO_IRQ shouldn't be used by any driver. All Microblaze
>> drivers are fixed that's why NO_IRQ can be removed.
>
>
> This only describes half of what the patch does. You should also state
> that arch/microblaze/pci/pci-common.c has references to NO_IRQ removed.
> Maybe it' worth splitting this patch in half so the final patch just
> does the removal of the NO_IRQ definition, but maybe that is overkill?
I have decided to remove NO_IRQ from arch/microblaze in one patch.
It is less painful because if there is any problem with PCI you can revert
just one patch instead of two.
Drivers out of arch/microblaze must be in separate patches.
> Other than that, for the whole series:
>
> Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] block: xsysace: Don't use NO_IRQ
2011-12-21 14:32 [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
@ 2011-12-29 9:27 ` Michal Simek
2012-01-02 8:21 ` Grant Likely
2 siblings, 0 replies; 12+ messages in thread
From: Michal Simek @ 2011-12-29 9:27 UTC (permalink / raw)
To: linux-kernel
Cc: netdev, devicetree-discuss, Grant Likely, Rob Herring, Ryan Mallon
Michal Simek wrote:
> Drivers shouldn't use NO_IRQ. Microblaze and PPC
> define NO_IRQ as 0 and this reference will be removed
> in near future.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Rob Herring <rob.herring@calxeda.com>
> CC: Ryan Mallon <rmallon@gmail.com>
> ---
> drivers/block/xsysace.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
Grant: Can you give me your ACK?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] block: xsysace: Don't use NO_IRQ
2011-12-21 14:32 [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
2011-12-29 9:27 ` [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
@ 2012-01-02 8:21 ` Grant Likely
2 siblings, 0 replies; 12+ messages in thread
From: Grant Likely @ 2012-01-02 8:21 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, netdev, devicetree-discuss, Rob Herring, Ryan Mallon
On Wed, Dec 21, 2011 at 03:32:09PM +0100, Michal Simek wrote:
> Drivers shouldn't use NO_IRQ. Microblaze and PPC
> define NO_IRQ as 0 and this reference will be removed
> in near future.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Rob Herring <rob.herring@calxeda.com>
> CC: Ryan Mallon <rmallon@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> drivers/block/xsysace.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
> index fb1975d..1a17e33 100644
> --- a/drivers/block/xsysace.c
> +++ b/drivers/block/xsysace.c
> @@ -456,7 +456,7 @@ static inline void ace_fsm_yieldirq(struct ace_device *ace)
> {
> dev_dbg(ace->dev, "ace_fsm_yieldirq()\n");
>
> - if (ace->irq == NO_IRQ)
> + if (!ace->irq)
> /* No IRQ assigned, so need to poll */
> tasklet_schedule(&ace->fsm_tasklet);
> ace->fsm_continue_flag = 0;
> @@ -1034,12 +1034,12 @@ static int __devinit ace_setup(struct ace_device *ace)
> ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ);
>
> /* Now we can hook up the irq handler */
> - if (ace->irq != NO_IRQ) {
> + if (ace->irq) {
> rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace);
> if (rc) {
> /* Failure - fall back to polled mode */
> dev_err(ace->dev, "request_irq failed\n");
> - ace->irq = NO_IRQ;
> + ace->irq = 0;
> }
> }
>
> @@ -1086,7 +1086,7 @@ static void __devexit ace_teardown(struct ace_device *ace)
>
> tasklet_kill(&ace->fsm_tasklet);
>
> - if (ace->irq != NO_IRQ)
> + if (ace->irq)
> free_irq(ace->irq, ace);
>
> iounmap(ace->baseaddr);
> @@ -1156,7 +1156,7 @@ static int __devinit ace_probe(struct platform_device *dev)
> resource_size_t physaddr = 0;
> int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
> u32 id = dev->id;
> - int irq = NO_IRQ;
> + int irq = 0;
> int i;
>
> dev_dbg(&dev->dev, "ace_probe(%p)\n", dev);
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
2011-12-21 20:43 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx David Miller
@ 2012-01-02 8:21 ` Grant Likely
2 siblings, 0 replies; 12+ messages in thread
From: Grant Likely @ 2012-01-02 8:21 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, netdev, devicetree-discuss, David S. Miller,
Stephen Rothwell, Ryan Mallon
On Wed, Dec 21, 2011 at 03:32:10PM +0100, Michal Simek wrote:
> Fix ll_temac and emaclite drivers. Only Microblaze and Xilinx PPC
> use then and both use NO_IRQ as 0. It will be removed in near future.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: "David S. Miller" <davem@davemloft.net> (commit_signer:7/10=70%)
> CC: Stephen Rothwell <sfr@canb.auug.org.au> (commit_signer:1/10=10%)
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Ryan Mallon <rmallon@gmail.com>
> ---
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
> drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
> index 2681b53..87775d7 100644
> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
> @@ -1077,7 +1077,7 @@ static int __devinit temac_of_probe(struct platform_device *op)
>
> of_node_put(np); /* Finished with the DMA node; drop the reference */
>
> - if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) {
> + if (!lp->rx_irq || !lp->tx_irq) {
> dev_err(&op->dev, "could not determine irqs\n");
> rc = -ENOMEM;
> goto err_iounmap_2;
> diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> index 8018d7d..252edf7 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> @@ -1129,7 +1129,7 @@ static int __devinit xemaclite_of_probe(struct platform_device *ofdev)
>
> /* Get IRQ for the device */
> rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
> - if (rc == NO_IRQ) {
> + if (!rc) {
> dev_err(dev, "no IRQ found\n");
> return rc;
> }
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
2011-12-21 14:32 ` [PATCH 4/4] microblaze: Remove NO_IRQ from architecture Michal Simek
@ 2012-01-02 8:21 ` Grant Likely
1 sibling, 0 replies; 12+ messages in thread
From: Grant Likely @ 2012-01-02 8:21 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, netdev, devicetree-discuss, Rob Herring, Ryan Mallon
On Wed, Dec 21, 2011 at 03:32:11PM +0100, Michal Simek wrote:
> Drivers shouldn't use NO_IRQ. Microblaze and PPC
> define NO_IRQ as 0 and this reference will be removed
> in near future.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Rob Herring <rob.herring@calxeda.com>
> CC: Ryan Mallon <rmallon@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> drivers/input/serio/xilinx_ps2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
> index d64c5a4..f3e54b9 100644
> --- a/drivers/input/serio/xilinx_ps2.c
> +++ b/drivers/input/serio/xilinx_ps2.c
> @@ -253,7 +253,7 @@ static int __devinit xps2_of_probe(struct platform_device *ofdev)
> }
>
> /* Get IRQ for the device */
> - if (of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq) == NO_IRQ) {
> + if (!of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq)) {
> dev_err(dev, "no IRQ found\n");
> return -ENODEV;
> }
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] microblaze: Remove NO_IRQ from architecture
2011-12-21 14:32 ` [PATCH 4/4] microblaze: Remove NO_IRQ from architecture Michal Simek
2011-12-21 22:09 ` Ryan Mallon
@ 2012-01-02 8:22 ` Grant Likely
1 sibling, 0 replies; 12+ messages in thread
From: Grant Likely @ 2012-01-02 8:22 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, netdev, devicetree-discuss, Benjamin Herrenschmidt,
Ryan Mallon
On Wed, Dec 21, 2011 at 03:32:12PM +0100, Michal Simek wrote:
> NO_IRQ shouldn't be used by any driver. All Microblaze
> drivers are fixed that's why NO_IRQ can be removed.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Ryan Mallon <rmallon@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/microblaze/include/asm/irq.h | 2 --
> arch/microblaze/pci/pci-common.c | 4 ++--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h
> index b116a82..a175132 100644
> --- a/arch/microblaze/include/asm/irq.h
> +++ b/arch/microblaze/include/asm/irq.h
> @@ -27,8 +27,6 @@ typedef unsigned long irq_hw_number_t;
>
> extern unsigned int nr_irq;
>
> -#define NO_IRQ 0
> -
> struct pt_regs;
> extern void do_IRQ(struct pt_regs *regs);
>
> diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
> index db841c7..0d71b2e 100644
> --- a/arch/microblaze/pci/pci-common.c
> +++ b/arch/microblaze/pci/pci-common.c
> @@ -242,7 +242,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
> line, pin);
>
> virq = irq_create_mapping(NULL, line);
> - if (virq != NO_IRQ)
> + if (virq)
> irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
> } else {
> pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
> @@ -253,7 +253,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
> virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
> oirq.size);
> }
> - if (virq == NO_IRQ) {
> + if (!virq) {
> pr_debug(" Failed to map !\n");
> return -1;
> }
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-01-02 8:22 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 14:32 [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
2011-12-21 14:32 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx Michal Simek
2011-12-21 14:32 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Michal Simek
2011-12-21 14:32 ` [PATCH 4/4] microblaze: Remove NO_IRQ from architecture Michal Simek
2011-12-21 22:09 ` Ryan Mallon
2011-12-22 8:06 ` Michal Simek
2012-01-02 8:22 ` Grant Likely
2012-01-02 8:21 ` [PATCH 3/4] input: xilinx_ps2: Don't use NO_IRQ Grant Likely
2011-12-21 20:43 ` [PATCH 2/4] net: ethernet: xilinx: Don't use NO_IRQ in xilinx David Miller
2012-01-02 8:21 ` Grant Likely
2011-12-29 9:27 ` [PATCH 1/4] block: xsysace: Don't use NO_IRQ Michal Simek
2012-01-02 8:21 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).