From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] tools/libxc: Correct XC_DOM_PAGE_SIZE() to return a long long Date: Thu, 19 Nov 2015 14:45:41 +0000 Message-ID: <1447944341-31420-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Ian Jackson , Ian Campbell , Wei Liu List-Id: xen-devel@lists.xenproject.org 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 --- CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/include/xc_dom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h index 6f0c6e0..2176216 100644 --- a/tools/libxc/include/xc_dom.h +++ b/tools/libxc/include/xc_dom.h @@ -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 ---------------------------------------------- */ -- 2.1.4