[U-Boot] Coding Style question
Wolfgang Denk
wd at denx.de
Tue Jan 18 20:50:06 CET 2011
Dear Kumar Gala,
In message <3D755410-9073-43DE-B772-D5649ED96294 at kernel.crashing.org> you wrote:
> In a header define register fields we have something like:
>
> > +#define CSOR_NAND_TRHZ_MASK 0x0000001C /* Time for Read Enable
> > + High to Output High
> > + Impedance */
>
> Is this multiple line comment style ok - since we are dealing with line wrap ?
I dislike it, and always try hard to avoind things like this.
It would probably better to write instead
/* Time for Read Enable High to Output High Impedance */
#define CSOR_NAND_TRHZ_MASK 0x0000001C
Note that I have even seen compilers (some time ago, admitted) where
such code would cause build errors (that version of the compiler
would 1) insert "0x0000001C /* Time for Read Enable" for
CSOR_NAND_TRHZ_MASK and 2) barf loudly about a lot of unterminated and
one un-opened comments).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I'm frequently appalled by the low regard you Earthmen have for life.
-- Spock, "The Galileo Seven", stardate 2822.3
More information about the U-Boot
mailing list