
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090222124436.GA9867@game.jcrosoft.org you wrote:
On 13:52 Thu 19 Feb , ksi@koi8.net wrote:
Removed CHECK_NACK macro from Davinci I2C driver for code cleanup.
Signed-off-by: Sergey Kubushyn ksi@koi8.net
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