summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-22 13:04:16 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-08-31 12:29:07 +0200
commitfa141081b9e2b6c4ae963604fcb5b994ff322936 (patch)
tree02569232c362b5e8fb3e00ae29545d32b2491a2b /hw
parentf9406b84ba3f081dd0cd38bc28db4b8cd9134398 (diff)
downloadqemu-fa141081b9e2b6c4ae963604fcb5b994ff322936.zip
q35: 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> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-host/q35.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 0e472f2ed4..1ff648e80c 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -315,7 +315,7 @@ static void mch_update_pam(MCHPCIState *mch)
memory_region_transaction_begin();
for (i = 0; i < 13; i++) {
pam_update(&mch->pam_regions[i], i,
- pd->config[MCH_HOST_BRIDGE_PAM0 + ((i + 1) / 2)]);
+ pd->config[MCH_HOST_BRIDGE_PAM0 + (DIV_ROUND_UP(i, 2))]);
}
memory_region_transaction_commit();
}