From 216712ae01993e83265470de1e29744a0970e4fa Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 17 Mar 2017 11:23:32 -0700 Subject: drivers/intel/fsp1_1: Fix issues detected by checkpatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/18886 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé --- src/drivers/intel/fsp1_1/fsp_util.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/drivers/intel/fsp1_1/fsp_util.c') 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; -- cgit v1.2.3