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

Dan Carpenter dan.carpenter at oracle.com
Fri Jan 20 03:00:18 PST 2017

What Greg said.  No one is saying you have to clean this code up, it's
just that you were adding new code.  I actually didn't really have a big
issue with any of the patches except #2.

Also it's not that hard to clean the code.  I was looking at this some
more and you can use checkpatch.pl to fix one type of warning at a time:

for i in $(find drivers/staging/vc04_services/ -name \*.c) ; do
	./scripts/checkpatch.pl -f --show-types $i
done | tee warnings

egrep '(CHECK|WARNING|ERROR):' bar | sort | uniq -c | sort -rn | less

for i in $(find drivers/staging/vc04_services/ -name \*.c) ; do
	./scripts/checkpatch.pl -f --types=LINE_SPACING --fix-inplace $i

git citool.  Only add the added lines, ignore the false positives caused
by DEBUG_INITIALISE(g_state.local).  Write a small commit message.
Click sign.  Done.

That's 87 out of 1029 warnings fixed.

Then commit all the changes that remove a duplicate blank line.  That's
26 warnings.

Forget about the 4 remaining false positives: git diff | patch -p1 -R

for i in $(find drivers/staging/vc04_services/ -name \*.c) ; do
        ./scripts/checkpatch.pl -f --types=PARENTHESIS_ALIGNMENT --fix-inplace $i

That command fixes 350 warnings.  SPLIT_STRING fixes 49 warnings.

Then go through manually and fix all the comments.  That's another 100

It's not that hard...

dan carpenter

More information about the linux-rpi-kernel mailing list