Hello Greg, On Mittwoch, 25. Juli 2007, Greg Ungerer wrote:
> And one style issue. Comments in the kernel should not be > c89/c++ style, don't use "//". See > linux-2.6.x/Documentation/CodingStyle. I had a look: > Chapter 7: Commenting > > Comments are good, but there is also a danger of over-commenting. > NEVER try to explain HOW your code works in a comment: it's much > better to write the code so that the _working_ is obvious, and it's a > waste of time to explain badly written code. > > Generally, you want your comments to tell WHAT your code does, not > HOW. Also, try to avoid putting comments inside a function body: if > the function is so complex that you need to separately comment parts > of it, you should probably go back to chapter 5 for a while. You can > make small comments to note or warn about something particularly > clever (or ugly), but try to avoid excess. Instead, put the comments > at the head of the function, telling people what it does, and > possibly WHY it does it. > > When commenting the kernel API functions, please use the kerneldoc > format. See the files Documentation/kernel-doc-nano-HOWTO.txt and > scripts/kernel-doc for details. So can you please show me where Linus has disallowed the "//"? regards Wolfgang -- Das Leben kann nur rückwärts verstanden, muß aber vorwärts gelebt werden. _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
