From 06ef04604570d402687245521731053c66888b15 Mon Sep 17 00:00:00 2001 From: Varad Gautam Date: Wed, 11 Mar 2015 09:54:41 +0530 Subject: global: Refactor get_option usage Restructure get_option() calls to avoid unnecessary return value checks by pre-assigning defaults to the options being retrieved. Change-Id: I9159afe149a8eeed0785d1efd6eee8420b88b8f4 Signed-off-by: Varad Gautam Reviewed-on: http://review.coreboot.org/8631 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Marc Jones --- src/cpu/amd/model_fxx/model_fxx_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/amd/model_fxx/model_fxx_init.c b/src/cpu/amd/model_fxx/model_fxx_init.c index 341bb620bd..a6561ee560 100644 --- a/src/cpu/amd/model_fxx/model_fxx_init.c +++ b/src/cpu/amd/model_fxx/model_fxx_init.c @@ -250,9 +250,8 @@ static void init_ecc_memory(unsigned node_id) } /* See if we scrubbing should be enabled */ - enable_scrubbing = 1; - if (get_option(&enable_scrubbing, "hw_scrubber") != CB_SUCCESS) - enable_scrubbing = CONFIG_HW_SCRUBBER; + enable_scrubbing = CONFIG_HW_SCRUBBER; + get_option(&enable_scrubbing, "hw_scrubber"); /* Enable cache scrubbing at the lowest possible rate */ if (enable_scrubbing) { -- cgit v1.2.3