All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/9] mfd: Interrupt cleanups and API change preparation
@ 2015-07-13 20:44 Thomas Gleixner
  2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
                   ` (10 more replies)
  0 siblings, 11 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz

The following patch series contains the following changes:

    - Consolidation of chained interrupt handler setup/removal

    - Switch to functions which avoid a redundant interrupt
      descriptor lookup

    - Preparation of interrupt flow handlers for the 'irq' argument
      removal

The series has no dependencies and is also available as a git branch
for your convenience:

 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/mfd

If you want me to carry the patches in the irq/core branch of tip,
please let me know.

Thanks,

	tglx




^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 1/9] " Lee Jones
  2015-07-13 20:44 ` [patch 2/9] mfd/htc-egpio: " Thomas Gleixner
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-ezx-pcap-Consolidate-chained-IRQ-handler-install.patch --]
[-- Type: text/plain, Size: 1048 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ezx-pcap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: tip/drivers/mfd/ezx-pcap.c
===================================================================
--- tip.orig/drivers/mfd/ezx-pcap.c
+++ tip/drivers/mfd/ezx-pcap.c
@@ -476,8 +476,7 @@ static int ezx_pcap_probe(struct spi_dev
 	pcap->msr = PCAP_MASK_ALL_INTERRUPT;
 
 	irq_set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING);
-	irq_set_handler_data(spi->irq, pcap);
-	irq_set_chained_handler(spi->irq, pcap_irq_handler);
+	irq_set_chained_handler_and_data(spi->irq, pcap_irq_handler, pcap);
 	irq_set_irq_wake(spi->irq, 1);
 
 	/* ADC */



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 2/9] mfd/htc-egpio: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
  2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 2/9] " Lee Jones
  2015-07-13 20:44 ` [patch 3/9] mfd/jz4740: " Thomas Gleixner
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-htc-egpio-Consolidate-chained-IRQ-handler-instal.patch --]
[-- Type: text/plain, Size: 1107 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle:

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/htc-egpio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/drivers/mfd/htc-egpio.c
===================================================================
--- tip.orig/drivers/mfd/htc-egpio.c
+++ tip/drivers/mfd/htc-egpio.c
@@ -353,8 +353,8 @@ static int __init egpio_probe(struct pla
 			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 		}
 		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
-		irq_set_handler_data(ei->chained_irq, ei);
-		irq_set_chained_handler(ei->chained_irq, egpio_handler);
+		irq_set_chained_handler_and_data(ei->chained_irq,
+						 egpio_handler, ei);
 		ack_irqs(ei);
 
 		device_init_wakeup(&pdev->dev, 1);



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 3/9] mfd/jz4740: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
  2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
  2015-07-13 20:44 ` [patch 2/9] mfd/htc-egpio: " Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 3/9] " Lee Jones
  2015-07-13 20:44 ` [patch 4/9] mfd/pm8921: " Thomas Gleixner
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-jz4740-Consolidate-chained-IRQ-handler-install-r.patch --]
[-- Type: text/plain, Size: 1424 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle:

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/jz4740-adc.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: tip/drivers/mfd/jz4740-adc.c
===================================================================
--- tip.orig/drivers/mfd/jz4740-adc.c
+++ tip/drivers/mfd/jz4740-adc.c
@@ -277,8 +277,7 @@ static int jz4740_adc_probe(struct platf
 
 	adc->gc = gc;
 
-	irq_set_handler_data(adc->irq, gc);
-	irq_set_chained_handler(adc->irq, jz4740_adc_irq_demux);
+	irq_set_chained_handler_and_data(adc->irq, jz4740_adc_irq_demux, gc);
 
 	writeb(0x00, adc->base + JZ_REG_ADC_ENABLE);
 	writeb(0xff, adc->base + JZ_REG_ADC_CTRL);
@@ -308,8 +307,7 @@ static int jz4740_adc_remove(struct plat
 
 	irq_remove_generic_chip(adc->gc, IRQ_MSK(5), IRQ_NOPROBE | IRQ_LEVEL, 0);
 	kfree(adc->gc);
-	irq_set_handler_data(adc->irq, NULL);
-	irq_set_chained_handler(adc->irq, NULL);
+	irq_set_chained_handler_and_data(adc->irq, NULL, NULL);
 
 	iounmap(adc->base);
 	release_mem_region(adc->mem->start, resource_size(adc->mem));



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 4/9] mfd/pm8921: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (2 preceding siblings ...)
  2015-07-13 20:44 ` [patch 3/9] mfd/jz4740: " Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 4/9] " Lee Jones
  2015-07-13 20:44 ` [patch 5/9] mfd/t7l66xb: " Thomas Gleixner
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-pm8921-Consolidate-chained-IRQ-handler-install-r.patch --]
[-- Type: text/plain, Size: 1564 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/pm8921-core.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Index: tip/drivers/mfd/pm8921-core.c
===================================================================
--- tip.orig/drivers/mfd/pm8921-core.c
+++ tip/drivers/mfd/pm8921-core.c
@@ -336,14 +336,12 @@ static int pm8921_probe(struct platform_
 	if (!chip->irqdomain)
 		return -ENODEV;
 
-	irq_set_handler_data(irq, chip);
-	irq_set_chained_handler(irq, pm8xxx_irq_handler);
+	irq_set_chained_handler_and_data(irq, pm8xxx_irq_handler, chip);
 	irq_set_irq_wake(irq, 1);
 
 	rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
 	if (rc) {
-		irq_set_chained_handler(irq, NULL);
-		irq_set_handler_data(irq, NULL);
+		irq_set_chained_handler_and_data(irq, NULL, NULL);
 		irq_domain_remove(chip->irqdomain);
 	}
 
@@ -362,8 +360,7 @@ static int pm8921_remove(struct platform
 	struct pm_irq_chip *chip = platform_get_drvdata(pdev);
 
 	device_for_each_child(&pdev->dev, NULL, pm8921_remove_child);
-	irq_set_chained_handler(irq, NULL);
-	irq_set_handler_data(irq, NULL);
+	irq_set_chained_handler_and_data(irq, NULL, NULL);
 	irq_domain_remove(chip->irqdomain);
 
 	return 0;



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 5/9] mfd/t7l66xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (3 preceding siblings ...)
  2015-07-13 20:44 ` [patch 4/9] mfd/pm8921: " Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 5/9] " Lee Jones
  2015-07-13 20:44 ` [patch 6/9] mfd/tc6393xb: " Thomas Gleixner
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-t7l66xb-Consolidate-chained-IRQ-handler-install-.patch --]
[-- Type: text/plain, Size: 1382 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/t7l66xb.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: tip/drivers/mfd/t7l66xb.c
===================================================================
--- tip.orig/drivers/mfd/t7l66xb.c
+++ tip/drivers/mfd/t7l66xb.c
@@ -252,8 +252,7 @@ static void t7l66xb_attach_irq(struct pl
 	}
 
 	irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
-	irq_set_handler_data(t7l66xb->irq, t7l66xb);
-	irq_set_chained_handler(t7l66xb->irq, t7l66xb_irq);
+	irq_set_chained_handler_and_data(t7l66xb->irq, t7l66xb_irq, t7l66xb);
 }
 
 static void t7l66xb_detach_irq(struct platform_device *dev)
@@ -263,8 +262,7 @@ static void t7l66xb_detach_irq(struct pl
 
 	irq_base = t7l66xb->irq_base;
 
-	irq_set_chained_handler(t7l66xb->irq, NULL);
-	irq_set_handler_data(t7l66xb->irq, NULL);
+	irq_set_chained_handler_and_data(t7l66xb->irq, NULL, NULL);
 
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
 #ifdef CONFIG_ARM



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 6/9] mfd/tc6393xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (4 preceding siblings ...)
  2015-07-13 20:44 ` [patch 5/9] mfd/t7l66xb: " Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 6/9] " Lee Jones
  2015-07-13 20:44 ` [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
                   ` (4 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Russell King, Julia Lawall

[-- Attachment #1: mfd-tc6393xb-Consolidate-chained-IRQ-handler-install.patch --]
[-- Type: text/plain, Size: 1409 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/tc6393xb.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Index: tip/drivers/mfd/tc6393xb.c
===================================================================
--- tip.orig/drivers/mfd/tc6393xb.c
+++ tip/drivers/mfd/tc6393xb.c
@@ -590,8 +590,8 @@ static void tc6393xb_attach_irq(struct p
 	}
 
 	irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING);
-	irq_set_handler_data(tc6393xb->irq, tc6393xb);
-	irq_set_chained_handler(tc6393xb->irq, tc6393xb_irq);
+	irq_set_chained_handler_and_data(tc6393xb->irq, tc6393xb_irq,
+					 tc6393xb);
 }
 
 static void tc6393xb_detach_irq(struct platform_device *dev)
@@ -599,8 +599,7 @@ static void tc6393xb_detach_irq(struct p
 	struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
 	unsigned int irq, irq_base;
 
-	irq_set_chained_handler(tc6393xb->irq, NULL);
-	irq_set_handler_data(tc6393xb->irq, NULL);
+	irq_set_chained_handler_and_data(tc6393xb->irq, NULL, NULL);
 
 	irq_base = tc6393xb->irq_base;
 



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (5 preceding siblings ...)
  2015-07-13 20:44 ` [patch 6/9] mfd/tc6393xb: " Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Jiang Liu
  2015-07-28  8:05   ` [patch 7/9] " Lee Jones
  2015-07-13 20:44 ` [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal Thomas Gleixner
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz

[-- Attachment #1: mfd-Use-irq_desc_get_xxx-to-avoid-redundant-lookup-o.patch --]
[-- Type: text/plain, Size: 5512 bytes --]

From: Jiang Liu <jiang.liu@linux.intel.com>

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/ezx-pcap.c    |    2 +-
 drivers/mfd/max8997-irq.c |    8 ++++----
 drivers/mfd/mt6397-core.c |    8 ++++----
 drivers/mfd/t7l66xb.c     |    2 +-
 drivers/mfd/tc6393xb.c    |    2 +-
 drivers/mfd/twl6030-irq.c |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

Index: tip/drivers/mfd/ezx-pcap.c
===================================================================
--- tip.orig/drivers/mfd/ezx-pcap.c
+++ tip/drivers/mfd/ezx-pcap.c
@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_st
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct pcap_chip *pcap = irq_get_handler_data(irq);
+	struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
 
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
 	queue_work(pcap->workqueue, &pcap->isr_work);
Index: tip/drivers/mfd/max8997-irq.c
===================================================================
--- tip.orig/drivers/mfd/max8997-irq.c
+++ tip/drivers/mfd/max8997-irq.c
@@ -113,14 +113,14 @@ static const struct max8997_irq_data max
 
 static void max8997_irq_lock(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 
 	mutex_lock(&max8997->irqlock);
 }
 
 static void max8997_irq_sync_unlock(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	int i;
 
 	for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) {
@@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *m
 
 static void max8997_irq_mask(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
 								data->irq);
 
@@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_
 
 static void max8997_irq_unmask(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
 								data->irq);
 
Index: tip/drivers/mfd/mt6397-core.c
===================================================================
--- tip.orig/drivers/mfd/mt6397-core.c
+++ tip/drivers/mfd/mt6397-core.c
@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devs
 
 static void mt6397_irq_lock(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
 	mutex_lock(&mt6397->irqlock);
 }
 
 static void mt6397_irq_sync_unlock(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
 	regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]);
 	regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]);
@@ -77,7 +77,7 @@ static void mt6397_irq_sync_unlock(struc
 
 static void mt6397_irq_disable(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 	int shift = data->hwirq & 0xf;
 	int reg = data->hwirq >> 4;
 
@@ -86,7 +86,7 @@ static void mt6397_irq_disable(struct ir
 
 static void mt6397_irq_enable(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 	int shift = data->hwirq & 0xf;
 	int reg = data->hwirq >> 4;
 
Index: tip/drivers/mfd/t7l66xb.c
===================================================================
--- tip.orig/drivers/mfd/t7l66xb.c
+++ tip/drivers/mfd/t7l66xb.c
@@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] =
 /* Handle the T7L66XB interrupt mux */
 static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct t7l66xb *t7l66xb = irq_get_handler_data(irq);
+	struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
 	unsigned int isr;
 	unsigned int i, irq_base;
 
Index: tip/drivers/mfd/tc6393xb.c
===================================================================
--- tip.orig/drivers/mfd/tc6393xb.c
+++ tip/drivers/mfd/tc6393xb.c
@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct
 static void
 tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct tc6393xb *tc6393xb = irq_get_handler_data(irq);
+	struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc);
 	unsigned int isr;
 	unsigned int i, irq_base;
 
Index: tip/drivers/mfd/twl6030-irq.c
===================================================================
--- tip.orig/drivers/mfd/twl6030-irq.c
+++ tip/drivers/mfd/twl6030-irq.c
@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(in
 
 static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
 {
-	struct twl6030_irq *pdata = irq_get_chip_data(d->irq);
+	struct twl6030_irq *pdata = irq_data_get_irq_chip_data(d);
 
 	if (on)
 		atomic_inc(&pdata->wakeirqs);



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (6 preceding siblings ...)
  2015-07-13 20:44 ` [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:06   ` [patch 8/9] " Lee Jones
  2015-07-13 20:44 ` [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup Thomas Gleixner
                   ` (2 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz, Julia Lawall

[-- Attachment #1: mfd-ucb1x00-prepare-ucb1x00_irq-for-irq-argument-removal.patch --]
[-- Type: text/plain, Size: 1376 bytes --]

irq is incremented for no value in the for loop. Remove it.

Search and update was done with coccinelle and the invaluable help of
Julia Lawall.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ucb1x00-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/drivers/mfd/ucb1x00-core.c
===================================================================
--- tip.orig/drivers/mfd/ucb1x00-core.c
+++ tip/drivers/mfd/ucb1x00-core.c
@@ -282,7 +282,7 @@ void ucb1x00_adc_disable(struct ucb1x00
  * SIBCLK to talk to the chip.  We leave the clock running until
  * we have finished processing all interrupts from the chip.
  */
-static void ucb1x00_irq(unsigned int irq, struct irq_desc *desc)
+static void ucb1x00_irq(unsigned int __irq, struct irq_desc *desc)
 {
 	struct ucb1x00 *ucb = irq_desc_get_handler_data(desc);
 	unsigned int isr, i;
@@ -292,7 +292,7 @@ static void ucb1x00_irq(unsigned int irq
 	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr);
 	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0);
 
-	for (i = 0; i < 16 && isr; i++, isr >>= 1, irq++)
+	for (i = 0; i < 16 && isr; i++, isr >>= 1)
 		if (isr & 1)
 			generic_handle_irq(ucb->irq_base + i);
 	ucb1x00_disable(ucb);



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (7 preceding siblings ...)
  2015-07-13 20:44 ` [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal Thomas Gleixner
@ 2015-07-13 20:44 ` Thomas Gleixner
  2015-07-27 15:59   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-28  8:06   ` [patch 9/9] " Lee Jones
  2015-07-27 16:20 ` [patch 0/9] mfd: Interrupt cleanups and API change preparation Lee Jones
  2015-07-28  8:17 ` Lee Jones
  10 siblings, 2 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:44 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Lee Jones, Samuel Ortiz

[-- Attachment #1: mfd-max899x-Avoid-redundant-irq-descriptor-lookup.patch --]
[-- Type: text/plain, Size: 2980 bytes --]

It's pretty silly to do

     irq_data *d = irq_get_irq_data(irq_data->irq);

because that results in d = irq_data, but goes through a lookup of the
irq_data. Use irq_data directly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/mfd/max8997-irq.c |    7 +++----
 drivers/mfd/max8998-irq.c |    9 +++------
 2 files changed, 6 insertions(+), 10 deletions(-)

Index: tip/drivers/mfd/max8997-irq.c
===================================================================
--- tip.orig/drivers/mfd/max8997-irq.c
+++ tip/drivers/mfd/max8997-irq.c
@@ -140,9 +140,8 @@ static void max8997_irq_sync_unlock(stru
 }
 
 static const inline struct max8997_irq_data *
-irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
+irq_to_max8997_irq(struct max8997_dev *max8997, struct irq_data *data)
 {
-	struct irq_data *data = irq_get_irq_data(irq);
 	return &max8997_irqs[data->hwirq];
 }
 
@@ -150,7 +149,7 @@ static void max8997_irq_mask(struct irq_
 {
 	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
-								data->irq);
+								     data);
 
 	max8997->irq_masks_cur[irq_data->group] |= irq_data->mask;
 }
@@ -159,7 +158,7 @@ static void max8997_irq_unmask(struct ir
 {
 	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
-								data->irq);
+								     data);
 
 	max8997->irq_masks_cur[irq_data->group] &= ~irq_data->mask;
 }
Index: tip/drivers/mfd/max8998-irq.c
===================================================================
--- tip.orig/drivers/mfd/max8998-irq.c
+++ tip/drivers/mfd/max8998-irq.c
@@ -98,9 +98,8 @@ static struct max8998_irq_data max8998_i
 };
 
 static inline struct max8998_irq_data *
-irq_to_max8998_irq(struct max8998_dev *max8998, int irq)
+irq_to_max8998_irq(struct max8998_dev *max8998, struct irq_data *data)
 {
-	struct irq_data *data = irq_get_irq_data(irq);
 	return &max8998_irqs[data->hwirq];
 }
 
@@ -134,8 +133,7 @@ static void max8998_irq_sync_unlock(stru
 static void max8998_irq_unmask(struct irq_data *data)
 {
 	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
-	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
-							       data->irq);
+	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
 
 	max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
 }
@@ -143,8 +141,7 @@ static void max8998_irq_unmask(struct ir
 static void max8998_irq_mask(struct irq_data *data)
 {
 	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
-	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
-							       data->irq);
+	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
 
 	max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
 }



^ permalink raw reply	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
@ 2015-07-27 15:56   ` tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 1/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:56 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: rmk+kernel, Julia.Lawall, tglx, mingo, sameo, hpa, linux-kernel,
	lee.jones, jiang.liu

Commit-ID:  b334e77b0f02c68a137c9e86dc8bf6ba65d7db22
Gitweb:     http://git.kernel.org/tip/b334e77b0f02c68a137c9e86dc8bf6ba65d7db22
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:46 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:37 +0200

mfd/ezx-pcap: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.502560983@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 drivers/mfd/ezx-pcap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 5991fad..a26a02d 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -476,8 +476,7 @@ static int ezx_pcap_probe(struct spi_device *spi)
 	pcap->msr = PCAP_MASK_ALL_INTERRUPT;
 
 	irq_set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING);
-	irq_set_handler_data(spi->irq, pcap);
-	irq_set_chained_handler(spi->irq, pcap_irq_handler);
+	irq_set_chained_handler_and_data(spi->irq, pcap_irq_handler, pcap);
 	irq_set_irq_wake(spi->irq, 1);
 
 	/* ADC */

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/htc-egpio: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 2/9] mfd/htc-egpio: " Thomas Gleixner
@ 2015-07-27 15:56   ` tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 2/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:56 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Julia.Lawall, hpa, sameo, linux-kernel, jiang.liu, lee.jones,
	tglx, mingo, rmk+kernel

Commit-ID:  8823065677ce468c88aadcb86baa9480aaaaaff3
Gitweb:     http://git.kernel.org/tip/8823065677ce468c88aadcb86baa9480aaaaaff3
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:47 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:37 +0200

mfd/htc-egpio: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle:

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.580825411@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/htc-egpio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 49f39fe..35ac76f 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -353,8 +353,8 @@ static int __init egpio_probe(struct platform_device *pdev)
 			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 		}
 		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
-		irq_set_handler_data(ei->chained_irq, ei);
-		irq_set_chained_handler(ei->chained_irq, egpio_handler);
+		irq_set_chained_handler_and_data(ei->chained_irq,
+						 egpio_handler, ei);
 		ack_irqs(ei);
 
 		device_init_wakeup(&pdev->dev, 1);

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/jz4740: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 3/9] mfd/jz4740: " Thomas Gleixner
@ 2015-07-27 15:57   ` tip-bot for Thomas Gleixner
  2015-07-28  8:04   ` [patch 3/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mingo, tglx, sameo, Julia.Lawall, lee.jones,
	rmk+kernel, jiang.liu, hpa

Commit-ID:  bcc5909ab8bf644e6d6f15c81c46a0645f110068
Gitweb:     http://git.kernel.org/tip/bcc5909ab8bf644e6d6f15c81c46a0645f110068
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:49 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:37 +0200

mfd/jz4740: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle:

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.659159843@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/jz4740-adc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c
index b31c54e..408291c 100644
--- a/drivers/mfd/jz4740-adc.c
+++ b/drivers/mfd/jz4740-adc.c
@@ -277,8 +277,7 @@ static int jz4740_adc_probe(struct platform_device *pdev)
 
 	adc->gc = gc;
 
-	irq_set_handler_data(adc->irq, gc);
-	irq_set_chained_handler(adc->irq, jz4740_adc_irq_demux);
+	irq_set_chained_handler_and_data(adc->irq, jz4740_adc_irq_demux, gc);
 
 	writeb(0x00, adc->base + JZ_REG_ADC_ENABLE);
 	writeb(0xff, adc->base + JZ_REG_ADC_CTRL);
@@ -308,8 +307,7 @@ static int jz4740_adc_remove(struct platform_device *pdev)
 
 	irq_remove_generic_chip(adc->gc, IRQ_MSK(5), IRQ_NOPROBE | IRQ_LEVEL, 0);
 	kfree(adc->gc);
-	irq_set_handler_data(adc->irq, NULL);
-	irq_set_chained_handler(adc->irq, NULL);
+	irq_set_chained_handler_and_data(adc->irq, NULL, NULL);
 
 	iounmap(adc->base);
 	release_mem_region(adc->mem->start, resource_size(adc->mem));

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/pm8921: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 4/9] mfd/pm8921: " Thomas Gleixner
@ 2015-07-27 15:57   ` tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 4/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, Julia.Lawall, linux-kernel, rmk+kernel, mingo, sameo, tglx,
	lee.jones, jiang.liu

Commit-ID:  468fddba892462b47e0ce427f5f9aa0397fa39ff
Gitweb:     http://git.kernel.org/tip/468fddba892462b47e0ce427f5f9aa0397fa39ff
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:51 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd/pm8921: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.739294107@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/pm8921-core.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c
index 5a92646..38b35e5 100644
--- a/drivers/mfd/pm8921-core.c
+++ b/drivers/mfd/pm8921-core.c
@@ -336,14 +336,12 @@ static int pm8921_probe(struct platform_device *pdev)
 	if (!chip->irqdomain)
 		return -ENODEV;
 
-	irq_set_handler_data(irq, chip);
-	irq_set_chained_handler(irq, pm8xxx_irq_handler);
+	irq_set_chained_handler_and_data(irq, pm8xxx_irq_handler, chip);
 	irq_set_irq_wake(irq, 1);
 
 	rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
 	if (rc) {
-		irq_set_chained_handler(irq, NULL);
-		irq_set_handler_data(irq, NULL);
+		irq_set_chained_handler_and_data(irq, NULL, NULL);
 		irq_domain_remove(chip->irqdomain);
 	}
 
@@ -362,8 +360,7 @@ static int pm8921_remove(struct platform_device *pdev)
 	struct pm_irq_chip *chip = platform_get_drvdata(pdev);
 
 	device_for_each_child(&pdev->dev, NULL, pm8921_remove_child);
-	irq_set_chained_handler(irq, NULL);
-	irq_set_handler_data(irq, NULL);
+	irq_set_chained_handler_and_data(irq, NULL, NULL);
 	irq_domain_remove(chip->irqdomain);
 
 	return 0;

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/t7l66xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 5/9] mfd/t7l66xb: " Thomas Gleixner
@ 2015-07-27 15:57   ` tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 5/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Julia.Lawall, lee.jones, mingo, rmk+kernel, sameo, tglx,
	jiang.liu, hpa, linux-kernel

Commit-ID:  71dfb90cd61ea37ef470204f32e941f7c6754de8
Gitweb:     http://git.kernel.org/tip/71dfb90cd61ea37ef470204f32e941f7c6754de8
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:52 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd/t7l66xb: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.823376331@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/t7l66xb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index c09fb5dc..8ad48dd 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -252,8 +252,7 @@ static void t7l66xb_attach_irq(struct platform_device *dev)
 	}
 
 	irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
