Commit e8c44319c691dfb4a0b039b095204c040df9b01a
Committed by
Linus Torvalds
1 parent
c80544dc0b
Exists in
master
and in
7 other branches
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 <ralf@linux-mips.org> Cc: Russell King <rmk@arm.linux.org.uk> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Bryan Wu <bryan.wu@analog.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 8 changed files with 27 additions and 31 deletions Side-by-side Diff
arch/arm/nwfpe/fpopcode.h
... | ... | @@ -369,20 +369,20 @@ |
369 | 369 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) |
370 | 370 | |
371 | 371 | #ifdef CONFIG_FPE_NWFPE_XP |
372 | -static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) | |
372 | +static inline floatx80 __pure getExtendedConstant(const unsigned int nIndex) | |
373 | 373 | { |
374 | 374 | extern const floatx80 floatx80Constant[]; |
375 | 375 | return floatx80Constant[nIndex]; |
376 | 376 | } |
377 | 377 | #endif |
378 | 378 | |
379 | -static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) | |
379 | +static inline float64 __pure getDoubleConstant(const unsigned int nIndex) | |
380 | 380 | { |
381 | 381 | extern const float64 float64Constant[]; |
382 | 382 | return float64Constant[nIndex]; |
383 | 383 | } |
384 | 384 | |
385 | -static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) | |
385 | +static inline float32 __pure getSingleConstant(const unsigned int nIndex) | |
386 | 386 | { |
387 | 387 | extern const float32 float32Constant[]; |
388 | 388 | return float32Constant[nIndex]; |
drivers/media/video/v4l1-compat.c
include/asm-blackfin/processor.h
... | ... | @@ -104,13 +104,13 @@ |
104 | 104 | #define cpu_relax() barrier() |
105 | 105 | |
106 | 106 | /* Get the Silicon Revision of the chip */ |
107 | -static inline __attribute_pure__ uint32_t bfin_revid(void) | |
107 | +static inline uint32_t __pure bfin_revid(void) | |
108 | 108 | { |
109 | 109 | /* stored in the upper 4 bits */ |
110 | 110 | return bfin_read_CHIPID() >> 28; |
111 | 111 | } |
112 | 112 | |
113 | -static inline __attribute_pure__ uint32_t bfin_compiled_revid(void) | |
113 | +static inline uint32_t __pure bfin_compiled_revid(void) | |
114 | 114 | { |
115 | 115 | #if defined(CONFIG_BF_REV_0_0) |
116 | 116 | return 0; |
include/asm-ppc/time.h
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | /* Accessor functions for the timebase (RTC on 601) registers. */ |
58 | 58 | /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ |
59 | 59 | #ifdef CONFIG_6xx |
60 | -extern __inline__ int __attribute_pure__ __USE_RTC(void) { | |
60 | +extern __inline__ int __pure __USE_RTC(void) { | |
61 | 61 | return (mfspr(SPRN_PVR)>>16) == 1; |
62 | 62 | } |
63 | 63 | #else |
include/linux/compiler-gcc.h
... | ... | @@ -36,11 +36,21 @@ |
36 | 36 | #define __weak __attribute__((weak)) |
37 | 37 | #define __naked __attribute__((naked)) |
38 | 38 | #define __noreturn __attribute__((noreturn)) |
39 | + | |
40 | +/* | |
41 | + * From the GCC manual: | |
42 | + * | |
43 | + * Many functions have no effects except the return value and their | |
44 | + * return value depends only on the parameters and/or global | |
45 | + * variables. Such a function can be subject to common subexpression | |
46 | + * elimination and loop optimization just as an arithmetic operator | |
47 | + * would be. | |
48 | + * [...] | |
49 | + */ | |
39 | 50 | #define __pure __attribute__((pure)) |
40 | 51 | #define __aligned(x) __attribute__((aligned(x))) |
41 | 52 | #define __printf(a,b) __attribute__((format(printf,a,b))) |
42 | 53 | #define noinline __attribute__((noinline)) |
43 | -#define __attribute_pure__ __attribute__((pure)) | |
44 | 54 | #define __attribute_const__ __attribute__((__const__)) |
45 | 55 | #define __maybe_unused __attribute__((unused)) |
include/linux/compiler.h
... | ... | @@ -132,20 +132,6 @@ |
132 | 132 | # define __maybe_unused /* unimplemented */ |
133 | 133 | #endif |
134 | 134 | |
135 | -/* | |
136 | - * From the GCC manual: | |
137 | - * | |
138 | - * Many functions have no effects except the return value and their | |
139 | - * return value depends only on the parameters and/or global | |
140 | - * variables. Such a function can be subject to common subexpression | |
141 | - * elimination and loop optimization just as an arithmetic operator | |
142 | - * would be. | |
143 | - * [...] | |
144 | - */ | |
145 | -#ifndef __attribute_pure__ | |
146 | -# define __attribute_pure__ /* unimplemented */ | |
147 | -#endif | |
148 | - | |
149 | 135 | #ifndef noinline |
150 | 136 | #define noinline |
151 | 137 | #endif |
lib/crc32.c
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | * @p: pointer to buffer over which CRC is run |
50 | 50 | * @len: length of buffer @p |
51 | 51 | */ |
52 | -u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len); | |
52 | +u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len); | |
53 | 53 | |
54 | 54 | #if CRC_LE_BITS == 1 |
55 | 55 | /* |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | * simplified by inlining the table in ?: form. |
58 | 58 | */ |
59 | 59 | |
60 | -u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | |
60 | +u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) | |
61 | 61 | { |
62 | 62 | int i; |
63 | 63 | while (len--) { |
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | } |
70 | 70 | #else /* Table-based approach */ |
71 | 71 | |
72 | -u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | |
72 | +u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) | |
73 | 73 | { |
74 | 74 | # if CRC_LE_BITS == 8 |
75 | 75 | const u32 *b =(u32 *)p; |
... | ... | @@ -145,7 +145,7 @@ |
145 | 145 | * @p: pointer to buffer over which CRC is run |
146 | 146 | * @len: length of buffer @p |
147 | 147 | */ |
148 | -u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len); | |
148 | +u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len); | |
149 | 149 | |
150 | 150 | #if CRC_BE_BITS == 1 |
151 | 151 | /* |
... | ... | @@ -153,7 +153,7 @@ |
153 | 153 | * simplified by inlining the table in ?: form. |
154 | 154 | */ |
155 | 155 | |
156 | -u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) | |
156 | +u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) | |
157 | 157 | { |
158 | 158 | int i; |
159 | 159 | while (len--) { |
... | ... | @@ -167,7 +167,7 @@ |
167 | 167 | } |
168 | 168 | |
169 | 169 | #else /* Table-based approach */ |
170 | -u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) | |
170 | +u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) | |
171 | 171 | { |
172 | 172 | # if CRC_BE_BITS == 8 |
173 | 173 | const u32 *b =(u32 *)p; |
lib/libcrc32c.c
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | * loop below with crc32 and vary the POLY if we don't find value in terms |
67 | 67 | * of space and maintainability in keeping the two modules separate. |
68 | 68 | */ |
69 | -u32 __attribute_pure__ | |
69 | +u32 __pure | |
70 | 70 | crc32c_le(u32 crc, unsigned char const *p, size_t len) |
71 | 71 | { |
72 | 72 | int i; |
... | ... | @@ -160,7 +160,7 @@ |
160 | 160 | * crc using table. |
161 | 161 | */ |
162 | 162 | |
163 | -u32 __attribute_pure__ | |
163 | +u32 __pure | |
164 | 164 | crc32c_le(u32 seed, unsigned char const *data, size_t length) |
165 | 165 | { |
166 | 166 | u32 crc = __cpu_to_le32(seed); |
... | ... | @@ -177,7 +177,7 @@ |
177 | 177 | EXPORT_SYMBOL(crc32c_be); |
178 | 178 | |
179 | 179 | #if CRC_BE_BITS == 1 |
180 | -u32 __attribute_pure__ | |
180 | +u32 __pure | |
181 | 181 | crc32c_be(u32 crc, unsigned char const *p, size_t len) |
182 | 182 | { |
183 | 183 | int i; |