diff options
author | Paul Menzel <pmenzel@molgen.mpg.de> | 2017-10-27 11:05:14 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-11-03 07:52:52 +0000 |
commit | 64e83409a19f7a10524977442eead72db0bddb49 (patch) | |
tree | 14f72ee60fe52c0773c17f0213082b6e88b7f1b0 | |
parent | b843c5e3f32ebd57605d96e3bb0c6a714ac12900 (diff) |
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 <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
-rw-r--r-- | src/soc/intel/common/block/fast_spi/fast_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |