Jamey Hicks writes:
> Actually, I have trouble with the routines that do not
> follow the standard calling convention, such as _lookup_processor_type. I
> keep recommenting the code with those exceptions, e.g.,
> bl __lookup_processor_type @ returns values in r8, r9, r10
> ...
> bl __lookup_architecture_type @ returns values in r5, r6, r7
> ...
> bl __create_page_tables @ uses r5, r6, r8, r8
The problem above is a good example of bad comments actually. Lets say someone
modifies __lookup_processor_type to return a value in r11, and __create_page_tables
to use the value in r11. They're not really going to update those comments.
This now means that the comments are wrong and confusing.
> I use the documentation at the head of the entry point to remember what the
> values were.
This is the correct place to comment that detail.
> I think we should be able to maintain single-line inline comments.
RHS comments are more acceptable than inline comments. However, keeping them
witin the 80 columns is difficult at the best of times.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King [EMAIL PROTECTED] --- ---
| | | | http://www.arm.linux.org.uk/ / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++