From 53c49ce41f3c8aba7d5dbcbacdcc34c3536f34a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Thu, 24 Jun 2021 13:15:55 +0200 Subject: [PATCH] intel/tools: fix left shift overflow on 32-bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc complains: ../src/intel/tools/aub_write.c:394:53: warning: left shift count >= width of type [-Wshift-count-overflow] 394 | assert((aub->phys_addrs_allocator + size) < (1UL << 32)); | ^~ Signed-off-by: Marcin Ĺšlusarz Reviewed-by: Jason Ekstrand Part-of: --- src/intel/tools/aub_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/tools/aub_write.c b/src/intel/tools/aub_write.c index ca3592ffdb7..e9443c5b82d 100644 --- a/src/intel/tools/aub_write.c +++ b/src/intel/tools/aub_write.c @@ -391,7 +391,7 @@ aub_map_ggtt(struct aub_file *aub, uint64_t virt_addr, uint64_t size) * receive from error2aub are page aligned. */ assert(virt_addr % 4096 == 0); - assert((aub->phys_addrs_allocator + size) < (1UL << 32)); + assert((aub->phys_addrs_allocator + size) < (1ULL << 32)); /* GGTT PT */ uint32_t ggtt_ptes = DIV_ROUND_UP(size, 4096);