mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tests/pdx: define PAGE_SIZE as long
Otherwise Coverity complains about possibly shifting an integer more than 31 bits. This also reverts the previous attempt to fix this Coverity reported issue, commit4dd3230290. Suggested-by: Jan Beulich <jbeulich@suse.com> Coverity ID: 1662707 Fixes:cb50e40337('test/pdx: add PDX compression unit tests') Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
b979189a67
commit
477c664241
2 files changed
+2
-2
No files matched your search
@@ -33,7 +33,7 @@
|
||||
#define PAGE_SHIFT 12
|
||||
/* Some libcs define PAGE_SIZE in limits.h. */
|
||||
#undef PAGE_SIZE
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_SIZE (1L << PAGE_SHIFT)
|
||||
#define MAX_ORDER 18 /* 2 * PAGETABLE_ORDER (9) */
|
||||
|
||||
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
||||
|
||||
+1
-1
@@ -274,7 +274,7 @@ bool __init pfn_pdx_compression_setup(paddr_t base)
|
||||
|
||||
pfn_pdx_hole_shift = hole_shift;
|
||||
pfn_pdx_bottom_mask = (1UL << bottom_shift) - 1;
|
||||
ma_va_bottom_mask = ((paddr_t)PAGE_SIZE << bottom_shift) - 1;
|
||||
ma_va_bottom_mask = (PAGE_SIZE << bottom_shift) - 1;
|
||||
pfn_hole_mask = ((1UL << hole_shift) - 1) << bottom_shift;
|
||||
pfn_top_mask = ~(pfn_pdx_bottom_mask | pfn_hole_mask);
|
||||
ma_top_mask = pfn_top_mask << PAGE_SHIFT;
|
||||
|
||||