diff options
Diffstat (limited to 'src/lib/ramdetect.c')
-rw-r--r-- | src/lib/ramdetect.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/ramdetect.c b/src/lib/ramdetect.c index 9a29d0fe94..cef3d57234 100644 --- a/src/lib/ramdetect.c +++ b/src/lib/ramdetect.c @@ -11,15 +11,12 @@ int __weak probe_mb(const uintptr_t dram_start, const uintptr_t size) { uintptr_t addr = dram_start + (size * MiB) - sizeof(uint32_t); - static const uint32_t patterns[] = { - 0x55aa55aa, - 0x12345678 - }; - void *ptr = (void *) addr; + static const uint32_t patterns[] = {0x55aa55aa, 0x12345678}; + void *ptr = (void *)addr; size_t i; /* Don't accidentally clobber oneself. */ - if (OVERLAP(addr, addr + sizeof(uint32_t), (uintptr_t)_program, (uintptr_t) _eprogram)) + if (OVERLAP(addr, addr + sizeof(uint32_t), (uintptr_t)_program, (uintptr_t)_eprogram)) return 1; uint32_t old = read32(ptr); |