summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-10 08:45:30 -0800
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-10 20:08:02 +0100
commite686ee8bf7b40d3aed16a4d6d9a42f99ab31ad8e (patch)
treebcbb1f8f71e89e8fd700a3ec07d753bb7648a7af /src/drivers
parentb2b97a5db27befc10b015c8971c35e7ff6993d09 (diff)
downloadcoreboot-e686ee8bf7b40d3aed16a4d6d9a42f99ab31ad8e.tar.xz
drivers/intel/fsp2_0: Remove braces for single statements
Fix the following warning detected by checkpatch.pl: WARNING: braces {} are not necessary for single statement blocks TEST=Build and run on Galileo Gen2 Change-Id: Ibd351703e60acebbacd6ae5b1a2fa1cb34fd3ff9 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/18745 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c6
-rw-r--r--src/drivers/intel/fsp2_0/silicon_init.c9
2 files changed, 5 insertions, 10 deletions
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 46dd2ef8d5..559d83e9df 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -293,9 +293,8 @@ static void do_fsp_memory_init(struct fsp_header *hdr, bool s3wake,
upd = (FSPM_UPD *)(hdr->cfg_region_offset + hdr->image_base);
- if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE) {
+ if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE)
die("Invalid FSPM signature!\n");
- }
/* Copy the default values from the UPD area */
memcpy(&fspm_upd, upd, sizeof(fspm_upd));
@@ -417,9 +416,8 @@ void fsp_memory_init(bool s3wake)
else
status = load_fspm_xip(&hdr, &file_data);
- if (status != CB_SUCCESS) {
+ if (status != CB_SUCCESS)
die("Loading FSPM failed!\n");
- }
/* Signal that FSP component has been loaded. */
prog_segment_loaded(hdr.image_base, hdr.image_size, SEG_FINAL);
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index a57f97603e..9f0bf7c892 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -32,9 +32,8 @@ static void do_silicon_init(struct fsp_header *hdr)
supd = (FSPS_UPD *) (hdr->cfg_region_offset + hdr->image_base);
- if (supd->FspUpdHeader.Signature != FSPS_UPD_SIGNATURE) {
+ if (supd->FspUpdHeader.Signature != FSPS_UPD_SIGNATURE)
die("Invalid FSPS signature\n");
- }
memcpy(&upd, supd, sizeof(upd));
@@ -96,16 +95,14 @@ void fsps_load(bool s3wake)
size = region_device_sz(&rdev);
dest = cbmem_add(CBMEM_ID_REFCODE, size);
- if (dest == NULL) {
+ if (dest == NULL)
die("Could not add FSPS to CBMEM!\n");
- }
if (rdev_readat(&rdev, dest, 0, size) < 0)
die("Failed to read FSPS!\n");
- if (fsp_component_relocate((uintptr_t)dest, dest, size) < 0) {
+ if (fsp_component_relocate((uintptr_t)dest, dest, size) < 0)
die("Unable to relocate FSPS!\n");
- }
/* Create new region device in memory after relocation. */
rdev_chain(&rdev, &addrspace_32bit.rdev, (uintptr_t)dest, size);