diff options
author | Laurent Vivier <lvivier@redhat.com> | 2016-05-31 18:35:56 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2016-06-07 18:19:24 +0300 |
commit | d0448de7f661070fad1602218f1b7d211e1c2270 (patch) | |
tree | 261f6b33437a52576440ae5e33729470bb59e347 /xen-hvm.c | |
parent | 207ba7c885c80ddb21a7f2fab8bd053fbc23ac3a (diff) |
xen: Use DIV_ROUND_UP
Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d).
This patch is the result of coccinelle script
scripts/coccinelle/round.cocci
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'xen-hvm.c')
-rw-r--r-- | xen-hvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -567,7 +567,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state, { hwaddr npages = size >> TARGET_PAGE_BITS; const int width = sizeof(unsigned long) * 8; - unsigned long bitmap[(npages + width - 1) / width]; + unsigned long bitmap[DIV_ROUND_UP(npages, width)]; int rc, i, j; const XenPhysmap *physmap = NULL; |