* [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon
[not found] <1376149225-3997-1-git-send-email-Julia.Lawall@lip6.fr>
@ 2013-08-10 15:40 ` Julia Lawall
2013-08-10 16:13 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2013-08-10 15:40 UTC (permalink / raw)
To: Santosh Shilimkar
Cc: kernel-janitors, Kevin Hilman, Linus Walleij, linux-omap,
linux-gpio, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Replace a comma between expression statements by a semicolon.
A simplified version of the semantic patch that performs this
transformation is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression e1,e2,e;
type T;
identifier i;
@@
e1
-,
+;
e2;
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
I can't tell if the assignment to ct->regs.mask is really intended to be
under the if. The proposed patch preserves the current semantics, but not
the current indentation.
drivers/gpio/gpio-omap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index dfeb3a3..db80880 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1029,10 +1029,10 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned int irq_start,
ct->chip.irq_unmask = irq_gc_mask_clr_bit;
ct->chip.irq_set_type = gpio_irq_type;
- if (bank->regs->wkup_en)
- ct->chip.irq_set_wake = gpio_wake_enable,
-
- ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
+ if (bank->regs->wkup_en) {
+ ct->chip.irq_set_wake = gpio_wake_enable;
+ ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
+ }
irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
IRQ_NOREQUEST | IRQ_NOPROBE, 0);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon
2013-08-10 15:40 ` [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon Julia Lawall
@ 2013-08-10 16:13 ` Joe Perches
2013-08-12 16:15 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-08-10 16:13 UTC (permalink / raw)
To: Julia Lawall
Cc: Santosh Shilimkar, kernel-janitors, Kevin Hilman, Linus Walleij,
linux-omap, linux-gpio, linux-kernel
On Sat, 2013-08-10 at 17:40 +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> Replace a comma between expression statements by a semicolon.
[]
> I can't tell if the assignment to ct->regs.mask is really intended to be
> under the if. The proposed patch preserves the current semantics, but not
> the current indentation.
I'd suspect more that the indentation is correct
and the comma use incorrect.
It also looks more like a copy/paste error from
commit f8b46b583 when the code was restructured
a bit.
Kevin?
--------------------
-#ifdef CONFIG_ARCH_OMAP16XX
- /* REVISIT: assuming only 16xx supports MPUIO wake events */
- .irq_set_wake = gpio_wake_enable,
-#endif
-};
--------------------
+ /* REVISIT: assuming only 16xx supports MPUIO wake events */
+ if (cpu_is_omap16xx())
+ ct->chip.irq_set_wake = gpio_wake_enable,
--------------------
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
[]
> @@ -1029,10 +1029,10 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned int irq_start,
> ct->chip.irq_unmask = irq_gc_mask_clr_bit;
> ct->chip.irq_set_type = gpio_irq_type;
>
> - if (bank->regs->wkup_en)
> - ct->chip.irq_set_wake = gpio_wake_enable,
> -
> - ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
> + if (bank->regs->wkup_en) {
> + ct->chip.irq_set_wake = gpio_wake_enable;
> + ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
> + }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon
2013-08-10 16:13 ` Joe Perches
@ 2013-08-12 16:15 ` Kevin Hilman
2013-08-16 15:13 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2013-08-12 16:15 UTC (permalink / raw)
To: Joe Perches
Cc: Julia Lawall, Santosh Shilimkar, kernel-janitors, Linus Walleij,
linux-omap, linux-gpio, linux-kernel
Joe Perches <joe@perches.com> writes:
> On Sat, 2013-08-10 at 17:40 +0200, Julia Lawall wrote:
>> From: Julia Lawall <Julia.Lawall@lip6.fr>
>> Replace a comma between expression statements by a semicolon.
> []
>> I can't tell if the assignment to ct->regs.mask is really intended to be
>> under the if. The proposed patch preserves the current semantics, but not
>> the current indentation.
>
> I'd suspect more that the indentation is correct
> and the comma use incorrect.
>
> It also looks more like a copy/paste error from
> commit f8b46b583 when the code was restructured
> a bit.
>
> Kevin?
Yes, looks like a copy/paste error. The comma should simply be replaced
by a semi-colon.
Kevin
> --------------------
>
> -#ifdef CONFIG_ARCH_OMAP16XX
> - /* REVISIT: assuming only 16xx supports MPUIO wake events */
> - .irq_set_wake = gpio_wake_enable,
> -#endif
> -};
>
> --------------------
>
> + /* REVISIT: assuming only 16xx supports MPUIO wake events */
> + if (cpu_is_omap16xx())
> + ct->chip.irq_set_wake = gpio_wake_enable,
>
> --------------------
>
>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> []
>> @@ -1029,10 +1029,10 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned int irq_start,
>> ct->chip.irq_unmask = irq_gc_mask_clr_bit;
>> ct->chip.irq_set_type = gpio_irq_type;
>>
>> - if (bank->regs->wkup_en)
>> - ct->chip.irq_set_wake = gpio_wake_enable,
>> -
>> - ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
>> + if (bank->regs->wkup_en) {
>> + ct->chip.irq_set_wake = gpio_wake_enable;
>> + ct->regs.mask = OMAP_MPUIO_GPIO_INT / bank->stride;
>> + }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon
2013-08-12 16:15 ` Kevin Hilman
@ 2013-08-16 15:13 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-08-16 15:13 UTC (permalink / raw)
To: Kevin Hilman
Cc: Joe Perches, Julia Lawall, Santosh Shilimkar, kernel-janitors,
Linux-OMAP, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
On Mon, Aug 12, 2013 at 6:15 PM, Kevin Hilman <khilman@linaro.org> wrote:
> Joe Perches <joe@perches.com> writes:
>
>> On Sat, 2013-08-10 at 17:40 +0200, Julia Lawall wrote:
>>> From: Julia Lawall <Julia.Lawall@lip6.fr>
>>> Replace a comma between expression statements by a semicolon.
>> []
>>> I can't tell if the assignment to ct->regs.mask is really intended to be
>>> under the if. The proposed patch preserves the current semantics, but not
>>> the current indentation.
>>
>> I'd suspect more that the indentation is correct
>> and the comma use incorrect.
>>
>> It also looks more like a copy/paste error from
>> commit f8b46b583 when the code was restructured
>> a bit.
>>
>> Kevin?
>
> Yes, looks like a copy/paste error. The comma should simply be replaced
> by a semi-colon.
So can I have a patch for this? Pretty please...
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-16 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1376149225-3997-1-git-send-email-Julia.Lawall@lip6.fr>
2013-08-10 15:40 ` [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon Julia Lawall
2013-08-10 16:13 ` Joe Perches
2013-08-12 16:15 ` Kevin Hilman
2013-08-16 15:13 ` Linus Walleij
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).