[<prev] [next>] [day] [month] [year] [list]
Message-ID: <b8bf37780911142219qf46108eo1427891ce0c2800a@mail.gmail.com>
Date: Sun, 15 Nov 2009 04:19:04 -0200
From: André Goddard Rosa <andre.goddard@...il.com>
To: Julia Lawall <julia@...u.dk>
Cc: linux list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 12/12] tree-wide: convert open calls to remove spaces
to skip_spaces() lib function
[stripped very long cc: line]
On Sun, Nov 8, 2009 at 6:23 PM, Julia Lawall <julia@...u.dk> wrote:
>> > Also, while at it, if we see (*str && isspace(*str)), we can be sure to
>> > remove the first condition (*str) as the second one (isspace(*str)) also
>> > evaluates to 0 whenever *str == 0, making it redundant. In other words,
>> > "a char equals zero is never a space".
>
> I tried the following semantic patch (http://coccinelle.lip6.fr), and got
> the results below.
>
> @@
> expression str;
> @@
>
> ( // ignore skip_spaces cases
> while (*str && isspace(*str)) { \(str++;\|++str;\) }
> |
> - *str &&
> isspace(*str)
> )
>
> I haven't checked the results in any way, however.
>
> julia
>
Hi, Julia!
Your patch looks good, but it conflicted at the following files
when I tried to apply it:
> diff -u -p a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
> diff -u -p a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c
That's because I had changed them as well.
The other ones you spotted I haven't seen originally:
> diff -u -p a/drivers/leds/led-class.c b/drivers/leds/led-class.c
> diff -u -p a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
> diff -u -p a/drivers/video/output.c b/drivers/video/output.c
Do you mind sending another patch or do you want me folding these in?
Thank you,
André
--
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