• Jean Delvare's avatar
    [PATCH] I2C: Fix macro calls in chip drivers · c424d67c
    Jean Delvare authored
    I noticed that some I2C chip drivers (all written or reviewed by me, I
    feel ashamed to say) misuse macros. Passing function calls
    (simple_strtol in this case) to macros evaluating their argument up to 4
    times is certainly not wise and obviously performs poorly. It is not
    critical in that it happens only when writing to the chips (setting
    limits), which doesn't happen that often. However I'd say it's worth
    fixing.
    
    Thus, the patch below fixes that, by moving the function calls outside
    of the macro calls.
    Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    c424d67c
lm80.c 19.5 KB