[U-Boot] [PATCH 15/23] x86: Remove unnecessary casts and fix comment typos

Bin Meng bmeng.cn at gmail.com
Tue Jan 27 13:32:02 CET 2015


On Tue, Jan 27, 2015 at 9:23 AM, Simon Glass <sjg at chromium.org> wrote:
> Tidy up the FSP support code a little.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  arch/x86/lib/fsp/fsp_support.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
> index bf37807..8b639f7 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 */
> --

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list