-	irq_set_handler_data(t7l66xb->irq, t7l66xb);
-	irq_set_chained_handler(t7l66xb->irq, t7l66xb_irq);
+	irq_set_chained_handler_and_data(t7l66xb->irq, t7l66xb_irq, t7l66xb);
 }
 
 static void t7l66xb_detach_irq(struct platform_device *dev)
@@ -263,8 +262,7 @@ static void t7l66xb_detach_irq(struct platform_device *dev)
 
 	irq_base = t7l66xb->irq_base;
 
-	irq_set_chained_handler(t7l66xb->irq, NULL);
-	irq_set_handler_data(t7l66xb->irq, NULL);
+	irq_set_chained_handler_and_data(t7l66xb->irq, NULL, NULL);
 
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
 #ifdef CONFIG_ARM

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/tc6393xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 6/9] mfd/tc6393xb: " Thomas Gleixner
@ 2015-07-27 15:58   ` tip-bot for Thomas Gleixner
  2015-07-28  8:05   ` [patch 6/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, lee.jones, sameo, jiang.liu, hpa, Julia.Lawall,
	linux-kernel, mingo, rmk+kernel

Commit-ID:  e66cf89a3341f85ac73110aec31c5b8cc8dd7a0d
Gitweb:     http://git.kernel.org/tip/e66cf89a3341f85ac73110aec31c5b8cc8dd7a0d
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:54 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd/tc6393xb: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225929.902434148@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/tc6393xb.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 63458b3..6288383 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -590,8 +590,8 @@ static void tc6393xb_attach_irq(struct platform_device *dev)
 	}
 
 	irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING);
