soc/intel: Remove superfluous pointers variables

Change-Id: I639be58df358129c1f420cf8d1540edd408859a7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25572
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Arthur Heymans
2018-04-09 23:14:22 +02:00
committed by Subrata Banik
parent 445368cdde
commit ac312c690c
3 changed files with 7 additions and 10 deletions

View File

@@ -316,7 +316,6 @@ void cbmem_top_init(void)
void *cbmem_top(void) void *cbmem_top(void)
{ {
struct ebda_config ebda_cfg; struct ebda_config ebda_cfg;
struct ebda_config *cfg = &ebda_cfg;
/* /*
* Check if Tseg has been initialized, we will use this as a flag * Check if Tseg has been initialized, we will use this as a flag
@@ -327,7 +326,7 @@ void *cbmem_top(void)
if (sa_get_tseg_base() == 0) if (sa_get_tseg_base() == 0)
return NULL; return NULL;
retrieve_ebda_object(cfg); retrieve_ebda_object(&ebda_cfg);
return (void *)(uintptr_t)cfg->tolum_base; return (void *)(uintptr_t)ebda_cfg.tolum_base;
} }

View File

@@ -40,13 +40,12 @@ static void create_soc_ebda(struct ebda_config *cfg)
void fill_ebda_area(void) void fill_ebda_area(void)
{ {
struct ebda_config ebda_cfg; struct ebda_config ebda_cfg;
struct ebda_config *cfg = &ebda_cfg;
/* Initialize EBDA area early during romstage. */ /* Initialize EBDA area early during romstage. */
setup_default_ebda(); setup_default_ebda();
create_soc_ebda(cfg); create_soc_ebda(&ebda_cfg);
create_mainboard_ebda(cfg); create_mainboard_ebda(&ebda_cfg);
write_ebda_data(cfg, sizeof(*cfg)); write_ebda_data(&ebda_cfg, sizeof(ebda_cfg));
} }
void retrieve_ebda_object(struct ebda_config *cfg) void retrieve_ebda_object(struct ebda_config *cfg)

View File

@@ -338,7 +338,6 @@ void cbmem_top_init(void)
void *cbmem_top(void) void *cbmem_top(void)
{ {
struct ebda_config ebda_cfg; struct ebda_config ebda_cfg;
struct ebda_config *cfg = &ebda_cfg;
/* /*
* Check if Tseg has been initialized, we will use this as a flag * Check if Tseg has been initialized, we will use this as a flag
@@ -349,7 +348,7 @@ void *cbmem_top(void)
if (sa_get_tseg_base() == 0) if (sa_get_tseg_base() == 0)
return NULL; return NULL;
retrieve_ebda_object(cfg); retrieve_ebda_object(&ebda_cfg);
return (void *)(uintptr_t)cfg->tolum_base; return (void *)(uintptr_t)ebda_cfg.tolum_base;
} }