Messages in this thread | | | Date | Sun, 6 Feb 2000 01:54:23 -0500 | From | James Manning <> | Subject | [PATCH] 2.3.42 take #3 on struct initializers (file_operations) |
| |
Quick rehash: We like named struct initialized, they make for less ifdef's, cleaner-looking code, easier to read, and smaller line counts.
As a first step, I wanted to cleanup file_operations initializers based on Alsa possibly adding some entries and wanting to do some quick perf checks to see if we can save some cache misses rearranging the members of this struct (moving on later to inode_operations)
Updated: Created perl script to convert gcc syntax initializers to c99 initializers. Doing this on a pre-patch 2.3.42 allows me to post 2 patches of cleanup, mutually exclusive. One if Linus likes gcc syntax, one if he likes c99 syntax
Note that the script doesn't convert structs with non-named initializers, mainly because it's hard to correctly handle all the ifdef's out there automatically... might make a version to handle structs w/o such cases and just flag the ones with cpp statements for manual fixup... hmmm
Perl script: http://sublogic.com/patches/c99.pl gcc syntax patch: http://sublogic.com/patches/file_operations-2.3.42-gcc.patch c99 syntax patch: http://sublogic.com/patches/file_operations-2.3.42-c99.patch
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/
| |