aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp1_1/fsp_util.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-17 11:23:32 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-17 22:13:34 +0100
commit216712ae01993e83265470de1e29744a0970e4fa (patch)
tree443adb76e3aa160cc57288a3b8227c65c2dd1926 /src/drivers/intel/fsp1_1/fsp_util.c
parent6ef5192627b07662e641feb5049f4183edde9105 (diff)
drivers/intel/fsp1_1: Fix issues detected by checkpatch
Fix the following error and warnings detected by checkpatch.pl: ERROR: "foo * bar" should be "foo *bar" WARNING: line over 80 characters WARNING: else is not generally useful after a break or return WARNING: braces {} are not necessary for single statement blocks WARNING: suspect code indent for conditional statements (16, 32) WARNING: Comparisons should place the constant on the right side of the test TEST=Build and run on Galileo Gen2 Change-Id: I9f56c0b0e3baf84989411e4a4b98f935725c013f Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18886 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Diffstat (limited to 'src/drivers/intel/fsp1_1/fsp_util.c')
-rw-r--r--src/drivers/intel/fsp1_1/fsp_util.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c
index 5ce753f4d4..0d09483f10 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.c
+++ b/src/drivers/intel/fsp1_1/fsp_util.c
@@ -45,9 +45,8 @@ FSP_INFO_HEADER *find_fsp(uintptr_t fsp_base_address)
fsp_ptr.u32 = fsp_base_address;
/* Check the FV signature, _FVH */
- if (fsp_ptr.fvh->Signature != 0x4856465F) {
+ if (fsp_ptr.fvh->Signature != 0x4856465F)
return (FSP_INFO_HEADER *)ERROR_NO_FV_SIG;
- }
/* Locate the file header which follows the FV header. */
fsp_ptr.u32 += fsp_ptr.fvh->ExtHeaderOffset;
@@ -65,22 +64,19 @@ FSP_INFO_HEADER *find_fsp(uintptr_t fsp_base_address)
/* Locate the Raw Section Header */
fsp_ptr.u32 += sizeof(EFI_FFS_FILE_HEADER);
- if (fsp_ptr.rs->Type != EFI_SECTION_RAW) {
+ if (fsp_ptr.rs->Type != EFI_SECTION_RAW)
return (FSP_INFO_HEADER *)ERROR_NO_INFO_HEADER;
- }
/* Locate the FSP INFO Header which follows the Raw Header. */
fsp_ptr.u32 += sizeof(EFI_RAW_SECTION);
/* Verify that the FSP base address.*/
- if (fsp_ptr.fih->ImageBase != fsp_base_address) {
+ if (fsp_ptr.fih->ImageBase != fsp_base_address)
return (FSP_INFO_HEADER *)ERROR_IMAGEBASE_MISMATCH;
- }
/* Verify the FSP Signature */
- if (fsp_ptr.fih->Signature != FSP_SIG) {
+ if (fsp_ptr.fih->Signature != FSP_SIG)
return (FSP_INFO_HEADER *)ERROR_INFO_HEAD_SIG_MISMATCH;
- }
/* Verify the FSP ID */
image_id = (u32 *)&fsp_ptr.fih->ImageId[0];
@@ -290,7 +286,8 @@ void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old,
}
}
-size_t EFIAPI fsp_write_line(uint8_t *buffer, size_t number_of_bytes)
+__attribute__((cdecl)) size_t fsp_write_line(uint8_t *buffer,
+ size_t number_of_bytes)
{
console_write_line(buffer, number_of_bytes);
return number_of_bytes;