[PATCH] make checkstruct (was Re: [PATCH] file_operations policing and CodingStyle addition)

From: James Manning (jmm@computer.org)
Date: Mon Feb 28 2000 - 20:24:01 EST


[ Monday, February 28, 2000 ] Jeff Garzik wrote:
> gccify.pl looks useful, but I generally trust my cooledit macros more
> than a Perl script which it comes to automatically updating code -- at
> least with cooledit the process is somewhat interactive, with erroneous
> results or special cases immediately visible and obvious.

I wouldn't personally trust *anything* with automatically updating code
(aside from whitespace, but even that is iffy :).

Rest assured that I vim (with syntax highlighting) every patch and scan
it before submitting it. One of the structs had a comment of the form
"/* foo *//* bar */" which my code did wrong the first time around since
it checked for C++ comments first, leaving "/* foo *". :)

I'm personally going to be feeding each patch per-struct (like
file_operations was done) to make things sane all-around. I'll be making
attempt #3 at feeding inode_operations fixes soon :)

> Would you consider creating a makefile target which simply lists files
> in the source tree which need updating? "make checkstruct" or
> something?

attached :) I'm sure the semantics need work but it's a first pass (if
admittedly useless since the fops was about all that's been converted :)

jmm@ns1:/usr/src/linux-check> make checkstruct|wc -l
    946

If you do end up doing the initialization edits with cooledit (or
whatever), please take the time to give the perl script a shot at
it (modifying element_map as necessary) in case it helps catch
cases that could be fed back to make the perl a little better :)

James



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:21 EST