[coreboot-gerrit] New patch to review for coreboot: 4216224 southbridge/intel/i82801ix/lpc.c: Remove unused variable `dummy`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Mon Oct 21 09:38:13 CEST 2013

Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3982


commit 42162246f0185ecf8148f6a6a986b743e3a19837
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Mon Oct 21 09:28:19 2013 +0200

    southbridge/intel/i82801ix/lpc.c: Remove unused variable `dummy`
    Removing `-Wno-unused-but-set-variable` from `CFLAGS` the build for
    QEMU Q35 and Roda RK9, both using the Intel 82801Ix southbridge, fail
    with the following error.
    	src/southbridge/intel/i82801ix/lpc.c: In function 'i82801ix_enable_apic':
    	src/southbridge/intel/i82801ix/lpc.c:45:5: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
    	cc1: all warnings being treated as errors
    Removing `dummy` should be safe as GCC probably optimizes it away before
    anyway. That no dummy variable is used for an RCBA [1] access in Intel
    Lynx Point supports that this can be dropped safely.
    [1] root complex base address
    [2] src/southbridge/intel/lynxpoint/early_pch.c
    Change-Id: I1c138a3498228dbd025f68d5e6af0acc29ed3460
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
 src/southbridge/intel/i82801ix/lpc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c
index fb0dd56..bea0d98 100644
--- a/src/southbridge/intel/i82801ix/lpc.c
+++ b/src/southbridge/intel/i82801ix/lpc.c
@@ -42,7 +42,6 @@ typedef struct southbridge_intel_i82801ix_config config_t;
 static void i82801ix_enable_apic(struct device *dev)
-	u8 dummy;
 	u32 reg32;
 	volatile u32 *ioapic_index = (volatile u32 *)(IO_APIC_ADDR);
 	volatile u32 *ioapic_data = (volatile u32 *)(IO_APIC_ADDR + 0x10);
@@ -50,7 +49,7 @@ static void i82801ix_enable_apic(struct device *dev)
 	/* Enable IOAPIC. Keep APIC Range Select at zero. */
 	RCBA8(0x31ff) = 0x03;
 	/* We have to read 0x31ff back if bit0 changed. */
-	dummy = RCBA8(0x31ff);
+	RCBA8(0x31ff);
 	/* Lock maximum redirection entries (MRE), R/WO register. */
 	*ioapic_index	= 0x01;

More information about the coreboot-gerrit mailing list