From 64e83409a19f7a10524977442eead72db0bddb49 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 27 Oct 2017 11:05:14 +0200 Subject: soc/intel/common/block: Make integer literal unsigned long Fix the warning below by making the integer literal unsigned. ``` CC bootblock/soc/intel/common/block/*/lpc_lib.o src/soc/intel/common/block/lpc/lpc_lib.c:91:17: warning: The result of the \ '<<' expression is undefined alignment = 1 << (log2_ceil(window_size)); ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Found-by: Clang static analyzer scan-build (clang version 4.0.1-6 (tags/RELEASE_401/final)) Fixes: e237f8b7 (soc/apollolake/lpc: Open I/O to LPC based on resource allocation) Change-Id: I094fb469f020f3c1fae936e304b4458858842a8e Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/22198 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie --- src/soc/intel/common/block/fast_spi/fast_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/common/block/fast_spi') diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c index 87cafb976e..1d3a3c8b51 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi.c @@ -230,7 +230,7 @@ void fast_spi_cache_bios_region(void) return; /* Round to power of two */ - alignment = 1 << (log2_ceil(bios_size)); + alignment = 1UL << (log2_ceil(bios_size)); bios_size = ALIGN_UP(bios_size, alignment); base = 4ULL*GiB - bios_size; -- cgit v1.2.3