From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 30 Aug 2011 21:01:05 +0200 Subject: [U-Boot] [PATCH 1/2] console: Squelch pre-console output in console functions In-Reply-To: <201108301316.56595.vapier@gentoo.org> References: <1314620046-26187-1-git-send-email-graeme.russ@gmail.com> <1314620046-26187-2-git-send-email-graeme.russ@gmail.com> <201108301316.56595.vapier@gentoo.org> Message-ID: <20110830190105.BBE5C18C46FA@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message <201108301316.56595.vapier@gentoo.org> you wrote: > > On Monday, August 29, 2011 08:14:05 Graeme Russ wrote: > > --- a/drivers/i2c/soft_i2c.c > > +++ b/drivers/i2c/soft_i2c.c > >=20 > > #ifdef DEBUG_I2C > > #define PRINTD(fmt,args...) do { \ > > - if (gd->have_console) \ > > printf (fmt ,##args); \ > > } while (0) > > #else > > the "do {} while (0)" can go away now It is safer to keep it, especially with the if construct. 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 There's nothing disgusting about it [the Companion]. It's just another life form, that's all. You get used to those things. -- McCoy, "Metamorphosis", stardate 3219.8