]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
tools/libxc: Correct XC_DOM_PAGE_SIZE() to return a long long
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Nov 2015 14:45:41 +0000 (14:45 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 20 Nov 2015 14:24:02 +0000 (14:24 +0000)
c/s abdf3c5b "libxc: create p2m list outside of kernel mapping if supported"
introduces a use which Coverity objects to; an int used to mask a uint64_t.

The result needs to be signed to allow ~XC_DOM_PAGE_SIZE() to function
correctly, and long long to function properly in 32bit builds.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/include/xc_dom.h

index 6f0c6e08f0ae61145dd6231d82386e6fc7789313..217621600a247eec481fd9d9d38e85b8a3ab7f2f 100644 (file)
@@ -249,7 +249,7 @@ struct xc_dom_arch {
 void xc_dom_register_arch_hooks(struct xc_dom_arch *hooks);
 
 #define XC_DOM_PAGE_SHIFT(dom)  ((dom)->arch_hooks->page_shift)
-#define XC_DOM_PAGE_SIZE(dom)   (1 << (dom)->arch_hooks->page_shift)
+#define XC_DOM_PAGE_SIZE(dom)   (1LL << (dom)->arch_hooks->page_shift)
 
 /* --- main functions ---------------------------------------------- */