projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
935b333
)
vga: 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/display/vga.c
patch
|
blob
|
history
diff --git
a/hw/display/vga.c
b/hw/display/vga.c
index 63421f9ee8563ce1f0a1f38de5957b29d43123c4..3433102ef3bbda9964256450665906147e1b661f 100644
(file)
--- a/
hw/display/vga.c
+++ b/
hw/display/vga.c
@@
-1621,7
+1621,7
@@
static void vga_draw_graphic(VGACommonState *s, int full_update)
s->line_compare, sr(s, VGA_SEQ_CLOCK_MODE));
#endif
addr1 = (s->start_addr * 4);
- bwidth =
(width * bits + 7) / 8
;
+ bwidth =
DIV_ROUND_UP(width * bits, 8)
;
y_start = -1;
d = surface_data(surface);
linesize = surface_stride(surface);