-	irq_set_handler_data(tc6393xb->irq, tc6393xb);
-	irq_set_chained_handler(tc6393xb->irq, tc6393xb_irq);
+	irq_set_chained_handler_and_data(tc6393xb->irq, tc6393xb_irq,
+					 tc6393xb);
 }
 
 static void tc6393xb_detach_irq(struct platform_device *dev)
@@ -599,8 +599,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev)
 	struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
 	unsigned int irq, irq_base;
 
-	irq_set_chained_handler(tc6393xb->irq, NULL);
-	irq_set_handler_data(tc6393xb->irq, NULL);
+	irq_set_chained_handler_and_data(tc6393xb->irq, NULL, NULL);
 
 	irq_base = tc6393xb->irq_base;
 

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-07-13 20:44 ` [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
@ 2015-07-27 15:58   ` tip-bot for Jiang Liu
  2015-07-28  8:05   ` [patch 7/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Jiang Liu @ 2015-07-27 15:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, lee.jones, sameo, tglx, mingo, jiang.liu, hpa

Commit-ID:  90624237d970c5ea13a9f7c795764fdd12ecdb9f
Gitweb:     http://git.kernel.org/tip/90624237d970c5ea13a9f7c795764fdd12ecdb9f
Author:     Jiang Liu <jiang.liu@linux.intel.com>
AuthorDate: Mon, 13 Jul 2015 20:44:56 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Link: http://lkml.kernel.org/r/20150712225929.995355888@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/ezx-pcap.c    | 2 +-
 drivers/mfd/max8997-irq.c | 8 ++++----
 drivers/mfd/mt6397-core.c | 8 ++++----
 drivers/mfd/t7l66xb.c     | 2 +-
 drivers/mfd/tc6393xb.c    | 2 +-
 drivers/mfd/twl6030-irq.c | 2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index a26a02d..83d3054 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_struct *work)
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct pcap_chip *pcap = irq_get_handler_data(irq);
+	struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
 
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
 	queue_work(pcap->workqueue, &pcap->isr_work);
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index d3025be..26ae51a 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -113,14 +113,14 @@ static const struct max8997_irq_data max8997_irqs[] = {
 
 static void max8997_irq_lock(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 
 	mutex_lock(&max8997->irqlock);
 }
 
 static void max8997_irq_sync_unlock(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	int i;
 
 	for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) {
@@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
 
 static void max8997_irq_mask(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
 								data->irq);
 
@@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_data *data)
 
 static void max8997_irq_unmask(struct irq_data *data)
 {
-	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
 								data->irq);
 
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 03929a6..a75a39c 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devs[] = {
 
 static void mt6397_irq_lock(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
 	mutex_lock(&mt6397->irqlock);
 }
 
 static void mt6397_irq_sync_unlock(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
 	regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]);
 	regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]);
@@ -77,7 +77,7 @@ static void mt6397_irq_sync_unlock(struct irq_data *data)
 
 static void mt6397_irq_disable(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 	int shift = data->hwirq & 0xf;
 	int reg = data->hwirq >> 4;
 
@@ -86,7 +86,7 @@ static void mt6397_irq_disable(struct irq_data *data)
 
 static void mt6397_irq_enable(struct irq_data *data)
 {
-	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 	int shift = data->hwirq & 0xf;
 	int reg = data->hwirq >> 4;
 
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 8ad48dd..5a4ebb9 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] = {
 /* Handle the T7L66XB interrupt mux */
 static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct t7l66xb *t7l66xb = irq_get_handler_data(irq);
+	struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
 	unsigned int isr;
 	unsigned int i, irq_base;
 
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 6288383..bc8f74a 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct tc6393xb *tc6393xb, int gpio_base)
 static void
 tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct tc6393xb *tc6393xb = irq_get_handler_data(irq);
+	struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc);
 	unsigned int isr;
 	unsigned int i, irq_base;
 
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 20fb581..7a8479e 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(int irq, void *data)
 
 static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
 {
-	struct twl6030_irq *pdata = irq_get_chip_data(d->irq);
+	struct twl6030_irq *pdata = irq_data_get_irq_chip_data(d);
 
 	if (on)
 		atomic_inc(&pdata->wakeirqs);

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
  2015-07-13 20:44 ` [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal Thomas Gleixner
@ 2015-07-27 15:58   ` tip-bot for Thomas Gleixner
  2015-07-28  8:06   ` [patch 8/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, sameo, jiang.liu, Julia.Lawall, tglx, lee.jones, mingo,
	linux-kernel

Commit-ID:  df4900318faada00dfd2ad3e6da393509e02a5f4
Gitweb:     http://git.kernel.org/tip/df4900318faada00dfd2ad3e6da393509e02a5f4
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:57 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal

irq is incremented for no value in the for loop. Remove it.

Search and update was done with coccinelle and the invaluable help of
Julia Lawall.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150712225930.074652157@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/ucb1x00-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 3591550..5c01e24 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -282,7 +282,7 @@ void ucb1x00_adc_disable(struct ucb1x00 *ucb)
  * SIBCLK to talk to the chip.  We leave the clock running until
  * we have finished processing all interrupts from the chip.
  */
-static void ucb1x00_irq(unsigned int irq, struct irq_desc *desc)
+static void ucb1x00_irq(unsigned int __irq, struct irq_desc *desc)
 {
 	struct ucb1x00 *ucb = irq_desc_get_handler_data(desc);
 	unsigned int isr, i;
@@ -292,7 +292,7 @@ static void ucb1x00_irq(unsigned int irq, struct irq_desc *desc)
 	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr);
 	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0);
 
-	for (i = 0; i < 16 && isr; i++, isr >>= 1, irq++)
+	for (i = 0; i < 16 && isr; i++, isr >>= 1)
 		if (isr & 1)
 			generic_handle_irq(ucb->irq_base + i);
 	ucb1x00_disable(ucb);

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [tip:irq/core] mfd/max899x: Avoid redundant irq_data lookup
  2015-07-13 20:44 ` [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup Thomas Gleixner
@ 2015-07-27 15:59   ` tip-bot for Thomas Gleixner
  2015-07-28  8:06   ` [patch 9/9] " Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27 15:59 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: lee.jones, jiang.liu, tglx, mingo, sameo, hpa, linux-kernel

Commit-ID:  639fd5036c01f16e95a2d0aac91385ae9b528754
Gitweb:     http://git.kernel.org/tip/639fd5036c01f16e95a2d0aac91385ae9b528754
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:44:59 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 27 Jul 2015 13:36:38 +0200

mfd/max899x: Avoid redundant irq_data lookup

It's pretty silly to do

     irq_data *d = irq_get_irq_data(irq_data->irq);

because that results in d = irq_data, but goes through a lookup of the
irq_data. Use irq_data directly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Link: http://lkml.kernel.org/r/20150712225930.155347885@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/max8997-irq.c | 7 +++----
 drivers/mfd/max8998-irq.c | 9 +++------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 26ae51a..17801b5 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -140,9 +140,8 @@ static void max8997_irq_sync_unlock(struct irq_data *data)
 }
 
 static const inline struct max8997_irq_data *
-irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
+irq_to_max8997_irq(struct max8997_dev *max8997, struct irq_data *data)
 {
-	struct irq_data *data = irq_get_irq_data(irq);
 	return &max8997_irqs[data->hwirq];
 }
 
@@ -150,7 +149,7 @@ static void max8997_irq_mask(struct irq_data *data)
 {
 	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
-								data->irq);
+								     data);
 
 	max8997->irq_masks_cur[irq_data->group] |= irq_data->mask;
 }
@@ -159,7 +158,7 @@ static void max8997_irq_unmask(struct irq_data *data)
 {
 	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
-								data->irq);
+								     data);
 
 	max8997->irq_masks_cur[irq_data->group] &= ~irq_data->mask;
 }
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c
index 3702056..a65e37d 100644
--- a/drivers/mfd/max8998-irq.c
+++ b/drivers/mfd/max8998-irq.c
@@ -98,9 +98,8 @@ static struct max8998_irq_data max8998_irqs[] = {
 };
 
 static inline struct max8998_irq_data *
-irq_to_max8998_irq(struct max8998_dev *max8998, int irq)
+irq_to_max8998_irq(struct max8998_dev *max8998, struct irq_data *data)
 {
-	struct irq_data *data = irq_get_irq_data(irq);
 	return &max8998_irqs[data->hwirq];
 }
 
@@ -134,8 +133,7 @@ static void max8998_irq_sync_unlock(struct irq_data *data)
 static void max8998_irq_unmask(struct irq_data *data)
 {
 	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
-	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
-							       data->irq);
+	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
 
 	max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
 }
@@ -143,8 +141,7 @@ static void max8998_irq_unmask(struct irq_data *data)
 static void max8998_irq_mask(struct irq_data *data)
 {
 	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
-	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
-							       data->irq);
+	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
 
 	max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
 }

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [patch 0/9] mfd: Interrupt cleanups and API change preparation
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (8 preceding siblings ...)
  2015-07-13 20:44 ` [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup Thomas Gleixner
@ 2015-07-27 16:20 ` Lee Jones
  2015-07-28  8:17 ` Lee Jones
  10 siblings, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-27 16:20 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz

On Mon, 13 Jul 2015, Thomas Gleixner wrote:
> The following patch series contains the following changes:
> 
>     - Consolidation of chained interrupt handler setup/removal
> 
>     - Switch to functions which avoid a redundant interrupt
>       descriptor lookup
> 
>     - Preparation of interrupt flow handlers for the 'irq' argument
>       removal
> 
> The series has no dependencies and is also available as a git branch
> for your convenience:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/mfd
> 
> If you want me to carry the patches in the irq/core branch of tip,
> please let me know.

Not sure how these slipped through the net.

I'd rather take these (and fix the subject lines) myself if it's all
the same to you.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
  2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:04   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:04 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/ezx-pcap.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/ezx-pcap.c
> ===================================================================
> --- tip.orig/drivers/mfd/ezx-pcap.c
> +++ tip/drivers/mfd/ezx-pcap.c
> @@ -476,8 +476,7 @@ static int ezx_pcap_probe(struct spi_dev
>  	pcap->msr = PCAP_MASK_ALL_INTERRUPT;
>  
>  	irq_set_irq_type(spi->irq, IRQ_TYPE_EDGE_RISING);
> -	irq_set_handler_data(spi->irq, pcap);
> -	irq_set_chained_handler(spi->irq, pcap_irq_handler);
> +	irq_set_chained_handler_and_data(spi->irq, pcap_irq_handler, pcap);
>  	irq_set_irq_wake(spi->irq, 1);
>  
>  	/* ADC */
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 2/9] mfd/htc-egpio: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 2/9] mfd/htc-egpio: " Thomas Gleixner
  2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:04   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:04 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle:
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/htc-egpio.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/htc-egpio.c
> ===================================================================
> --- tip.orig/drivers/mfd/htc-egpio.c
> +++ tip/drivers/mfd/htc-egpio.c
> @@ -353,8 +353,8 @@ static int __init egpio_probe(struct pla
>  			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
>  		}
>  		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
> -		irq_set_handler_data(ei->chained_irq, ei);
> -		irq_set_chained_handler(ei->chained_irq, egpio_handler);
> +		irq_set_chained_handler_and_data(ei->chained_irq,
> +						 egpio_handler, ei);
>  		ack_irqs(ei);
>  
>  		device_init_wakeup(&pdev->dev, 1);
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 3/9] mfd/jz4740: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 3/9] mfd/jz4740: " Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:04   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:04 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle:
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/jz4740-adc.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/jz4740-adc.c
> ===================================================================
> --- tip.orig/drivers/mfd/jz4740-adc.c
> +++ tip/drivers/mfd/jz4740-adc.c
> @@ -277,8 +277,7 @@ static int jz4740_adc_probe(struct platf
>  
>  	adc->gc = gc;
>  
> -	irq_set_handler_data(adc->irq, gc);
> -	irq_set_chained_handler(adc->irq, jz4740_adc_irq_demux);
> +	irq_set_chained_handler_and_data(adc->irq, jz4740_adc_irq_demux, gc);
>  
>  	writeb(0x00, adc->base + JZ_REG_ADC_ENABLE);
>  	writeb(0xff, adc->base + JZ_REG_ADC_CTRL);
> @@ -308,8 +307,7 @@ static int jz4740_adc_remove(struct plat
>  
>  	irq_remove_generic_chip(adc->gc, IRQ_MSK(5), IRQ_NOPROBE | IRQ_LEVEL, 0);
>  	kfree(adc->gc);
> -	irq_set_handler_data(adc->irq, NULL);
> -	irq_set_chained_handler(adc->irq, NULL);
> +	irq_set_chained_handler_and_data(adc->irq, NULL, NULL);
>  
>  	iounmap(adc->base);
>  	release_mem_region(adc->mem->start, resource_size(adc->mem));
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 4/9] mfd/pm8921: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 4/9] mfd/pm8921: " Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:05   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/pm8921-core.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/pm8921-core.c
> ===================================================================
> --- tip.orig/drivers/mfd/pm8921-core.c
> +++ tip/drivers/mfd/pm8921-core.c
> @@ -336,14 +336,12 @@ static int pm8921_probe(struct platform_
>  	if (!chip->irqdomain)
>  		return -ENODEV;
>  
> -	irq_set_handler_data(irq, chip);
> -	irq_set_chained_handler(irq, pm8xxx_irq_handler);
> +	irq_set_chained_handler_and_data(irq, pm8xxx_irq_handler, chip);
>  	irq_set_irq_wake(irq, 1);
>  
>  	rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
>  	if (rc) {
> -		irq_set_chained_handler(irq, NULL);
> -		irq_set_handler_data(irq, NULL);
> +		irq_set_chained_handler_and_data(irq, NULL, NULL);
>  		irq_domain_remove(chip->irqdomain);
>  	}
>  
> @@ -362,8 +360,7 @@ static int pm8921_remove(struct platform
>  	struct pm_irq_chip *chip = platform_get_drvdata(pdev);
>  
>  	device_for_each_child(&pdev->dev, NULL, pm8921_remove_child);
> -	irq_set_chained_handler(irq, NULL);
> -	irq_set_handler_data(irq, NULL);
> +	irq_set_chained_handler_and_data(irq, NULL, NULL);
>  	irq_domain_remove(chip->irqdomain);
>  
>  	return 0;
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 5/9] mfd/t7l66xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 5/9] mfd/t7l66xb: " Thomas Gleixner
  2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:05   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/t7l66xb.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/t7l66xb.c
