Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d).
This patch is the result of coccinelle script
scripts/coccinelle/round.cocci
CC: Riku Voipio <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
int i, nw, j, k;
abi_ulong b, *target_fds;
- nw = (n + TARGET_ABI_BITS - 1) / TARGET_ABI_BITS;
+ nw = DIV_ROUND_UP(n, TARGET_ABI_BITS);
if (!(target_fds = lock_user(VERIFY_READ,
target_fds_addr,
sizeof(abi_ulong) * nw,
abi_long v;
abi_ulong *target_fds;
- nw = (n + TARGET_ABI_BITS - 1) / TARGET_ABI_BITS;
+ nw = DIV_ROUND_UP(n, TARGET_ABI_BITS);
if (!(target_fds = lock_user(VERIFY_WRITE,
target_fds_addr,
sizeof(abi_ulong) * nw,