Messages in this thread | | | Date | Mon, 26 May 2008 12:37:39 +0200 | From | Jörn Engel <> | Subject | Re: I am a volunteer |
| |
On Sun, 25 May 2008 23:00:51 +0200, Willy Tarreau wrote: > > reading code is 100% compatible with time constraints, as there is no > deadline. You can even say that a bug that you don't look at may stay > there for years. And quite frankly, spending more than one hour every > evening on code is generally enough to give you a headache. But you > will progress very quickly.
When looking for something to improve, it often helps to write a new code checker or run an existing one. If you don't know anything better, you can write a script that runs Lindent, takes the diff between the original file and the Lindent version and sorts files by diff size.
The point of this excercise is not to run Lindent on every file and submit patches for that. But most code checkers, even a stupid one like this, tend to warn about the same files. And those files tend to be ones that are badly maintained, have often been bitrotting for some years and could use some work. Even better, they are in such a bad shape that it's hard not to improve things.
For example, I once found something like the below in drivers/cdrom/:
#define FOO() \ bar(); \ bar(); \ bar(); \ bar();
...
if (baz) FOO();
So after macro extention, three of the four statements are always executed and only one is conditional. Since I didn't have hardware to test things I didn't change the code. My guess is the code still exists unchanged.
Jörn
-- All models are wrong. Some models are useful. -- George Box -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |