[PATCH 6/9] VC04_SERVICES: Add compat ioctl handler for "await completion"

Greg KH gregkh at linuxfoundation.org
Fri Jan 20 00:34:31 PST 2017


On Thu, Jan 19, 2017 at 07:12:37PM -0800, Michael Zoran wrote:
> On Thu, 2017-01-19 at 15:56 +0300, Dan Carpenter wrote:
> > Hm...  I had never used checkpatch.pl --fix until a few minutes ago.
> > 
> > Basically sending a zillion patches is the only way to do anything in
> > the linux-kernel.  You're not allowed to break the build, introduce
> > new compile warnings or bugs.  We review tons of these patches and
> > introducing bugs is pretty rare actually.
> > 
> > The plan would be to do:
> > 
> > for i in $(find drivers/staging/vc04_services/ -name \*.c) ; do
> > ./scripts/checkpatch.pl -f --fix-inplace $i ; done
> > 
> > Then use git citool.  Go through each file and select all the files
> > and
> > highlight all the places where it adds a blank line, right click and
> > select "Stage lines for commit".  Write a changelog, hit Sign-off and
> > that's [patch 1/x] "add blank lines".  Ignore false postives like
> > when
> > it adds a blank line before DEBUG_INITIALISE(g_state.local).
> > 
> > [patch 2/x] remove extra blank lines
> > [patch 3/x] line up parameters
> > 
> > Boring work.
> > 
> > Then go through manually and fix curly braces positions and other
> > things
> > where checkpatch.pl --fix doesn't work.  Turns out that there are
> > over
> > 400 left...  Some you can ignore if you feel like, but there are tons
> > that are trivial such as 45 of these: "WARNING: please, no spaces at
> > the
> > start of a line".
> > 
> > regards,
> > dan carpenter
> 
> For fun, I did a quick run of checkpatch.pl on the existing code.  
> Here is what I get.
> 
> total: 364 errors, 1035 warnings, 814 checks, 12958 lines checked
> 
> Sounds to me like kind of a mess.  The bar was very low for initially
> adding the driver, yet your process prevents any kind of cleanup in a
> serious way.
> 
> Like I said, these white space issues could have been fixed in 10
> seconds with a modern text editor if it was done before the initial
> change.  But it sounds like now you are stuck with it.

I don't understand the problem here.  You don't have to fix up the
whitespace issues if you don't want to, I'm not forcing you to do that,
and I don't think Dan is either.

If you are just moving functions/logic from one part of the file to
another, that's fine to leave them as-is also.

But, if you add new code, it has to be in the correct style, that's all,
it shouldn't be that difficult.

And yes, I could have just fixed all of the issues with my editor
instantly, but that is not what staging is for.  It is a "safe place"
for people to get comfortable with doing kernel development.  The fact
that there are so many "low hanging" basic coding style issues to fix in
it provides that capability.  If we were to just fix them all tomorrow,
then it would be much harder for people to find things to do when
learning the basic "how do I submit a kernel patch" process.

Does that help explain things a bit better?  If you want, I can clean up
the ioctl file instantly if it will make things easier for your future
work, as I don't want the coding style issues to get in your way.

thanks,

greg k-h



More information about the linux-rpi-kernel mailing list