replace DIV_ROUND with DIV_ROUND_CLOSEST
The Linux-compatible macro DIV_ROUND_CLOSEST is a bit more flexible
and safer than DIV_ROUND.
For example,
foo = DIV_ROUND_CLOSEST(x, y++)
works expectedly, but
foo = DIV_ROUND(x, y++)
does not. (y is incremented twice.)
Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing
- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c 2 additions, 1 deletionarch/arm/cpu/arm926ejs/mxs/spl_power_init.c
- arch/arm/cpu/armv7/omap-common/abb.c 3 additions, 3 deletionsarch/arm/cpu/armv7/omap-common/abb.c
- drivers/misc/mxc_ocotp.c 2 additions, 2 deletionsdrivers/misc/mxc_ocotp.c
- lib/strmhz.c 2 additions, 2 deletionslib/strmhz.c
Please register or sign in to comment