From ac312c690ce16031dbe7612dac83dac387fad3d6 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 9 Apr 2018 23:14:22 +0200 Subject: soc/intel: Remove superfluous pointers variables Change-Id: I639be58df358129c1f420cf8d1540edd408859a7 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/25572 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Subrata Banik Reviewed-by: Aaron Durbin --- src/soc/intel/cannonlake/memmap.c | 5 ++--- src/soc/intel/common/block/ebda/ebda.c | 7 +++---- src/soc/intel/skylake/memmap.c | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/cannonlake/memmap.c b/src/soc/intel/cannonlake/memmap.c index 0636b08abe..108a1b016c 100644 --- a/src/soc/intel/cannonlake/memmap.c +++ b/src/soc/intel/cannonlake/memmap.c @@ -316,7 +316,6 @@ void cbmem_top_init(void) void *cbmem_top(void) { struct ebda_config ebda_cfg; - struct ebda_config *cfg = &ebda_cfg; /* * 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) 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; } diff --git a/src/soc/intel/common/block/ebda/ebda.c b/src/soc/intel/common/block/ebda/ebda.c index 4f60490824..d16ad6e4c0 100644 --- a/src/soc/intel/common/block/ebda/ebda.c +++ b/src/soc/intel/common/block/ebda/ebda.c @@ -40,13 +40,12 @@ static void create_soc_ebda(struct ebda_config *cfg) void fill_ebda_area(void) { struct ebda_config ebda_cfg; - struct ebda_config *cfg = &ebda_cfg; /* Initialize EBDA area early during romstage. */ setup_default_ebda(); - create_soc_ebda(cfg); - create_mainboard_ebda(cfg); - write_ebda_data(cfg, sizeof(*cfg)); + create_soc_ebda(&ebda_cfg); + create_mainboard_ebda(&ebda_cfg); + write_ebda_data(&ebda_cfg, sizeof(ebda_cfg)); } void retrieve_ebda_object(struct ebda_config *cfg) diff --git a/src/soc/intel/skylake/memmap.c b/src/soc/intel/skylake/memmap.c index 9151d967eb..f0ccb1dabc 100644 --- a/src/soc/intel/skylake/memmap.c +++ b/src/soc/intel/skylake/memmap.c @@ -338,7 +338,6 @@ void cbmem_top_init(void) void *cbmem_top(void) { struct ebda_config ebda_cfg; - struct ebda_config *cfg = &ebda_cfg; /* * 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) 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; } -- cgit v1.2.3