> ===================================================================
> --- tip.orig/drivers/mfd/t7l66xb.c
> +++ tip/drivers/mfd/t7l66xb.c
> @@ -252,8 +252,7 @@ static void t7l66xb_attach_irq(struct pl
>  	}
>  
>  	irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
> -	irq_set_handler_data(t7l66xb->irq, t7l66xb);
> -	irq_set_chained_handler(t7l66xb->irq, t7l66xb_irq);
> +	irq_set_chained_handler_and_data(t7l66xb->irq, t7l66xb_irq, t7l66xb);
>  }
>  
>  static void t7l66xb_detach_irq(struct platform_device *dev)
> @@ -263,8 +262,7 @@ static void t7l66xb_detach_irq(struct pl
>  
>  	irq_base = t7l66xb->irq_base;
>  
> -	irq_set_chained_handler(t7l66xb->irq, NULL);
> -	irq_set_handler_data(t7l66xb->irq, NULL);
> +	irq_set_chained_handler_and_data(t7l66xb->irq, NULL, NULL);
>  
>  	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
>  #ifdef CONFIG_ARM
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 6/9] mfd/tc6393xb: Consolidate chained IRQ handler install/remove
  2015-07-13 20:44 ` [patch 6/9] mfd/tc6393xb: " Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:05   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Russell King, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/tc6393xb.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/tc6393xb.c
> ===================================================================
> --- tip.orig/drivers/mfd/tc6393xb.c
> +++ tip/drivers/mfd/tc6393xb.c
> @@ -590,8 +590,8 @@ static void tc6393xb_attach_irq(struct p
>  	}
>  
>  	irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING);
> -	irq_set_handler_data(tc6393xb->irq, tc6393xb);
> -	irq_set_chained_handler(tc6393xb->irq, tc6393xb_irq);
> +	irq_set_chained_handler_and_data(tc6393xb->irq, tc6393xb_irq,
> +					 tc6393xb);
>  }
>  
>  static void tc6393xb_detach_irq(struct platform_device *dev)
> @@ -599,8 +599,7 @@ static void tc6393xb_detach_irq(struct p
>  	struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
>  	unsigned int irq, irq_base;
>  
> -	irq_set_chained_handler(tc6393xb->irq, NULL);
> -	irq_set_handler_data(tc6393xb->irq, NULL);
> +	irq_set_chained_handler_and_data(tc6393xb->irq, NULL, NULL);
>  
>  	irq_base = tc6393xb->irq_base;
>  
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-07-13 20:44 ` [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Jiang Liu
@ 2015-07-28  8:05   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> From: Jiang Liu <jiang.liu@linux.intel.com>
> 
> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
> already have a pointer to corresponding irq_desc.
> 
> Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".
> 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  drivers/mfd/ezx-pcap.c    |    2 +-
>  drivers/mfd/max8997-irq.c |    8 ++++----
>  drivers/mfd/mt6397-core.c |    8 ++++----
>  drivers/mfd/t7l66xb.c     |    2 +-
>  drivers/mfd/tc6393xb.c    |    2 +-
>  drivers/mfd/twl6030-irq.c |    2 +-
>  6 files changed, 12 insertions(+), 12 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/ezx-pcap.c
> ===================================================================
> --- tip.orig/drivers/mfd/ezx-pcap.c
> +++ tip/drivers/mfd/ezx-pcap.c
> @@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_st
>  
>  static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
> -	struct pcap_chip *pcap = irq_get_handler_data(irq);
> +	struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
>  
>  	desc->irq_data.chip->irq_ack(&desc->irq_data);
>  	queue_work(pcap->workqueue, &pcap->isr_work);
> Index: tip/drivers/mfd/max8997-irq.c
> ===================================================================
> --- tip.orig/drivers/mfd/max8997-irq.c
> +++ tip/drivers/mfd/max8997-irq.c
> @@ -113,14 +113,14 @@ static const struct max8997_irq_data max
>  
>  static void max8997_irq_lock(struct irq_data *data)
>  {
> -	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
> +	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  
>  	mutex_lock(&max8997->irqlock);
>  }
>  
>  static void max8997_irq_sync_unlock(struct irq_data *data)
>  {
> -	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
> +	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  	int i;
>  
>  	for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) {
> @@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *m
>  
>  static void max8997_irq_mask(struct irq_data *data)
>  {
> -	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
> +	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
>  								data->irq);
>  
> @@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_
>  
>  static void max8997_irq_unmask(struct irq_data *data)
>  {
> -	struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
> +	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
>  								data->irq);
>  
> Index: tip/drivers/mfd/mt6397-core.c
> ===================================================================
> --- tip.orig/drivers/mfd/mt6397-core.c
> +++ tip/drivers/mfd/mt6397-core.c
> @@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devs
>  
>  static void mt6397_irq_lock(struct irq_data *data)
>  {
> -	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
> +	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
>  
>  	mutex_lock(&mt6397->irqlock);
>  }
>  
>  static void mt6397_irq_sync_unlock(struct irq_data *data)
>  {
> -	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
> +	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
>  
>  	regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]);
>  	regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]);
> @@ -77,7 +77,7 @@ static void mt6397_irq_sync_unlock(struc
>  
>  static void mt6397_irq_disable(struct irq_data *data)
>  {
> -	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
> +	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
>  	int shift = data->hwirq & 0xf;
>  	int reg = data->hwirq >> 4;
>  
> @@ -86,7 +86,7 @@ static void mt6397_irq_disable(struct ir
>  
>  static void mt6397_irq_enable(struct irq_data *data)
>  {
> -	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
> +	struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
>  	int shift = data->hwirq & 0xf;
>  	int reg = data->hwirq >> 4;
>  
> Index: tip/drivers/mfd/t7l66xb.c
> ===================================================================
> --- tip.orig/drivers/mfd/t7l66xb.c
> +++ tip/drivers/mfd/t7l66xb.c
> @@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] =
>  /* Handle the T7L66XB interrupt mux */
>  static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
>  {
> -	struct t7l66xb *t7l66xb = irq_get_handler_data(irq);
> +	struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
>  	unsigned int isr;
>  	unsigned int i, irq_base;
>  
> Index: tip/drivers/mfd/tc6393xb.c
> ===================================================================
> --- tip.orig/drivers/mfd/tc6393xb.c
> +++ tip/drivers/mfd/tc6393xb.c
> @@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct
>  static void
>  tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
>  {
> -	struct tc6393xb *tc6393xb = irq_get_handler_data(irq);
> +	struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc);
>  	unsigned int isr;
>  	unsigned int i, irq_base;
>  
> Index: tip/drivers/mfd/twl6030-irq.c
> ===================================================================
> --- tip.orig/drivers/mfd/twl6030-irq.c
> +++ tip/drivers/mfd/twl6030-irq.c
> @@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(in
>  
>  static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
>  {
> -	struct twl6030_irq *pdata = irq_get_chip_data(d->irq);
> +	struct twl6030_irq *pdata = irq_data_get_irq_chip_data(d);
>  
>  	if (on)
>  		atomic_inc(&pdata->wakeirqs);
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
  2015-07-13 20:44 ` [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal Thomas Gleixner
  2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:06   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:06 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz, Julia Lawall

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> irq is incremented for no value in the for loop. Remove it.
> 
> Search and update was done with coccinelle and the invaluable help of
> Julia Lawall.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Jiang Liu <jiang.liu@linux.intel.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/ucb1x00-core.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/ucb1x00-core.c
> ===================================================================
> --- tip.orig/drivers/mfd/ucb1x00-core.c
> +++ tip/drivers/mfd/ucb1x00-core.c
> @@ -282,7 +282,7 @@ void ucb1x00_adc_disable(struct ucb1x00
>   * SIBCLK to talk to the chip.  We leave the clock running until
>   * we have finished processing all interrupts from the chip.
>   */
> -static void ucb1x00_irq(unsigned int irq, struct irq_desc *desc)
> +static void ucb1x00_irq(unsigned int __irq, struct irq_desc *desc)
>  {
>  	struct ucb1x00 *ucb = irq_desc_get_handler_data(desc);
>  	unsigned int isr, i;
> @@ -292,7 +292,7 @@ static void ucb1x00_irq(unsigned int irq
>  	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr);
>  	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0);
>  
> -	for (i = 0; i < 16 && isr; i++, isr >>= 1, irq++)
> +	for (i = 0; i < 16 && isr; i++, isr >>= 1)
>  		if (isr & 1)
>  			generic_handle_irq(ucb->irq_base + i);
>  	ucb1x00_disable(ucb);
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup
  2015-07-13 20:44 ` [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup Thomas Gleixner
  2015-07-27 15:59   ` [tip:irq/core] " tip-bot for Thomas Gleixner
@ 2015-07-28  8:06   ` Lee Jones
  1 sibling, 0 replies; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:06 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz

On Mon, 13 Jul 2015, Thomas Gleixner wrote:

> It's pretty silly to do
> 
>      irq_data *d = irq_get_irq_data(irq_data->irq);
> 
> because that results in d = irq_data, but goes through a lookup of the
> irq_data. Use irq_data directly.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Jiang Liu <jiang.liu@linux.intel.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> ---
>  drivers/mfd/max8997-irq.c |    7 +++----
>  drivers/mfd/max8998-irq.c |    9 +++------
>  2 files changed, 6 insertions(+), 10 deletions(-)

Applied, thanks.

> Index: tip/drivers/mfd/max8997-irq.c
> ===================================================================
> --- tip.orig/drivers/mfd/max8997-irq.c
> +++ tip/drivers/mfd/max8997-irq.c
> @@ -140,9 +140,8 @@ static void max8997_irq_sync_unlock(stru
>  }
>  
>  static const inline struct max8997_irq_data *
> -irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
> +irq_to_max8997_irq(struct max8997_dev *max8997, struct irq_data *data)
>  {
> -	struct irq_data *data = irq_get_irq_data(irq);
>  	return &max8997_irqs[data->hwirq];
>  }
>  
> @@ -150,7 +149,7 @@ static void max8997_irq_mask(struct irq_
>  {
>  	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
> -								data->irq);
> +								     data);
>  
>  	max8997->irq_masks_cur[irq_data->group] |= irq_data->mask;
>  }
> @@ -159,7 +158,7 @@ static void max8997_irq_unmask(struct ir
>  {
>  	struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
>  	const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
> -								data->irq);
> +								     data);
>  
>  	max8997->irq_masks_cur[irq_data->group] &= ~irq_data->mask;
>  }
> Index: tip/drivers/mfd/max8998-irq.c
> ===================================================================
> --- tip.orig/drivers/mfd/max8998-irq.c
> +++ tip/drivers/mfd/max8998-irq.c
> @@ -98,9 +98,8 @@ static struct max8998_irq_data max8998_i
>  };
>  
>  static inline struct max8998_irq_data *
> -irq_to_max8998_irq(struct max8998_dev *max8998, int irq)
> +irq_to_max8998_irq(struct max8998_dev *max8998, struct irq_data *data)
>  {
> -	struct irq_data *data = irq_get_irq_data(irq);
>  	return &max8998_irqs[data->hwirq];
>  }
>  
> @@ -134,8 +133,7 @@ static void max8998_irq_sync_unlock(stru
>  static void max8998_irq_unmask(struct irq_data *data)
>  {
>  	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
> -	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
> -							       data->irq);
> +	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
>  
>  	max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
>  }
> @@ -143,8 +141,7 @@ static void max8998_irq_unmask(struct ir
>  static void max8998_irq_mask(struct irq_data *data)
>  {
>  	struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
> -	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
> -							       data->irq);
> +	struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
>  
>  	max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
>  }
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 0/9] mfd: Interrupt cleanups and API change preparation
  2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
                   ` (9 preceding siblings ...)
  2015-07-27 16:20 ` [patch 0/9] mfd: Interrupt cleanups and API change preparation Lee Jones
@ 2015-07-28  8:17 ` Lee Jones
  2015-07-28  8:42   ` Thomas Gleixner
  10 siblings, 1 reply; 31+ messages in thread
From: Lee Jones @ 2015-07-28  8:17 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Jiang Liu, Samuel Ortiz

On Mon, 13 Jul 2015, Thomas Gleixner wrote:
> The following patch series contains the following changes:
> 
>     - Consolidation of chained interrupt handler setup/removal
> 
>     - Switch to functions which avoid a redundant interrupt
>       descriptor lookup
> 
>     - Preparation of interrupt flow handlers for the 'irq' argument
>       removal
> 
> The series has no dependencies and is also available as a git branch
> for your convenience:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/mfd
> 
> If you want me to carry the patches in the irq/core branch of tip,
> please let me know.

I'll take these and fix up all of the subject lines in this instance,
but future would you mind submitting using the format used by the SS?

For example, in MFD we like to use:

mfd: [driver]: [Subject, starting with an uppercase char]

`git log --oneline -- drivers/mfd`
mfd: ipaq-micro: Convert to built-in platform driver
mfd: ipaq-micro: Convert prints to debug prints
mfd: ipaq-micro: Clean up development cruft
mfd: da9062: Support for the DA9063 RTC in the DA9062 core
mfd: arizona: Specify regmap endianness
mfd: pm8921: Implement irq_get_irqchip_state
mfd: atmel-hlcdc: Implement config synchronization
mfd: da9063: Fix missing DA9063_M_DVC_RDY mask bit
mfd: axp20x: Add axp152 support
mfd: kempld-core: Add support for COMe-bBL6 and COMe-cBW6 to Kontron PLD driver

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 0/9] mfd: Interrupt cleanups and API change preparation
  2015-07-28  8:17 ` Lee Jones
@ 2015-07-28  8:42   ` Thomas Gleixner
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Gleixner @ 2015-07-28  8:42 UTC (permalink / raw)
  To: Lee Jones; +Cc: LKML, Jiang Liu, Samuel Ortiz

On Tue, 28 Jul 2015, Lee Jones wrote:
> On Mon, 13 Jul 2015, Thomas Gleixner wrote:
> I'll take these and fix up all of the subject lines in this instance,
> but future would you mind submitting using the format used by the SS?
> 
> For example, in MFD we like to use:
> 
> mfd: [driver]: [Subject, starting with an uppercase char]

Sure. Thanks for taking care!

      tglx

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2015-07-28  8:43 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 20:44 [patch 0/9] mfd: Interrupt cleanups and API change preparation Thomas Gleixner
2015-07-13 20:44 ` [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:04   ` [patch 1/9] " Lee Jones
2015-07-13 20:44 ` [patch 2/9] mfd/htc-egpio: " Thomas Gleixner
2015-07-27 15:56   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:04   ` [patch 2/9] " Lee Jones
2015-07-13 20:44 ` [patch 3/9] mfd/jz4740: " Thomas Gleixner
2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:04   ` [patch 3/9] " Lee Jones
2015-07-13 20:44 ` [patch 4/9] mfd/pm8921: " Thomas Gleixner
2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:05   ` [patch 4/9] " Lee Jones
2015-07-13 20:44 ` [patch 5/9] mfd/t7l66xb: " Thomas Gleixner
2015-07-27 15:57   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:05   ` [patch 5/9] " Lee Jones
2015-07-13 20:44 ` [patch 6/9] mfd/tc6393xb: " Thomas Gleixner
2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:05   ` [patch 6/9] " Lee Jones
2015-07-13 20:44 ` [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Jiang Liu
2015-07-28  8:05   ` [patch 7/9] " Lee Jones
2015-07-13 20:44 ` [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal Thomas Gleixner
2015-07-27 15:58   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:06   ` [patch 8/9] " Lee Jones
2015-07-13 20:44 ` [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup Thomas Gleixner
2015-07-27 15:59   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-28  8:06   ` [patch 9/9] " Lee Jones
2015-07-27 16:20 ` [patch 0/9] mfd: Interrupt cleanups and API change preparation Lee Jones
2015-07-28  8:17 ` Lee Jones
2015-07-28  8:42   ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.