projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9406b8
)
q35: use DIV_ROUND_UP
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 22 Jun 2017 11:04:16 +0000
(13:04 +0200)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 31 Aug 2017 10:29:07 +0000
(12:29 +0200)
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>
hw/pci-host/q35.c
patch
|
blob
|
history
diff --git
a/hw/pci-host/q35.c
b/hw/pci-host/q35.c
index 0e472f2ed4c9a108a7e952e729157fb2e4f6848a..1ff648e80c777d04cf2baadfb44933aaa7d88612 100644
(file)
--- 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();
}