[U-Boot] [PATCH 1/2] console: Squelch pre-console output in console functions

Wolfgang Denk wd at denx.de
Tue Aug 30 21:01:05 CEST 2011


Dear Mike Frysinger,

In message <201108301316.56595.vapier at 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


More information about the U-Boot mailing list