
Dear ksi@koi8.net,
In message Pine.LNX.4.64ksi.0902091353360.32084@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.
Best regards,
Wolfgang Denk