[U-Boot] [PATCH] i2c: merge all i2c_reg_read() and i2c_reg_write() into inline functions

Wolfgang Denk wd at denx.de
Sat Oct 4 01:39:32 CEST 2008


Dear Timur,

In message <48E6A9D5.4050307 at freescale.com> you wrote:
> 
> The PRINTD is irrelevant.  If these platforms really want to debug single I2C
> operations, they can add the code back.  It's just debug code, so I would think
> that it's not worth sacrificing the improved code simplicity just for that.

This is your opinion. I think you cannot really speak for  others.  I
think  you  should  ask  the respective maintainers of the code first
before changing their code.

> > And when you claim "We can save space" - which sort of space are  you
> > talking about? Dos this reduce the memory footprint of the code?
> 
> I ran a couple tests, and u-boot.bin didn't change in size, but technically, it
> should be smaller because the compiler will optimize the code into a normal call
> to i2c_read or i2c_write.

Hm... why didn't the size change, then?


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
Quantum Mechanics is God's version of "Trust me."


More information about the U-Boot mailing list