Re: [DRIVER SUBMISSION] DRBD wants to go mainline

From: Stefan Richter
Date: Sun Jul 22 2007 - 12:14:52 EST


Satyam Sharma wrote:
> On 7/22/07, Lars Ellenberg <lars.ellenberg@xxxxxxxxxx> wrote:
>> 94 WARNING: declaring multiple variables together should be avoided
>> int snr, enr;
>> does this really need to become two lines?
>
> No, if these are some unimportant temporary/automatic variables in
> some function.
>
> Yes, if they are members of some struct (also comment them in
> this case -- in fact give full kernel-doc style comments).

Don't overdo comments. Comments eventually get out of date and are then
dangerously misleading. Comment API elements. Comment on the Why if it
isn't obvious. It shouldn't be necessary to comment on the How, because
that should be coded in an obvious way in the first place.
--
Stefan Richter
-=====-=-=== -=== =-==-
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/