From ec6a2a47eaa91f5f43757cc18f6b9593d065cb02 Mon Sep 17 00:00:00 2001 From: Ivan Kokshaysky Date: Thu, 22 Sep 2005 21:43:58 -0700 Subject: [PATCH] --- yaml --- r: 9227 b: refs/heads/master c: 7243cc05bafdda4c4de77cba00cf87666bd237f7 h: refs/heads/master i: 9225: d4241ac07b2dbb284d986859ce300e602ed9e299 9223: 08417eab8e927fc784944b12fd77b6b8a0eeee99 v: v3 --- [refs] | 2 +- trunk/include/asm-alpha/compiler.h | 5 ++++- trunk/mm/slab.c | 7 ++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d949d8a3905c..522234615d66 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b3c86a7452df8608c32a1c1f19c0cc0723c145f +refs/heads/master: 7243cc05bafdda4c4de77cba00cf87666bd237f7 diff --git a/trunk/include/asm-alpha/compiler.h b/trunk/include/asm-alpha/compiler.h index 399c33b7be51..0a4a8b40dfcd 100644 --- a/trunk/include/asm-alpha/compiler.h +++ b/trunk/include/asm-alpha/compiler.h @@ -98,6 +98,9 @@ #undef inline #undef __inline__ #undef __inline - +#if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 +#undef __always_inline +#define __always_inline inline __attribute__((always_inline)) +#endif #endif /* __ALPHA_COMPILER_H */ diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index 437d3388054b..cf19ff2ab5e2 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -308,12 +308,12 @@ struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS]; #define SIZE_L3 (1 + MAX_NUMNODES) /* - * This function may be completely optimized away if + * This function must be completely optimized away if * a constant is passed to it. Mostly the same as * what is in linux/slab.h except it returns an * index. */ -static inline int index_of(const size_t size) +static __always_inline int index_of(const size_t size) { if (__builtin_constant_p(size)) { int i = 0; @@ -329,7 +329,8 @@ static inline int index_of(const size_t size) extern void __bad_size(void); __bad_size(); } - } + } else + BUG(); return 0; }