linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, Jiang Liu <jiang.liu@linux.intel.com>,
	Julia Lawall <Julia.Lawall@lip6.fr>
Subject: [patch 22/22] pinctrl/sunxi: Prepare sunxi_pinctrl_irq_handler for irq argument removal
Date: Mon, 13 Jul 2015 20:48:07 -0000	[thread overview]
Message-ID: <20150713072816.137686428@linutronix.de> (raw)
In-Reply-To: 20150713072703.919712512@linutronix.de

[-- Attachment #1: pinctrl-sunxi-prepare-sunxi_pinctrl_irq_handler-for-irq-argument-removal.patch --]
[-- Type: text/plain, Size: 1258 bytes --]

The irq argument of most interrupt flow handlers is unused or merily
used instead of a local variable. The handlers which need the irq
argument can retrieve the irq number from the irq descriptor.

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: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
---
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: tip/drivers/pinctrl/sunxi/pinctrl-sunxi.c
===================================================================
--- tip.orig/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ tip/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -709,8 +709,9 @@ static struct irq_chip sunxi_pinctrl_lev
 			  IRQCHIP_EOI_IF_HANDLED,
 };
 
-static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
+static void sunxi_pinctrl_irq_handler(unsigned __irq, struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct sunxi_pinctrl *pctl = irq_desc_get_handler_data(desc);
 	unsigned long bank, reg, val;



      parent reply	other threads:[~2015-07-13 20:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 20:47 [patch 00/22] pinctrl: Interrupt cleanups and API change preparation Thomas Gleixner
2015-07-13 20:47 ` [patch 01/22] pinctrl/rockchip: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-13 20:47 ` [patch 02/22] pinctrl: " Thomas Gleixner
2015-07-13 20:47 ` [patch 03/22] pinctrl/exynos: " Thomas Gleixner
2015-07-13 20:47 ` [patch 04/22] pinctrl/bcm2835: Use irq_set_handler_locked() Thomas Gleixner
2015-07-13 20:47 ` [patch 05/22] pinctrl/baytrail: " Thomas Gleixner
2015-07-13 20:47 ` [patch 06/22] pinctrl/cherryview: " Thomas Gleixner
2015-07-13 20:47 ` [patch 07/22] pinctrl/intel: " Thomas Gleixner
2015-07-13 20:47 ` [patch 08/22] pinctrl/adi2: " Thomas Gleixner
2015-07-13 20:47 ` [patch 09/22] pinctrl/amd: " Thomas Gleixner
2015-07-13 20:47 ` [patch 10/22] pinctrl/at91: " Thomas Gleixner
2015-07-13 20:47 ` [patch 11/22] pinctrl/rockchip: " Thomas Gleixner
2015-07-13 20:47 ` [patch 12/22] pinctrl/qcom: " Thomas Gleixner
2015-07-13 20:47 ` [patch 13/22] pinctrl/exynos: " Thomas Gleixner
2015-07-13 20:47 ` [patch 14/22] pinctrl/samsung: " Thomas Gleixner
2015-07-13 21:09   ` Thomas Gleixner
2015-07-13 20:47 ` [patch 15/22] pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
2015-08-31 21:28   ` Paul Gortmaker
2015-09-08 14:00     ` Linus Walleij
2015-09-08 14:10       ` Thomas Gleixner
2015-09-08 14:50         ` Linus Walleij
2015-07-13 20:47 ` [patch 16/22] pinctrl/amd: Prepare amd_gpio_irq_handler for irq argument removal Thomas Gleixner
2015-07-13 20:48 ` [patch 17/22] pinctrl/coh901: Prepare u300_gpio_irq_handler " Thomas Gleixner
2015-07-13 20:48 ` [patch 18/22] pinctrl/pistachio: Prepare pistachio_gpio_irq_handler " Thomas Gleixner
2015-07-13 20:48 ` [patch 19/22] pinctrl/rockchip: Prepare rockchip_irq_demux " Thomas Gleixner
2015-07-13 20:48 ` [patch 20/22] pinctrl/qcom/msm: Prepare msm_gpio_irq_handler " Thomas Gleixner
2015-07-13 20:48 ` [patch 21/22] pinctrl/sirf: Prepare-x-gpio-handle-irq-for-irq-argument-removal.patch Thomas Gleixner
2015-07-13 20:48 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150713072816.137686428@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Julia.Lawall@lip6.fr \
    --cc=jiang.liu@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).