On Tue, 10 Feb 2009, Wolfgang Denk wrote: > Dear k...@koi8.net, > > In message <pine.lnx.4.64ksi.0902091353360.32...@home-gw.koi8.net> you wrote: > > > > > Why do you here substitute a "dev->" with "&i2c_dev[adap_no]"? > > > Why not dev = &i2c_dev[adap_no] and you can let the dev-> unchanged. > > > > This eliminates one variable, dev. Another reason is uniformity through the > > entire driver source. > > But it makes the code harder to read. > > Maybe we should rather change the other places in the driver to do the > same? > > Note that it is NOT a goal for optimizations to save variables - > variables are extremely cheap, as they are just ameans to make the > code readable. The compiler will know much better than we how to > allocate memory or registers to hold such data. > > > Anyway, keeping that dev won't make any difference other than making the > > patch a tad shorter... > > ... and the code better readable.
OK, I can keep that dev, no problems. I'm not sure it makes code any more readable though... And it is just a couple of places. --- ****************************************************************** * k...@home KOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ****************************************************************** _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot