Patchwork [29/37] powerpc: mpc5121_ads_cpld: remove use of NO_IRQ_IGNORE

login
register
mail settings
Submitter Milton Miller
Date May 11, 2011, 5:30 a.m.
Message ID <ddef30cc215715662c6e997f9e82e8d79d1c4582.1305092637.git.miltonm@bga.com>
Download mbox | patch
Permalink /patch/95082/
State Accepted
Commit c42385cd4533b5ba9b9dd0034285cfcfd7982708
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Milton Miller - May 11, 2011, 5:30 a.m.
As NO_IRQ_IGNORE is only used between the static function cpld_pic_get_irq
and its caller cpld_pic_cascade, and cpld_pic_cascade only uses it to
suppress calling handle_generic_irq, we can change these uses to NO_IRQ
and remove the extra tests and pathlength in cpld_pic_cascade.

Signed-off-by: Milton Miller <miltonm@bga.com>
---
---
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Grant Likely - May 11, 2011, 7:07 p.m.
On Wed, May 11, 2011 at 7:30 AM, Milton Miller <miltonm@bga.com> wrote:
> As NO_IRQ_IGNORE is only used between the static function cpld_pic_get_irq
> and its caller cpld_pic_cascade, and cpld_pic_cascade only uses it to
> suppress calling handle_generic_irq, we can change these uses to NO_IRQ
> and remove the extra tests and pathlength in cpld_pic_cascade.
>
> Signed-off-by: Milton Miller <miltonm@bga.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> ---
>  arch/powerpc/platforms/512x/mpc5121_ads_cpld.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
> index a8bc0d4..9f09319 100644
> --- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
> +++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
> @@ -97,7 +97,7 @@ cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem *statusp,
>        status |= (ignore | mask);
>
>        if (status == 0xff)
> -               return NO_IRQ_IGNORE;
> +               return NO_IRQ;
>
>        cpld_irq = ffz(status) + offset;
>
> @@ -109,14 +109,14 @@ cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
>  {
>        irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status,
>                &cpld_regs->pci_mask);
> -       if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
> +       if (irq != NO_IRQ) {
>                generic_handle_irq(irq);
>                return;
>        }
>
>        irq = cpld_pic_get_irq(8, MISC_IGNORE, &cpld_regs->misc_status,
>                &cpld_regs->misc_mask);
> -       if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
> +       if (irq != NO_IRQ) {
>                generic_handle_irq(irq);
>                return;
>        }
> --
> 1.7.0.4
>
>

Patch

diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
index a8bc0d4..9f09319 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -97,7 +97,7 @@  cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem *statusp,
 	status |= (ignore | mask);
 
 	if (status == 0xff)
-		return NO_IRQ_IGNORE;
+		return NO_IRQ;
 
 	cpld_irq = ffz(status) + offset;
 
@@ -109,14 +109,14 @@  cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
 {
 	irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status,
 		&cpld_regs->pci_mask);
-	if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
+	if (irq != NO_IRQ) {
 		generic_handle_irq(irq);
 		return;
 	}
 
 	irq = cpld_pic_get_irq(8, MISC_IGNORE, &cpld_regs->misc_status,
 		&cpld_regs->misc_mask);
-	if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
+	if (irq != NO_IRQ) {
 		generic_handle_irq(irq);
 		return;
 	}