public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: stefano babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 3/4] ARM: Warn when the machine ID isn't set.
Date: Sun, 17 Jul 2011 10:26:12 +0200	[thread overview]
Message-ID: <4E229CA4.3020902@denx.de> (raw)
In-Reply-To: <4E2286CC.5010000@compulab.co.il>

Am 17/07/2011 08:53, schrieb Igor Grinberg:
>>> 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");
> 
> That is understood completely and that is not what I'm asking...
> I think that this warning should be printed not just for debug purposes...
> So, I'd prefer:
> 
> +	if (machid == BI_ARCH_NUMBER_INVALID)
> +		printf("Warning: machid not set.\n");
> 
> with no #ifdefs.

Agree. And because the goal of thi patch is to warn when the mach-id is
not set, I am expecting to see this warning on the console without
recompiling the code.

> So, I'm asking is it essential to make it only for debug purposes?

IMHO, I think no.

> Are there any cases when this code will harm if no #define DEBUG is specified?

Agree with you, I do not see any reason to output the warning only if
DEBUG is set

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
=====================================================================

  reply	other threads:[~2011-07-17  8:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 14:21 [U-Boot] [PATCH V2 0/4] make u-boot a bit easier for newcomers to port Christopher Harvey
2011-07-07 14:26 ` [U-Boot] [PATCH V2 1/4] Added documentation for CONFIG_SYS_TEXT_BASE Christopher Harvey
2011-08-04  6:20   ` Albert ARIBAUD
2011-08-24 18:34     ` Christopher Harvey
2011-08-24 19:12       ` Wolfgang Denk
2011-07-07 14:31 ` [U-Boot] [PATCH V2 2/4] Don't compile in large memory test function by default Christopher Harvey
2011-08-04  6:31   ` Albert ARIBAUD
2011-08-04 10:14     ` Wolfgang Denk
2011-08-04 10:54       ` Albert ARIBAUD
2011-08-04 10:20   ` Wolfgang Denk
2011-07-07 14:34 ` [U-Boot] [PATCH V2 3/4] ARM: Warn when the machine ID isn't set Christopher Harvey
2011-07-07 16:55   ` Igor Grinberg
2011-07-07 21:02     ` Igor Grinberg
2011-07-14 18:02   ` [U-Boot] [PATCH V3 " Christopher Harvey
2011-07-14 19:02     ` Igor Grinberg
2011-07-15 12:44       ` Stefano Babic
2011-07-17  6:53         ` Igor Grinberg
2011-07-17  8:26           ` stefano babic [this message]
2011-07-17  9:00             ` Albert ARIBAUD
2011-07-18 17:33     ` [U-Boot] [PATCH V4 " Christopher Harvey
2011-08-04  6:30       ` Albert ARIBAUD
2011-08-24 14:31         ` Albert ARIBAUD
2011-08-24 17:37           ` Christopher Harvey
2011-08-30 20:49       ` [U-Boot] [PATCH V5 " Christopher Harvey
2011-07-07 14:37 ` [U-Boot] [PATCH V2 4/4] Removed unused define, CONFIG_ARMV7 Christopher Harvey
2011-08-04  6:33   ` Albert ARIBAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E229CA4.3020902@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox