From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Virdi Date: Tue, 6 Mar 2012 09:51:48 +0530 Subject: [U-Boot] [PATCH 5/7] net/designware: Try configuring phy on each dw_eth_init In-Reply-To: <20120305190517.68366202D68@gemini.denx.de> References: <1330511846-1243-1-git-send-email-amit.virdi@st.com> <201202291411.41055.vapier@gentoo.org> <4F50B197.8020203@st.com> <201203021338.42692.vapier@gentoo.org> <4F54AF08.1030003@st.com> <20120305190517.68366202D68@gemini.denx.de> Message-ID: <4F5590DC.2040107@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wonfgang, On 3/6/2012 12:35 AM, Wolfgang Denk wrote: > 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 for explaining so well. I shall be sending V2 incorporating your suggestion. Best Regards Amit Virdi