From 35af5c47b030c0a1837cb34bc9ae4d50734fefb0 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Thu, 9 Mar 2017 17:35:28 -0800 Subject: src/lib: Fix spacing Fix the following errors and warnings detected by checkpatch.pl: ERROR: spaces required around that '?' (ctx:WxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '+=' (ctx:VxV) ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: space required after that close brace '}' ERROR: need consistent spacing around '+' (ctx:WxV) ERROR: need consistent spacing around '*' (ctx:WxV) ERROR: need consistent spacing around '&' (ctx:VxW) ERROR: spaces required around that '?' (ctx:VxW) ERROR: spaces required around that ':' (ctx:VxW) ERROR: trailing whitespace ERROR: space prohibited before that '++' (ctx:WxO) ERROR: space prohibited before that ',' (ctx:WxW) ERROR: space prohibited after that '!' (ctx:BxW) ERROR: spaces prohibited around that '->' (ctx:VxW) ERROR: space prohibited after that '-' (ctx:WxW) WARNING: space prohibited before semicolon WARNING: unnecessary whitespace before a quoted newline WARNING: missing space after return type Note that lib/libgcov.c and lib/lzmadecode.c are providing false positives for ERROR: need consistent spacing around '*' (ctx:WxV) An example is: void __gcov_merge_add(gcov_type *counters __attribute__ ((unused)), unsigned int n_counters __attribute__ ((unused))) {} TEST=Build and run on Galileo Gen2 Change-Id: I0016327a5754018eaeb25bedf42338291632c7c1 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18733 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/lib/ramtest.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lib/ramtest.c') diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c index 6d12060bfc..806e7d75a5 100644 --- a/src/lib/ramtest.c +++ b/src/lib/ramtest.c @@ -84,7 +84,7 @@ static int ram_bitset_nodie(unsigned long start) uint8_t verbose = 0; printk(BIOS_DEBUG, "DRAM bitset write: 0x%08lx\n", start); - for (idx=0; idx<0x400; idx+=4) { + for (idx = 0; idx < 0x400; idx += 4) { test_pattern(idx, &addr, &value); write_phys(start + addr, value); } @@ -94,7 +94,7 @@ static int ram_bitset_nodie(unsigned long start) printk(BIOS_DEBUG, "DRAM bitset verify: 0x%08lx\n", start); failures = 0; - for (idx=0; idx<0x400; idx+=4) { + for (idx = 0; idx < 0x400; idx += 4) { test_pattern(idx, &addr, &value); value2 = read_phys(start + addr); @@ -162,7 +162,7 @@ int ram_check_noprint_nodie(unsigned long start, unsigned long stop) unsigned short int idx; unsigned char failed, failures; - for (idx=0; idx<0x400; idx+=4) { + for (idx = 0; idx < 0x400; idx += 4) { test_pattern(idx, &addr, &value); write_phys(start + addr, value); } @@ -171,7 +171,7 @@ int ram_check_noprint_nodie(unsigned long start, unsigned long stop) phys_memory_barrier(); failures = 0; - for (idx=0; idx<0x400; idx+=4) { + for (idx = 0; idx < 0x400; idx += 4) { test_pattern(idx, &addr, &value); value2 = read_phys(start + addr); @@ -189,19 +189,19 @@ static void __quick_ram_check(uintptr_t dst) write_phys(dst, 0x55555555); phys_memory_barrier(); if (read_phys(dst) != 0x55555555) - fail=1; + fail = 1; write_phys(dst, 0xaaaaaaaa); phys_memory_barrier(); if (read_phys(dst) != 0xaaaaaaaa) - fail=1; + fail = 1; write_phys(dst, 0x00000000); phys_memory_barrier(); if (read_phys(dst) != 0x00000000) - fail=1; + fail = 1; write_phys(dst, 0xffffffff); phys_memory_barrier(); if (read_phys(dst) != 0xffffffff) - fail=1; + fail = 1; write_phys(dst, backup); if (fail) { -- cgit v1.2.3