Re: [PATCH] Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

From: Joe Perches
Date: Fri Sep 04 2015 - 14:34:05 EST


On Fri, 2015-09-04 at 11:00 -0700, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> On Fri, Sep 04, 2015 at 05:48:55PM +0000, Jose Rivera wrote:
> > > -----Original Message-----
> > > From: Nayeemahmed Badebade [mailto:itachi.opsrc@xxxxxxxxx]
[]
> > > Fixed coding style issues where kernel types u16,u64,u32 should be
> > > preferred over uint16_t,uint64_t,uint32_t
[]
> > Thanks for your interests in helping us clean up this coding style issue.
> > However, doing this for all the files related to the MC bus driver (not just
> > for one) is something that I intend to do in a future patch as
> > part of the "Cleanup" item of our TODO list.
> > Doing this clean up across the board for all files is preferable than
> > doing it just for this file in this patch.
>
> Sorry, but we never postpone a change submitted by someone just because
> someone says "sometime in the future we will be making much the same
> change". That's a sure way to kill productivity and stop developers
> from helping you out.
>
> If you really wanted to make this type of change, you would have done so
> already, so obviously it's not a high priority. I'll take Nayeemahmed's
> patch.

There's a problem with doing this on a file-by-file
basis for a particular subsystem/driver.

Doing so can break compilation because of differences
between header files and compilation units.

It's likely much better to do something like:

$ git ls-files -- drivers/staging/fsl-mc/*.[ch] | \
xargs sed -r -i \
-e 's/\buint(8|16|32|64)_t\b/u\1/g' \
-e 's/\bint(8|16|32|64)_t\b/s\1/g'

then verify, compile, test, and submit the diff.

--
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/