[<prev] [next>] [day] [month] [year] [list]
Message-ID: <55A4A096.2000405@linux.intel.com>
Date: Tue, 14 Jul 2015 13:39:34 +0800
From: Jiang Liu <jiang.liu@...ux.intel.com>
To: Ilia Mirkin <imirkin@...m.mit.edu>,
Thomas Gleixner <tglx@...utronix.de>
CC: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
linux-gpio@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch 18/19] gpio/msm-v2: Avoid redundant lookup of irq_data
On 2015/7/14 13:28, Ilia Mirkin wrote:
>
> On Jul 13, 2015 4:42 PM, "Thomas Gleixner" <tglx@...utronix.de
> <mailto:tglx@...utronix.de>> 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@...utronix.de
> <mailto:tglx@...utronix.de>>
>> Cc: Linus Walleij <linus.walleij@...aro.org
> <mailto:linus.walleij@...aro.org>>
>> Cc: Alexandre Courbot <gnurou@...il.com <mailto:gnurou@...il.com>>
>> Cc: Jiang Liu <jiang.liu@...ux.intel.com
> <mailto:jiang.liu@...ux.intel.com>>
>> Cc: linux-gpio@...r.kernel.org <mailto:linux-gpio@...r.kernel.org>
>> ---
>> drivers/gpio/gpio-msm-v2.c | 18 +++++-------------
>> 1 file changed, 5 insertions(+), 13 deletions(-)
>>
>> Index: tip/drivers/gpio/gpio-msm-v2.c
>> ===================================================================
>> --- tip.orig/drivers/gpio/gpio-msm-v2.c
>> +++ tip/drivers/gpio/gpio-msm-v2.c
>> @@ -187,14 +187,6 @@ static int msm_gpio_to_irq(struct gpio_c
>> return irq_create_mapping(domain, offset);
>> }
>>
>> -static inline int msm_irq_to_gpio(struct gpio_chip *chip, unsigned irq)
>> -{
>> - struct irq_data *irq_data = irq_get_irq_data(irq);
>> -
>> - return irq_data->hwirq;
>> -}
>> -
>> -
>> /* For dual-edge interrupts in software, since the hardware has no
>> * such support:
>> *
>> @@ -238,7 +230,7 @@ static void msm_gpio_update_dual_edge_po
>>w
>> static void msm_gpio_irq_ack(struct irq_data *d)
>> {
>> - int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq);
>> + int gpio = d->hw_irq;
>
> Does this build? It was hwirq above, not hw_irq.
Yeah, should be hwirq.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists