]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Remove unnecessary casts and fix comment typos
authorSimon Glass <sjg@chromium.org>
Wed, 28 Jan 2015 05:13:40 +0000 (22:13 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:09 +0000 (12:59 +0200)
Tidy up the FSP support code a little.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/fsp/fsp_support.c

index bf3780711f836fe2db4282304b9e479e62cedae6..8b639f78197106e0010cb0c32d7b5ecf2e1dae3e 100644 (file)
@@ -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 */