[coreboot-gerrit] Change in coreboot[master]: soc/intel: Remove superfluous pointers variables

Arthur Heymans (Code Review) gerrit at coreboot.org
Mon Apr 9 23:15:25 CEST 2018


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/25572


Change subject: soc/intel: Remove superfluous pointers variables
......................................................................

soc/intel: Remove superfluous pointers variables

Change-Id: I639be58df358129c1f420cf8d1540edd408859a7
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/soc/intel/cannonlake/memmap.c
M src/soc/intel/common/block/ebda/ebda.c
M src/soc/intel/skylake/memmap.c
3 files changed, 7 insertions(+), 10 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/25572/1

diff --git a/src/soc/intel/cannonlake/memmap.c b/src/soc/intel/cannonlake/memmap.c
index 0636b08..108a1b0 100644
--- a/src/soc/intel/cannonlake/memmap.c
+++ b/src/soc/intel/cannonlake/memmap.c
@@ -316,7 +316,6 @@
 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 @@
 	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 4f60490..d16ad6e 100644
--- a/src/soc/intel/common/block/ebda/ebda.c
+++ b/src/soc/intel/common/block/ebda/ebda.c
@@ -40,13 +40,12 @@
 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 9151d96..f0ccb1d 100644
--- a/src/soc/intel/skylake/memmap.c
+++ b/src/soc/intel/skylake/memmap.c
@@ -338,7 +338,6 @@
 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 @@
 	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;
 }

-- 
To view, visit https://review.coreboot.org/25572
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I639be58df358129c1f420cf8d1540edd408859a7
Gerrit-Change-Number: 25572
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180409/874fd2c3/attachment-0001.html>


More information about the coreboot-gerrit mailing list