All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Coding Style question
@ 2011-01-18 15:47 Kumar Gala
  2011-01-18 19:50 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2011-01-18 15:47 UTC (permalink / raw)
  To: u-boot

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 ?

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Coding Style question
  2011-01-18 15:47 [U-Boot] Coding Style question Kumar Gala
@ 2011-01-18 19:50 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2011-01-18 19:50 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <3D755410-9073-43DE-B772-D5649ED96294@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-18 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 15:47 [U-Boot] Coding Style question Kumar Gala
2011-01-18 19:50 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.