From b8f7e223908ee0766616aa849bddb834fd18cdc0 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 1 Aug 2016 13:30:02 +0200 Subject: [PATCH] UPSTREAM: amd/amdfam10: eliminate dead code if (gart) { foo = gart?a:b; } never evaluates to foo=b. BUG=None BRANCH=None TEST=None Change-Id: I9d7d2e54797bce6f4e4138530af9295b15c90753 Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1347365 Reviewed-on: https://review.coreboot.org/16008 Tested-by: build bot (Jenkins) Reviewed-by: Omar Pakker Reviewed-by: Kysti Mlkki Reviewed-by: Paul Menzel Reviewed-on: https://chromium-review.googlesource.com/367360 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Furquan Shaikh --- src/northbridge/amd/amdfam10/misc_control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/northbridge/amd/amdfam10/misc_control.c b/src/northbridge/amd/amdfam10/misc_control.c index 775af66b9d..7cd9bff694 100644 --- a/src/northbridge/amd/amdfam10/misc_control.c +++ b/src/northbridge/amd/amdfam10/misc_control.c @@ -67,7 +67,7 @@ static void mcf3_read_resources(device_t dev) if (gart) { /* Add a Gart apeture resource */ resource = new_resource(dev, 0x94); - resource->size = gart?CONFIG_AGP_APERTURE_SIZE:1; + resource->size = CONFIG_AGP_APERTURE_SIZE; resource->align = log2(resource->size); resource->gran = log2(resource->size); resource->limit = 0xffffffff; /* 4G */