Re: [rfc patch] treewide: Convert "static const char <*> foo[] =" to"static const char <*> const foo[] ="

From: Mike Frysinger
Date: Thu Sep 09 2010 - 15:17:00 EST


On Thu, Sep 9, 2010 at 14:48, Joe Perches wrote:
> On Thu, 2010-09-09 at 14:29 -0400, Mike Frysinger wrote:
>> this is going to keep
>> creeping back in with new drivers unless we have something like
>> checkpatch.pl catching it ...
>
> These are added pretty slowly, but both of
>
> Â Â Â Âstatic char foo[] = "bar"
> and
> Â Â Â Âstatic const char *foo[] = {"bar"}
>
> could be warned by checkpatch

i dont think you even need to check the contents. just match the base:
char foo[]
const char *foo[]

we want to catch these even if it isnt static, and catching the
forward decl would be useful too.

>> where is the actual patch ?
>
> On my computer. Â300KB is pretty big to post.
> I'll sent it to you separately.

thanks. for reviewing/merging, probably be best to split up by
subsystem. the MTD parts look straight forward (part probe types), so
that'd be one big change. i'd even include the board changes in that
one commit.

same goes for the ASoC changes (most everything under sound/). looks
sane, so make one chunk for that and send to the ASoC guys.

your perl hack isnt quite right. the change to
drivers/mtd/maps/ixp2000.c and intel_vr_nor.c incorrectly ate leading
whitespace. how about making a coccinelle patch ? then you could add
it to scripts/coccinelle/ for other people to use in the future, and
hopefully these style changes wouldnt be broken in the process.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/