From f0809f9a38f81562638eb5576142b40e0e56a734 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 27 Jan 2015 22:13:40 -0700 Subject: x86: Remove unnecessary casts and fix comment typos Tidy up the FSP support code a little. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/fsp/fsp_support.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/x86') diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c index bf3780711f..8b639f7819 100644 --- a/arch/x86/lib/fsp/fsp_support.c +++ b/arch/x86/lib/fsp/fsp_support.c @@ -124,25 +124,25 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf) struct fsp_init_params *params_ptr; struct upd_region *fsp_upd; - fsp_hdr = (struct fsp_header *)find_fsp_header(); + fsp_hdr = find_fsp_header(); if (fsp_hdr == NULL) { /* No valid FSP info header was found */ panic("Invalid FSP header"); } - fsp_upd = (struct upd_region *)&shared_data.fsp_upd; + fsp_upd = &shared_data.fsp_upd; memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf)); /* Reserve a gap in stack top */ rt_buf.common.stack_top = (u32 *)stack_top - 32; rt_buf.common.boot_mode = boot_mode; - rt_buf.common.upd_data = (struct upd_region *)fsp_upd; + rt_buf.common.upd_data = fsp_upd; /* Get VPD region start */ fsp_vpd = (struct vpd_region *)(fsp_hdr->img_base + fsp_hdr->cfg_region_off); - /* Verifify the VPD data region is valid */ + /* Verify the VPD data region is valid */ assert((fsp_vpd->img_rev == VPD_IMAGE_REV) && (fsp_vpd->sign == VPD_IMAGE_ID)); @@ -150,7 +150,7 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf) memcpy(fsp_upd, (void *)(fsp_hdr->img_base + fsp_vpd->upd_offset), sizeof(struct upd_region)); - /* Verifify the UPD data region is valid */ + /* Verify the UPD data region is valid */ assert(fsp_upd->terminator == UPD_TERMINATOR); /* Override any UPD setting if required */ -- cgit v1.2.1