From 1a34165e37e8ab7ced6a639441f5df2478246976 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 11 Mar 2012 19:42:33 +0100 Subject: [PATCH] xchg is atomic with side-effects clang doesn't know about the side effect, so we have to tell it that it's okay not to care about the result. Change-Id: Ib11890bff6779e36cf09c178d224695ea16a8ae8 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/783 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/include/cpu/x86/lapic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index 8b44a6cb66..68608edab1 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -108,7 +108,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz static inline void lapic_write_atomic(unsigned long reg, unsigned long v) { - xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v); + (void)xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v); }