From: Wolfgang Denk Date: Sun, 22 Feb 2009 22:27:38 +0100 Subject: [U-Boot] [PATCH] Davinci I2C code cleanup In-Reply-To: <20090222124436.GA9867@game.jcrosoft.org> References: <20090222124436.GA9867@game.jcrosoft.org> Message-ID: <20090222212738.E6971832E43F@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 Jean-Christophe PLAGNIOL-VILLARD, In message <20090222124436.GA9867@game.jcrosoft.org> you wrote: > On 13:52 Thu 19 Feb , ksi at koi8.net wrote: > > Removed CHECK_NACK macro from Davinci I2C driver for code cleanup. > > > > Signed-off-by: Sergey Kubushyn > > --- > > cpu/arm926ejs/davinci/i2c.c | 62 +++++++++++++++++++++++++--------- > > 1 files changed, 45 insertions(+), 17 deletions(-) > NACK > > please explain why Please see previous discussion about multibus I2C support. > IMHO duplicate code is really wrong I agree. The macro should indeed NOT be deleted, but it needs fixing. It is magically accessing the local variable "tmp" which [Quoting the CodingStyle] "...might look like a good thing, but it's confusing as hell when one reads the code and it's prone to breakage from seemingly innocent changes." I suggest that "tmp" gets passed as argument to the macro. 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 you go man, Keep as cool as you can. It riles them to believe that you perceive the web they weave. Keep on being free!