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 <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18733
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Lee Leahy
2017-03-09 17:35:28 -08:00
committed by Martin Roth
parent fece39baa5
commit 35af5c47b0
12 changed files with 50 additions and 44 deletions

View File

@ -248,7 +248,7 @@ buffer_fn_data(const char *filename, const struct gcov_info *gi_ptr,
return &fn_buffer->next;
fail:
fprintf(stderr, "profiling:%s:Function %u %s %u \n", filename, fn_ix,
fprintf(stderr, "profiling:%s:Function %u %s %u\n", filename, fn_ix,
len ? "cannot allocate" : "counter mismatch", len ? len : ix);
return (struct gcov_fn_buffer **)free_fn_data(gi_ptr, fn_buffer, ix);
@ -289,7 +289,7 @@ gcov_version(struct gcov_info *ptr, gcov_unsigned_t version,
fprintf(stderr,
"profiling:%s:Version mismatch - expected %.4s got %.4s\n",
filename? filename : ptr->filename, e, v);
filename ? filename : ptr->filename, e, v);
return 0;
}
return 1;
@ -603,7 +603,7 @@ gcov_exit(void)
read_error:;
fprintf(stderr, "profiling:%s:%s merging\n", gi_filename,
error < 0 ? "Overflow": "Error");
error < 0 ? "Overflow" : "Error");
goto read_fatal;
@ -986,7 +986,7 @@ void
__gcov_average_profiler(gcov_type *counters, gcov_type value)
{
counters[0] += value;
counters[1] ++;
counters[1]++;
}
#endif