powerpc: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
authorJiang Liu <jiang.liu@linux.intel.com>
Wed, 20 May 2015 09:59:52 +0000 (17:59 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 2 Jun 2015 06:54:44 +0000 (16:54 +1000)
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
arch/powerpc/sysdev/uic.c
arch/powerpc/sysdev/xics/xics-common.c

index c949ca055712be9c6bbe5ff4ed808d2d640a434a..63016621aff8af4807b37ed7af2a7ee078755e4b 100644 (file)
@@ -193,7 +193,7 @@ static struct irq_chip mpc52xx_gpt_irq_chip = {
 
 void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc)
 {
-       struct mpc52xx_gpt_priv *gpt = irq_get_handler_data(virq);
+       struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc);
        int sub_virq;
        u32 status;
 
index d9b8a443458f04b5b6ab4bc3c174daa09f786068..fe51de4fcf135a1d1b355efcd8c20915c3a1b80e 100644 (file)
@@ -96,7 +96,7 @@ static void msic_dcr_write(struct axon_msic *msic, unsigned int dcr_n, u32 val)
 static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
 {
        struct irq_chip *chip = irq_desc_get_chip(desc);
-       struct axon_msic *msic = irq_get_handler_data(irq);
+       struct axon_msic *msic = irq_desc_get_handler_data(desc);
        u32 write_offset, msi;
        int idx;
        int retry = 0;
index c269caee58f9486f6e260cf67367cb501820642c..9dd154d6f89a9205aa33eff33930e2cb0efc3397 100644 (file)
@@ -124,7 +124,7 @@ static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
                                      struct irq_desc *desc)
 {
        struct irq_chip *chip = irq_desc_get_chip(desc);
-       struct irq_domain *irq_domain = irq_get_handler_data(cascade_virq);
+       struct irq_domain *irq_domain = irq_desc_get_handler_data(desc);
        unsigned int virq;
 
        raw_spin_lock(&desc->lock);
index 1cd057f117259d9b759859c53ee145d80d6e4dae..d77345338671c1d63b5a98d3258885d9d3aa2b98 100644 (file)
@@ -198,7 +198,7 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
 {
        struct irq_chip *chip = irq_desc_get_chip(desc);
        struct irq_data *idata = irq_desc_get_irq_data(desc);
-       struct uic *uic = irq_get_handler_data(virq);
+       struct uic *uic = irq_desc_get_handler_data(desc);
        u32 msr;
        int src;
        int subvirq;
index 5bc5889d4accb0179398a209fd928725f88dedd3..08c248eb491bad53e82afe28a73b510d4aa87f86 100644 (file)
@@ -227,7 +227,7 @@ void xics_migrate_irqs_away(void)
 
                /* Locate interrupt server */
                server = -1;
-               ics = irq_get_chip_data(virq);
+               ics = irq_desc_get_chip_data(desc);
                if (ics)
                        server = ics->get_server(ics, irq);
                if (server < 0) {