UPSTREAM: commonlib: Fix issues with { } and else
Fix the following errors and warning detected by checkpatch.pl:
ERROR: open brace '{' following struct go on the same line
ERROR: else should follow close brace '}'
WARNING: else is not generally useful after a break or return
False positives are detected for the following checkpatch.pl error.
ERROR: that open brace { should be on the previous line
These false positives are in cbfs.c for two function definitions.
TEST=Build and run Galileo Gen2
Change-Id: I5784e3d762f9d84582fce18239a04cb21d89eebf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 72c60a472b
Original-Change-Id: Ic679ff3a2e1cfc0ed52073c20165e05bf21d76f3
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18750
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/453370
This commit is contained in:
parent
1cd21171c6
commit
fba5bc3209
3 changed files with 4 additions and 8 deletions
|
|
@ -266,8 +266,7 @@ static size_t ffs_file_size(const EFI_FFS_FILE_HEADER *ffsfh)
|
|||
*/
|
||||
uint32_t file2_size = FFS_FILE2_SIZE(ffsfh);
|
||||
size = read_le32(&file2_size);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
size = read_le8(&ffsfh->Size[0]) << 0;
|
||||
size |= read_le8(&ffsfh->Size[1]) << 8;
|
||||
size |= read_le8(&ffsfh->Size[2]) << 16;
|
||||
|
|
|
|||
|
|
@ -77,8 +77,7 @@ static inline struct lb_uint64 pack_lb64(uint64_t value)
|
|||
return result;
|
||||
}
|
||||
|
||||
struct lb_header
|
||||
{
|
||||
struct lb_header {
|
||||
uint8_t signature[4]; /* LBIO */
|
||||
uint32_t header_bytes;
|
||||
uint32_t header_checksum;
|
||||
|
|
|
|||
|
|
@ -174,8 +174,7 @@ size_t ulz4fn(const void *src, size_t srcn, void *dst, size_t dstn)
|
|||
memcpy(out, in, size);
|
||||
if (size < b.size)
|
||||
break; /* output overrun */
|
||||
else
|
||||
out += size;
|
||||
out += size;
|
||||
} else {
|
||||
/* constant folding essential, do not touch params! */
|
||||
int ret = LZ4_decompress_generic(in, out, b.size,
|
||||
|
|
@ -183,8 +182,7 @@ size_t ulz4fn(const void *src, size_t srcn, void *dst, size_t dstn)
|
|||
full, 0, noDict, out, NULL, 0);
|
||||
if (ret < 0)
|
||||
break; /* decompression error */
|
||||
else
|
||||
out += ret;
|
||||
out += ret;
|
||||
}
|
||||
|
||||
in += b.size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue