Re: [PATCH] fixed coding style issues

From: Joe Perches
Date: Wed Jul 25 2012 - 04:01:17 EST


On Wed, 2012-07-25 at 15:44 +0800, Baodong Chen wrote:
> i want to participate in and to start from
> fixing simple issues!

That's fine Baodong. Welcome.

> how could i choose issues form checkpatch's output to find which
> should be fixed which are
> not?

checkpatch output is merely a guide for submission of patches
to conform to some generic "kernel style". I think there are
times when really ugly code should have a pass to make it more
"kernel style" like. Most of those cleanup type changes should
be done only to code in the "drivers/staging" directory.

I think most of the time, unless you are also fixing some other
underlying code defect or shortcoming, checkpatch only cleanups
to existing code are best avoided.

I suggest for now, until you are really comfortable with the
preferred style, you confine yourself to drivers/staging.

> or checkpatch.pl should be updated??

You could work on that too.

One possibility is to write a utility to take checkpatch output
and generate patches automatically, or perhaps extend checkpatch
itself to do that. (ie: add a --fix option)

cheers, Joe

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