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

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Mon Feb 28 2000 - 20:54:28 EST


James Manning wrote:
> > 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

Very cool, though I'm wondering if it wouldn't be more useful to have a
list of check-able struct types... I am sure that not all struct
initializations need to be gcc-ified.

> 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 :)

Generally the macros are in the form of a keyboard macro which I record
as soon as I imagine the change, which makes it very context-specific.

The advantage of the keyboard macros over a script is that I can look at
a section of code and hit <Alt+1> for each change -- after I have
satisfied myself that the change is good and applicable to the section
of code that I am looking at... the number of errors is greatly reduced
over the "run a script and see what damage I caused" method ;)

-- 
Jeff Garzik              | "Are you the police?"
Building 1024            | 
MandrakeSoft, Inc.       | "No ma'am.  We're musicians."

- 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