From e8c44319c691dfb4a0b039b095204c040df9b01a Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 18 Oct 2007 03:07:07 -0700 Subject: Replace __attribute_pure__ with __pure To be consistent with the use of attributes in the rest of the kernel replace all use of __attribute_pure__ with __pure and delete the definition of __attribute_pure__. Signed-off-by: Ralf Baechle Cc: Russell King Acked-by: Mauro Carvalho Chehab Cc: Bryan Wu Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-blackfin/processor.h | 4 ++-- include/asm-ppc/time.h | 2 +- include/linux/compiler-gcc.h | 12 +++++++++++- include/linux/compiler.h | 14 -------------- 4 files changed, 14 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h index 6bb3e0d4705..c571e958558 100644 --- a/include/asm-blackfin/processor.h +++ b/include/asm-blackfin/processor.h @@ -104,13 +104,13 @@ unsigned long get_wchan(struct task_struct *p); #define cpu_relax() barrier() /* Get the Silicon Revision of the chip */ -static inline __attribute_pure__ uint32_t bfin_revid(void) +static inline uint32_t __pure bfin_revid(void) { /* stored in the upper 4 bits */ return bfin_read_CHIPID() >> 28; } -static inline __attribute_pure__ uint32_t bfin_compiled_revid(void) +static inline uint32_t __pure bfin_compiled_revid(void) { #if defined(CONFIG_BF_REV_0_0) return 0; diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h index f7eadf6ac80..81dbcd43a50 100644 --- a/include/asm-ppc/time.h +++ b/include/asm-ppc/time.h @@ -57,7 +57,7 @@ static __inline__ void set_dec(unsigned int val) /* Accessor functions for the timebase (RTC on 601) registers. */ /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ #ifdef CONFIG_6xx -extern __inline__ int __attribute_pure__ __USE_RTC(void) { +extern __inline__ int __pure __USE_RTC(void) { return (mfspr(SPRN_PVR)>>16) == 1; } #else diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index acd583384bd..fe23792f05c 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -36,10 +36,20 @@ #define __weak __attribute__((weak)) #define __naked __attribute__((naked)) #define __noreturn __attribute__((noreturn)) + +/* + * From the GCC manual: + * + * Many functions have no effects except the return value and their + * return value depends only on the parameters and/or global + * variables. Such a function can be subject to common subexpression + * elimination and loop optimization just as an arithmetic operator + * would be. + * [...] + */ #define __pure __attribute__((pure)) #define __aligned(x) __attribute__((aligned(x))) #define __printf(a,b) __attribute__((format(printf,a,b))) #define noinline __attribute__((noinline)) -#define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__)) #define __maybe_unused __attribute__((unused)) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 86f9a3a6137..c811c8b979a 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -132,20 +132,6 @@ extern void __chk_io_ptr(const volatile void __iomem *); # define __maybe_unused /* unimplemented */ #endif -/* - * From the GCC manual: - * - * Many functions have no effects except the return value and their - * return value depends only on the parameters and/or global - * variables. Such a function can be subject to common subexpression - * elimination and loop optimization just as an arithmetic operator - * would be. - * [...] - */ -#ifndef __attribute_pure__ -# define __attribute_pure__ /* unimplemented */ -#endif - #ifndef noinline #define noinline #endif -- cgit v1.2.3