[U-Boot] [PATCH V3 3/4] ARM: Warn when the machine ID isn't set.

Stefano Babic sbabic at denx.de
Fri Jul 15 14:44:43 CEST 2011


On 07/14/2011 09:02 PM, Igor Grinberg wrote:

>> +#ifdef DEBUG
>> +	if (machid == BI_ARCH_NUMBER_INVALID)
>> +	        printf("Warning: machid not set.\n");
>> +#endif
>> +
> 
> Is it essential to enclose that check in #ifdef DEBUG?
> IMHO, it can be useful also with no DEBUG defined,
> so I'd add it without the #ifdef DEBUG.
> 
> Also, in the printf line, you are mixing tabs with spaces
> (sorry for not noticing this in previous versions...).

...and if you want to print something only for debug purposes, the best
way is to substitute printf() with debug() and get rid of #ifdef.

+	if (machid == BI_ARCH_NUMBER_INVALID)
+	        debug("Warning: machid not set.\n");

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list