[U-Boot-Users] [PATCH 2/4] TQM885D: adjust for doubled flash sector size + some minor fixes

Wolfgang Denk wd at denx.de
Mon Aug 6 16:38:59 CEST 2007


In message <47F3F98010FF784EBEE6526EAAB078D1024F8672 at tq-mailsrv.tq-net.de> you wrote:
>
> Is it OK for comment lines to exceed 80 columns in general? I'm quite 

It should be avoided, but please do't just reformat text because of
that, espeially when the result is more ugly.

> often not sure, where to place comments correctly: At the end of a coded
> line, although the 80 column limit is exceeded? Or better in the line 
> before? Or at the end of the coded line, but with the comment splittet
> to several lines to not exceed 80 collums:

There is no genral rule.

> #define CFG_ENV_SECT_SIZE	0x40000 /* Total Size of Environment 
> 						     Sector */ 

That should always be avoided. There are some broken compilers around
which will see an unclosed comment here... ALways make sure to
terminate the comment on the same line in #define's:

	#define CFG_ENV_SECT_SIZE     0x40000	/* Total Size of */
						/* Environment Sector */

Now think of it - is this readable? Not good. And what if you need to
edit it? A nightmare. So it's probably better to but the commend in a
line above the #define.

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
Nothing ever becomes real till it is experienced -- even a proverb is
no proverb to you till your life has illustrated it.     - John Keats




More information about the U-Boot mailing list