mfd: Interrupt cleanups and API change preparation
Subsystems (3)
cover mfd: Interrupt cleanups and API change preparation
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
PATCH 1/9 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.
--- drivers/mfd/ezx-pcap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mfd/ezx-pcap.c +1 -2
@@ -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 */
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
Commit-ID: b334e77b0f02c68a137c9e86dc8bf6ba65d7db22 Gitweb: http://git.kernel.org/tip/b334e77b0f02c68a137c9e86dc8bf6ba65d7db22 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:46 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/ezx-pcap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mfd/ezx-pcap.c +1 -2
@@ -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 */
Lee Jones
AppliedRe: [patch 1/9] mfd/ezx-pcap: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 6 lines · Thomas Gleixner
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.
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/ezx-pcap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied, thanks.
Quoted 16 lines
Index:
tip/drivers/mfd/ezx-pcap.c
===================================================================drivers/mfd/ezx-pcap.c +1
-2@@ -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 */
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 2/9 mfd/htc-egpio: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerChained 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:
--- drivers/mfd/htc-egpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/htc-egpio.c +2 -2
@@ -353,8 +353,8 @@ static int __init egpio_probe(struct plaset_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 );
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/htc-egpio: Consolidate chained IRQ handler install/remove
mfd/htc-egpio: Consolidate chained IRQ handler install/remove
Commit-ID: 8823065677ce468c88aadcb86baa9480aaaaaff3 Gitweb: http://git.kernel.org/tip/8823065677ce468c88aadcb86baa9480aaaaaff3 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:47 +0000 Committer: Thomas Gleixner <[email protected]> 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:
--- drivers/mfd/htc-egpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/htc-egpio.c +2 -2
@@ -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 );
Lee Jones
AppliedRe: [patch 2/9] mfd/htc-egpio: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 6 lines · Thomas Gleixner
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:
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/htc-egpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Quoted 17 lines
Index:
tip/drivers/mfd/htc-egpio.c
===================================================================drivers/mfd/htc-egpio.c +2
-2@@ -353,8 +353,8 @@ static int __init egpio_probe(struct plaset_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 );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 3/9 mfd/jz4740: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerChained 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:
--- drivers/mfd/jz4740-adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/jz4740-adc.c +2 -4
@@ -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 platirq_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));
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/jz4740: Consolidate chained IRQ handler install/remove
mfd/jz4740: Consolidate chained IRQ handler install/remove
Commit-ID: bcc5909ab8bf644e6d6f15c81c46a0645f110068 Gitweb: http://git.kernel.org/tip/bcc5909ab8bf644e6d6f15c81c46a0645f110068 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:49 +0000 Committer: Thomas Gleixner <[email protected]> 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:
--- drivers/mfd/jz4740-adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/jz4740-adc.c +2 -4
@@ -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));
Lee Jones
AppliedRe: [patch 3/9] mfd/jz4740: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 6 lines · Thomas Gleixner
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:
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/jz4740-adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Applied, thanks.
Quoted 26 lines
Index:
tip/drivers/mfd/jz4740-adc.c
===================================================================drivers/mfd/jz4740-adc.c +2
-4@@ -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 platirq_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));
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 4/9 mfd/pm8921: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerChained 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.
--- drivers/mfd/pm8921-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/mfd/pm8921-core.c +3 -6
@@ -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 platformstruct 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 ;
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/pm8921: Consolidate chained IRQ handler install/remove
mfd/pm8921: Consolidate chained IRQ handler install/remove
Commit-ID: 468fddba892462b47e0ce427f5f9aa0397fa39ff Gitweb: http://git.kernel.org/tip/468fddba892462b47e0ce427f5f9aa0397fa39ff Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:51 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/pm8921-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/mfd/pm8921-core.c +3 -6
@@ -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 ;
Lee Jones
AppliedRe: [patch 4/9] mfd/pm8921: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 4 lines · Thomas Gleixner
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.
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/pm8921-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
Applied, thanks.
Quoted 33 lines
Index:
tip/drivers/mfd/pm8921-core.c
===================================================================drivers/mfd/pm8921-core.c +3
-6@@ -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 platformstruct 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 ;
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 5/9 mfd/t7l66xb: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerChained 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.
--- drivers/mfd/t7l66xb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/t7l66xb.c +2 -4
@@ -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
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/t7l66xb: Consolidate chained IRQ handler install/remove
mfd/t7l66xb: Consolidate chained IRQ handler install/remove
Commit-ID: 71dfb90cd61ea37ef470204f32e941f7c6754de8 Gitweb: http://git.kernel.org/tip/71dfb90cd61ea37ef470204f32e941f7c6754de8 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:52 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/t7l66xb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/t7l66xb.c +2 -4
@@ -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
Lee Jones
AppliedRe: [patch 5/9] mfd/t7l66xb: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 6 lines · Thomas Gleixner
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.
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/t7l66xb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Applied, thanks.
Quoted 26 lines
Index:
tip/drivers/mfd/t7l66xb.c
===================================================================drivers/mfd/t7l66xb.c +2
-4@@ -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
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 6/9 mfd/tc6393xb: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerChained 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.
--- drivers/mfd/tc6393xb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mfd/tc6393xb.c +3 -4
@@ -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 pstruct 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;
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/tc6393xb: Consolidate chained IRQ handler install/remove
mfd/tc6393xb: Consolidate chained IRQ handler install/remove
Commit-ID: e66cf89a3341f85ac73110aec31c5b8cc8dd7a0d Gitweb: http://git.kernel.org/tip/e66cf89a3341f85ac73110aec31c5b8cc8dd7a0d Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:54 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/tc6393xb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mfd/tc6393xb.c +3 -4
@@ -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;
Lee Jones
AppliedRe: [patch 6/9] mfd/tc6393xb: Consolidate chained IRQ handler install/remove
In reply to Thomas GleixnerQuoted 6 lines · Thomas Gleixner
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.
Quoted 8 lines
Reported-by Russell King <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/tc6393xb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Applied, thanks.
Quoted 27 lines
Index:
tip/drivers/mfd/tc6393xb.c
===================================================================drivers/mfd/tc6393xb.c +3
-4@@ -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 pstruct 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;
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 7/9 mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
In reply to Thomas GleixnerFrom: Jiang Liu <[email protected]>
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)".
--- 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(-)
drivers/mfd/ezx-pcap.c +1 -1
@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_ststatic 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);
drivers/mfd/max8997-irq.c +4 -4
@@ -113,14 +113,14 @@ static const struct max8997_irq_data maxstatic 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 *mstatic 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);
drivers/mfd/mt6397-core.c +4 -4
@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devsstatic 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(strucstatic 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 irstatic 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 ;
drivers/mfd/t7l66xb.c +1 -1
@@ -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;
drivers/mfd/tc6393xb.c +1 -1
@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(structstatic 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;
drivers/mfd/twl6030-irq.c +1 -1
@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(instatic 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);
tip-bot for Jiang Liu
merge bot[tip:irq/core] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
Commit-ID: 90624237d970c5ea13a9f7c795764fdd12ecdb9f Gitweb: http://git.kernel.org/tip/90624237d970c5ea13a9f7c795764fdd12ecdb9f Author: Jiang Liu <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:56 +0000 Committer: Thomas Gleixner <[email protected]> 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)".
--- 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(-)
drivers/mfd/ezx-pcap.c +1 -1
@@ -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);
drivers/mfd/max8997-irq.c +4 -4
@@ -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);
drivers/mfd/mt6397-core.c +4 -4
@@ -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 ;
drivers/mfd/t7l66xb.c +1 -1
@@ -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;
drivers/mfd/tc6393xb.c +1 -1
@@ -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;
drivers/mfd/twl6030-irq.c +1 -1
@@ -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);
Lee Jones
AppliedRe: [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
In reply to Thomas GleixnerQuoted 11 lines · Thomas Gleixner
From: Jiang Liu <[email protected]>
Use
irq_desc_get_xxx()to avoid redundant lookup ofirq_descwhile we already have a pointer to correspondingirq_desc.Do the same change to avoid the pattern "
irq_get_chip_data(data->irq)".Signed-off-by Jiang Liu <[email protected]>Acked-by Lee Jones <[email protected]>Cc Samuel Ortiz <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>
Quoted 8 lines
--- 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.
Quoted 132 lines
Index:
tip/drivers/mfd/ezx-pcap.c
===================================================================drivers/mfd/ezx-pcap.c +1
-1@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_ststatic 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
===================================================================drivers/mfd/max8997-irq.c +4
-4@@ -113,14 +113,14 @@ static const struct max8997_irq_data maxstatic 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 *mstatic 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
===================================================================drivers/mfd/mt6397-core.c +4
-4@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devsstatic 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(strucstatic 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 irstatic 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
===================================================================drivers/mfd/t7l66xb.c +1
-1@@ -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
===================================================================drivers/mfd/tc6393xb.c +1
-1@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(structstatic 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
===================================================================drivers/mfd/twl6030-irq.c +1
-1@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(instatic 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);
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 8/9 mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
In reply to Thomas Gleixnerirq 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.
--- drivers/mfd/ucb1x00-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/ucb1x00-core.c +2 -2
@@ -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 irqucb1x00_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);
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
Commit-ID: df4900318faada00dfd2ad3e6da393509e02a5f4 Gitweb: http://git.kernel.org/tip/df4900318faada00dfd2ad3e6da393509e02a5f4 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:57 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/ucb1x00-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/ucb1x00-core.c +2 -2
@@ -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);
Lee Jones
AppliedRe: [patch 8/9] mfd/ucb1x00: Prepare ucb1x00_irq for irq argument removal
In reply to Thomas GleixnerQuoted 5 lines · Thomas Gleixner
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.
Quoted 8 lines
Signed-off-by Thomas Gleixner <[email protected]>Cc Julia Lawall <[email protected]>Cc Jiang Liu <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/ucb1x00-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Quoted 24 lines
Index:
tip/drivers/mfd/ucb1x00-core.c
===================================================================drivers/mfd/ucb1x00-core.c +2
-2@@ -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 irqucb1x00_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);
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 9/9 mfd/max899x: Avoid redundant irq_data lookup
In reply to Thomas GleixnerIt'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.
--- drivers/mfd/max8997-irq.c | 7 +++---- drivers/mfd/max8998-irq.c | 9 +++------ 2 files changed, 6 insertions(+), 10 deletions(-)
drivers/mfd/max8997-irq.c +3 -4
@@ -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; }
drivers/mfd/max8998-irq.c +3 -6
@@ -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(strustatic 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 irstatic 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; }
tip-bot for Thomas Gleixner
merge bot[tip:irq/core] mfd/max899x: Avoid redundant irq_data lookup
mfd/max899x: Avoid redundant irq_data lookup
Commit-ID: 639fd5036c01f16e95a2d0aac91385ae9b528754 Gitweb: http://git.kernel.org/tip/639fd5036c01f16e95a2d0aac91385ae9b528754 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Jul 2015 20:44:59 +0000 Committer: Thomas Gleixner <[email protected]> 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.
--- drivers/mfd/max8997-irq.c | 7 +++---- drivers/mfd/max8998-irq.c | 9 +++------ 2 files changed, 6 insertions(+), 10 deletions(-)
drivers/mfd/max8997-irq.c +3 -4
@@ -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; }
drivers/mfd/max8998-irq.c +3 -6
@@ -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; }
Lee Jones
AppliedRe: [patch 9/9] mfd/max899x: Avoid redundant irq_data lookup
In reply to Thomas GleixnerQuoted 7 lines · Thomas Gleixner
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 theirq_data. Useirq_datadirectly.
Quoted 8 lines
Signed-off-by Thomas Gleixner <[email protected]>Cc Lee Jones <[email protected]>Cc Jiang Liu <[email protected]>Cc Samuel Ortiz <[email protected]>--- drivers/mfd/max8997-irq.c | 7 +++---- drivers/mfd/max8998-irq.c | 9 +++------ 2 files changed, 6 insertions(+), 10 deletions(-)
Applied, thanks.
Quoted 70 lines
Index:
tip/drivers/mfd/max8997-irq.c
===================================================================drivers/mfd/max8997-irq.c +3
-4@@ -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
===================================================================drivers/mfd/max8998-irq.c +3
-6@@ -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(strustatic 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 irstatic 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; }
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 10 lines · Thomas Gleixner
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
Quoted 7 lines
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.gitirq/mfdIf 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.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 10 lines · Thomas Gleixner
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
Quoted 7 lines
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.gitirq/mfdIf 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
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 7 lines · Lee Jones
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