public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MX31: change return value of get_cpu_rev
Date: Fri, 29 Apr 2011 14:54:58 +0200	[thread overview]
Message-ID: <m262px5ial.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4DBAAB9C.7030604@denx.de> (Stefano Babic's message of "Fri, 29 Apr 2011 14:14:20 +0200")

Hi Stefano,

[...]

>>> @@ -129,7 +129,7 @@ char *get_cpu_rev(void)
>>>  	for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
>>>  		if (srev == mx31_cpu_type[i].srev)
>>>  			return mx31_cpu_type[i].v;
>>> -		return "unknown";
>>> +	return srev;
>> 
>> Hm, so we drop the "unknown" case and return the srev unchanged.
>
> Yes, I have changed this behavior. I thought, if the revision is not in
> the table, it is better to know which is the value of srev register. I
> do not know if it is better to print only an "unknown" or get directly
> the value of the register, to check in some documentation which new
> version was put on the board.

Well, I do not insist on "unknown" - all I want is some way that someone
reading the message can tell whether it is a translated or an
untranslated value.  I.e. adding a second (sensible) output string for
no translation is also ok for me.

Cheers
  Detlev

-- 
Man is a fool, and woman, for tolerating him, is a damned fool
                       -- Mark Twain
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  reply	other threads:[~2011-04-29 12:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29  7:13 [U-Boot] [PATCH] MX31: change return value of get_cpu_rev Stefano Babic
2011-04-29 11:36 ` Detlev Zundel
2011-04-29 12:14   ` Stefano Babic
2011-04-29 12:54     ` Detlev Zundel [this message]
2011-04-29 14:00 ` [U-Boot] [PATCH V2] " Stefano Babic
2011-04-29 15:22   ` Detlev Zundel
2011-05-01 16:38 ` [U-Boot] [PATCH V3] " Stefano Babic

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=m262px5ial.fsf@ohwell.denx.de \
    --to=dzu@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