public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, cpufeature: Suppress compiler warning with gcc 3.x
@ 2010-06-03  4:52 Tetsuo Handa
  2010-06-03  7:11 ` H. Peter Anvin
  0 siblings, 1 reply; 2+ messages in thread
From: Tetsuo Handa @ 2010-06-03  4:52 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel

Gcc 3.x generates a warning

  arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
  arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints

on each file.
But static_cpu_has() for gcc 3.x does not need __static_cpu_has().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 arch/x86/include/asm/cpufeature.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.35-rc1.orig/arch/x86/include/asm/cpufeature.h
+++ linux-2.6.35-rc1/arch/x86/include/asm/cpufeature.h
@@ -285,6 +285,7 @@ extern const char * const x86_power_flag
 
 #endif /* CONFIG_X86_64 */
 
+#if __GNUC__ >= 4
 /*
  * Static testing of CPU features.  Used the same as boot_cpu_has().
  * These are only valid after alternatives have run, but will statically
@@ -332,7 +333,6 @@ static __always_inline __pure bool __sta
 #endif
 }
 
-#if __GNUC__ >= 4
 #define static_cpu_has(bit)					\
 (								\
 	__builtin_constant_p(boot_cpu_has(bit)) ?		\

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86, cpufeature: Suppress compiler warning with gcc 3.x
  2010-06-03  4:52 [PATCH] x86, cpufeature: Suppress compiler warning with gcc 3.x Tetsuo Handa
@ 2010-06-03  7:11 ` H. Peter Anvin
  0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2010-06-03  7:11 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: linux-kernel

On 06/03/2010 06:52 AM, Tetsuo Handa wrote:
> Gcc 3.x generates a warning
> 
>    arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
>    arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints
> 
> on each file.
> But static_cpu_has() for gcc 3.x does not need __static_cpu_has().
> 
> Signed-off-by: Tetsuo Handa<penguin-kernel@I-love.SAKURA.ne.jp>

Patch already queued for this.

Why are you trying to compile a current kernel with gcc 3.x?

	-hpa

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-03  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03  4:52 [PATCH] x86, cpufeature: Suppress compiler warning with gcc 3.x Tetsuo Handa
2010-06-03  7:11 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox