Re: Kernel code analysis (was Re: "movb" for spin-unlock (was Re: namei() query))

From: Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Date: Sat Apr 22 2000 - 14:03:35 EST


Tigran Aivazian <tigran@veritas.com> said:

[...]

> indeed a tall order. But what is more simple is perhaps to put these rules
> in a text file Documentation/CodingRules and let humans regularly go
> through the file and tidy/fix kernel code up if they have time.

> To add to the list I would mention things like:
>
> * don't use __initfunc, use __init

#define as #error; use grep(1)

> * use structure name tags in initializing things like file_operations

A bit of perl might help here?

> * use module_init/module_exit if feasible

grep(1) to check if they are there; add comment if impossible.

> and uniform state of the kernel code despite it being written by different
> humans.

> Maybe one could even merge CodingStyle and CodingRules into one? (bad
> style is almost a "bug" :)

Why "almost"? It is a bug in my book...

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- 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 : Sun Apr 23 2000 - 21:00:21 EST