Patchwork [v2,3/3] correct VNC_DIRTY_WORDS on 64 bit machine

login
register
mail settings
Submitter Wen Congyang
Date March 3, 2011, 6:49 a.m.
Message ID <4D6F39ED.90107@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/85238/
State New
Headers show

Comments

Wen Congyang - March 3, 2011, 6:49 a.m.
VNC_DIRTY_WORDS is wrong on 64 bit long machine.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>

---
 ui/vnc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/ui/vnc.h b/ui/vnc.h
index 8a1e7b9..5fc54e5 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -81,7 +81,7 @@  typedef void VncSendHextileTile(VncState *vs,
 
 #define VNC_MAX_WIDTH 2560
 #define VNC_MAX_HEIGHT 2048
-#define VNC_DIRTY_WORDS (VNC_MAX_WIDTH / (16 * BITS_PER_LONG))
+#define VNC_DIRTY_WORDS (DIV_ROUND_UP(VNC_MAX_WIDTH, (16 * BITS_PER_LONG)))
 
 #define VNC_STAT_RECT  64
 #define VNC_STAT_COLS (VNC_MAX_WIDTH / VNC_STAT_RECT)