diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-22 13:04:16 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-08-31 12:29:07 +0200 |
commit | f0704d78b42423f6040e224452cee4ee4aff30cc (patch) | |
tree | 9e00319bcc7d616cfe9ca40093fcf411d0ec95a2 /target/ppc/translate.c | |
parent | 0ef1efcf944fcc950840f068da5513311ee55a6d (diff) | |
download | qemu-f0704d78b42423f6040e224452cee4ee4aff30cc.zip qemu-f0704d78b42423f6040e224452cee4ee4aff30cc.tar.gz qemu-f0704d78b42423f6040e224452cee4ee4aff30cc.tar.bz2 |
ppc: use DIV_ROUND_UP
I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extra
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r-- | target/ppc/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 01233e8..606b605 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -2880,7 +2880,7 @@ static void gen_lswi(DisasContext *ctx) } if (nb == 0) nb = 32; - nr = (nb + 3) / 4; + nr = DIV_ROUND_UP(nb, 4); if (unlikely(lsw_reg_in_range(start, nr, ra))) { gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX); return; |