From: Lee Jones <lee.jones@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jiang Liu <jiang.liu@linux.intel.com>,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [patch 7/9] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
Date: Tue, 28 Jul 2015 09:05:50 +0100 [thread overview]
Message-ID: <20150728080550.GH14943@x1> (raw)
In-Reply-To: <20150712225929.995355888@linutronix.de>
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
next prev parent reply other threads:[~2015-07-28 8:07 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Lee Jones [this message]
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
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=20150728080550.GH14943@x1 \
--to=lee.jones@linaro.org \
--cc=jiang.liu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=tglx@linutronix.de \
/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 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.