]> git.baikalelectronics.ru Git - kernel.git/commit
FRV: work around a possible compiler bug
authorDavid Howells <dhowells@redhat.com>
Thu, 19 Jul 2007 08:49:09 +0000 (01:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:50 +0000 (10:04 -0700)
commit7538335540b915c1bbee8b8eafbd63b0f367e73a
tree0c48aa948de8549a2b183c2ed3e5b338fa9730b7
parent23036dd6f8e696c0d005f4fcdebd298d1f4cec95
FRV: work around a possible compiler bug

Work around a possible bug in the FRV compiler.

What appears to be happening is that gcc resolves the
__builtin_constant_p() in kmalloc() to true, but then fails to reduce the
therefore constant conditions in the if-statements it guards to constant
results.

When compiling with -O2 or -Os, one single spurious error crops up in
cpuup_callback() in mm/slab.c.  This can be avoided by making the memsize
variable const.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/Makefile
mm/slab.c