aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index fe23792f05c1..5c8351b859f0 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -28,9 +28,17 @@
28#define __must_be_array(a) \ 28#define __must_be_array(a) \
29 BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) 29 BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
30 30
31#define inline inline __attribute__((always_inline)) 31/*
32#define __inline__ __inline__ __attribute__((always_inline)) 32 * Force always-inline if the user requests it so via the .config,
33#define __inline __inline __attribute__((always_inline)) 33 * or if gcc is too old:
34 */
35#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
36 !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
37# define inline inline __attribute__((always_inline))
38# define __inline__ __inline__ __attribute__((always_inline))
39# define __inline __inline __attribute__((always_inline))
40#endif
41
34#define __deprecated __attribute__((deprecated)) 42#define __deprecated __attribute__((deprecated))
35#define __packed __attribute__((packed)) 43#define __packed __attribute__((packed))
36#define __weak __attribute__((weak)) 44#define __weak __attribute__((weak))