irqchip/atmel-aic: Change return type of aic_common_set_priority()
authorMilo Kim <milo.kim@ti.com>
Wed, 13 Jan 2016 07:19:51 +0000 (16:19 +0900)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 8 Feb 2016 14:03:42 +0000 (15:03 +0100)
Priority validation is not necessary because aic_common_irq_domain_xlate()
already handles it. With this removal, return type can be changed to void.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: Nicholas Ferre <nicolas.ferre@atmel.com>
Link: http://lkml.kernel.org/r/1452669592-3401-3-git-send-email-milo.kim@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/irqchip/irq-atmel-aic-common.c
drivers/irqchip/irq-atmel-aic-common.h
drivers/irqchip/irq-atmel-aic.c
drivers/irqchip/irq-atmel-aic5.c

index 661840b5d5530ed6d715b5e0ea18e51bc7902d24..28b26c80f4cf937b8547328b5d724a69e51b7d05 100644 (file)
@@ -80,16 +80,10 @@ int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val)
        return 0;
 }
 
-int aic_common_set_priority(int priority, unsigned *val)
+void aic_common_set_priority(int priority, unsigned *val)
 {
-       if (priority < AT91_AIC_IRQ_MIN_PRIORITY ||
-           priority > AT91_AIC_IRQ_MAX_PRIORITY)
-               return -EINVAL;
-
        *val &= ~AT91_AIC_PRIOR;
        *val |= priority;
-
-       return 0;
 }
 
 int aic_common_irq_domain_xlate(struct irq_domain *d,
index 046bcc88205bfd88f10946836b06cc73679fa2b7..af60376d50debe30132acd00c58254c4d1a7ab9a 100644 (file)
@@ -19,7 +19,7 @@
 
 int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val);
 
-int aic_common_set_priority(int priority, unsigned *val);
+void aic_common_set_priority(int priority, unsigned *val);
 
 int aic_common_irq_domain_xlate(struct irq_domain *d,
                                struct device_node *ctrlr,
index 799834de276afe81ab4b457ddf5ae8d5a7124671..112e17c2768be06587d340865ade9fe202adc7da 100644 (file)
@@ -196,9 +196,8 @@ static int aic_irq_domain_xlate(struct irq_domain *d,
 
        irq_gc_lock(gc);
        smr = irq_reg_readl(gc, AT91_AIC_SMR(*out_hwirq));
-       ret = aic_common_set_priority(intspec[2], &smr);
-       if (!ret)
-               irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));
+       aic_common_set_priority(intspec[2], &smr);
+       irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));
        irq_gc_unlock(gc);
 
        return ret;
index a7e8fc81c80c80004c779a7e27c2f703d207d551..f36f426edc62e61baad836e89285da5d78975347 100644 (file)
@@ -272,9 +272,8 @@ static int aic5_irq_domain_xlate(struct irq_domain *d,
        irq_gc_lock(bgc);
        irq_reg_writel(bgc, *out_hwirq, AT91_AIC5_SSR);
        smr = irq_reg_readl(bgc, AT91_AIC5_SMR);
-       ret = aic_common_set_priority(intspec[2], &smr);
-       if (!ret)
-               irq_reg_writel(bgc, intspec[2] | smr, AT91_AIC5_SMR);
+       aic_common_set_priority(intspec[2], &smr);
+       irq_reg_writel(bgc, intspec[2] | smr, AT91_AIC5_SMR);
        irq_gc_unlock(bgc);
 
        return ret;