public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7] net/designware: Try configuring phy on each dw_eth_init
Date: Mon, 05 Mar 2012 20:05:17 +0100	[thread overview]
Message-ID: <20120305190517.68366202D68@gemini.denx.de> (raw)
In-Reply-To: <4F54AF08.1030003@st.com>

Dear Amit Virdi,

In message <4F54AF08.1030003@st.com> you wrote:
> 
> Surprisingly, I could still not find "true" and "false" defined for ARM
> architecture or in a common file that I can include. Here's what grep 
> gives me

So don't use these.

In theory, any use of #define TRUE / FALSE or enum bool or plain use
of raw 0 and 1 is fine - but only as long as you make sure to use this
consistently within the whole project.

If I am forced to use something like this, I prefer the enum as this
can be decoded by a debugger.  But in general, I try to avod it, and
use plain C logic instead - because then I can just read and
understand the code, in all other cases I have to look up definitions,
especially when it comes to parameter passings.

In your specific case, you use TRUE and FALSE just in one single
place, for one single variable.  Dumpt that.  Use 0 and 1, and
everybody can read the code.

Thanks.

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
What is tolerance? -- it is the consequence of humanity. We  are  all
formed  of frailty and error; let us pardon reciprocally each other's
folly -- that is the first law of nature.                  - Voltaire

  reply	other threads:[~2012-03-05 19:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 10:37 [U-Boot] [PATCH 0/7] net/designware: Bug fixes Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 1/7] net/designware: Fix to restore hw mac address Amit Virdi
2012-02-29 19:09   ` Mike Frysinger
2012-03-02 11:27     ` Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 2/7] net/designware: Fix the max frame length size Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 3/7] net/designware: Phy address fix Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 4/7] net/designware: Consecutive writes must have delay Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 5/7] net/designware: Try configuring phy on each dw_eth_init Amit Virdi
2012-02-29 19:11   ` Mike Frysinger
2012-03-02 11:40     ` Amit Virdi
2012-03-02 18:38       ` Mike Frysinger
2012-03-05 12:18         ` Amit Virdi
2012-03-05 19:05           ` Wolfgang Denk [this message]
2012-03-06  4:21             ` Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 6/7] net/designware: Program phy registers when auto-negotiation is ON Amit Virdi
2012-02-29 10:37 ` [U-Boot] [PATCH 7/7] net/designware: Set ANAR to 0x1e1 Amit Virdi
2012-03-07  9:49 ` [U-Boot] [PATCH 0/7] net/designware: Bug fixes Amit Virdi
2012-03-07  9:55   ` Stefan Roese
2012-03-07 10:05     ` Amit Virdi
2012-03-07 12:15       ` Amit Virdi
2012-03-07 12:36     ` Wolfgang Denk
2012-03-07 16:10       ` Joe Hershberger
2012-03-08 10:55         ` Wolfgang Denk

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=20120305190517.68366202D68@gemini.denx.de \
    --to=wd@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