lkml.org 
[lkml]   [2010]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [3/23] x86: Avoid unused by set variables in rdmsr
Date

Avoids quite a lot of warnings with a gcc 4.6 -Wall build
because this happens in a commonly used header file (apic.h)

Cc: x86@kernel.org

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
arch/x86/include/asm/msr.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.35-rc2-gcc/arch/x86/include/asm/msr.h
===================================================================
--- linux-2.6.35-rc2-gcc.orig/arch/x86/include/asm/msr.h
+++ linux-2.6.35-rc2-gcc/arch/x86/include/asm/msr.h
@@ -148,8 +148,8 @@ static inline unsigned long long native_
#define rdmsr(msr, val1, val2) \
do { \
u64 __val = native_read_msr((msr)); \
- (val1) = (u32)__val; \
- (val2) = (u32)(__val >> 32); \
+ (void)((val1) = (u32)__val); \
+ (void)((val2) = (u32)(__val >> 32)); \
} while (0)

static inline void wrmsr(unsigned msr, unsigned low, unsigned high)

\
 
 \ /
  Last update: 2010-06-10 13:17    [W:0.179 / U:1.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site