Skip to content
Commit 4515992f authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
parent 3fd968e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment