Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3965
-gerrit
commit c959eff45df65516731c1d5a0cbf137ce1d13546 Author: Paul Menzel paulepanter@users.sourceforge.net Date: Sat Oct 12 21:29:26 2013 +0200
northbridge/amd/amdk8/raminit_f_dqs.c: Remove unused variable `reg` in `setup_mtrr_dqs()`
Trying to build the ASUS M2V-MX SE, gcc aborts with the following error.
$ ./util/crossgcc/xgcc/i386-elf/bin/gcc --version gcc (coreboot toolchain v1.20 December 4th, 2012) 4.7.3 $ make V=1 […] CC romstage.inc /src/coreboot/util/crossgcc/xgcc/bin/i386-elf-gcc -MMD -Isrc -Isrc/include -Ibuild -Isrc/arch/x86/include -Isrc/device/oprom/include -include src/include/kconfig.h -Os -pipe -g -nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wstrict-aliasing -Wshadow -Werror -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer -D__PRE_RAM__ -Isrc -I. -Ibuild -c -S src/mainboard/asus/m2v-mx_se/romstage.c -o build/mainboard/asus/m2v-mx_se/romstage.pre.inc In file included from src/northbridge/amd/amdk8/raminit_f.c:2905:0, from src/mainboard/asus/m2v-mx_se/romstage.c:67: src/northbridge/amd/amdk8/raminit_f_dqs.c: In function 'setup_mtrr_dqs': src/northbridge/amd/amdk8/raminit_f_dqs.c:1738:11: error: variable 'reg' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors make: *** [build/mainboard/asus/m2v-mx_se/romstage.pre.inc] Error 1
Removing the variable `reg` solves this issue.
(The question is, why haven’t our build tests done by Jenkins caught this.)
Change-Id: I7fc7819c329c058472031e82237be5c170b277f4 Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- src/northbridge/amd/amdk8/raminit_f_dqs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/northbridge/amd/amdk8/raminit_f_dqs.c b/src/northbridge/amd/amdk8/raminit_f_dqs.c index 08a3bab..4438340 100644 --- a/src/northbridge/amd/amdk8/raminit_f_dqs.c +++ b/src/northbridge/amd/amdk8/raminit_f_dqs.c @@ -1735,7 +1735,6 @@ static void set_top_mem_ap(unsigned tom_k, unsigned tom2_k)
static void setup_mtrr_dqs(unsigned tom_k, unsigned tom2_k) { - unsigned reg; msr_t msr;
#if 0 @@ -1752,7 +1751,7 @@ static void setup_mtrr_dqs(unsigned tom_k, unsigned tom2_k) wrmsr(0x258, msr);
//[1M, TOM) - reg = range_to_mtrr(2, 0, tom_k,4*1024*1024, MTRR_TYPE_WRBACK, 40); + range_to_mtrr(2, 0, tom_k,4*1024*1024, MTRR_TYPE_WRBACK, 40);
//[4G, TOM2) if(tom2_k) {