diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-22 19:33:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:44:10 -0400 |
commit | c837fb37a60aa642b9ad423462e32b851a03020a (patch) | |
tree | 88d6fdd520219fa5700bd618a3fe4dff9d1c4c6f | |
parent | 80cdc6dae76ea67d2b21bdca8df17ef47251eb8b (diff) |
include/linux/compiler-gcc*.h: unify macro definitions
Unify identical gcc3.x and gcc4.x macros.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/compiler-gcc.h | 8 | ||||
-rw-r--r-- | include/linux/compiler-gcc3.h | 8 | ||||
-rw-r--r-- | include/linux/compiler-gcc4.h | 8 |
3 files changed, 8 insertions, 16 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 16508bcddacc..cb4c1eb7778e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -92,3 +92,11 @@ | |||
92 | #if !defined(__noclone) | 92 | #if !defined(__noclone) |
93 | #define __noclone /* not needed */ | 93 | #define __noclone /* not needed */ |
94 | #endif | 94 | #endif |
95 | |||
96 | /* | ||
97 | * A trick to suppress uninitialized variable warning without generating any | ||
98 | * code | ||
99 | */ | ||
100 | #define uninitialized_var(x) x = x | ||
101 | |||
102 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index b721129e0469..37d412436d0f 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -21,11 +21,3 @@ | |||
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" |
22 | # endif /* __GNUC_MINOR__ */ | 22 | # endif /* __GNUC_MINOR__ */ |
23 | #endif /* CONFIG_GCOV_KERNEL */ | 23 | #endif /* CONFIG_GCOV_KERNEL */ |
24 | |||
25 | /* | ||
26 | * A trick to suppress uninitialized variable warning without generating any | ||
27 | * code | ||
28 | */ | ||
29 | #define uninitialized_var(x) x = x | ||
30 | |||
31 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index fcfa5b9a4317..64b7c003fd7a 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -12,13 +12,6 @@ | |||
12 | #define __used __attribute__((__used__)) | 12 | #define __used __attribute__((__used__)) |
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | #define __always_inline inline __attribute__((always_inline)) | ||
16 | |||
17 | /* | ||
18 | * A trick to suppress uninitialized variable warning without generating any | ||
19 | * code | ||
20 | */ | ||
21 | #define uninitialized_var(x) x = x | ||
22 | 15 | ||
23 | #if __GNUC_MINOR__ >= 3 | 16 | #if __GNUC_MINOR__ >= 3 |
24 | /* Mark functions as cold. gcc will assume any path leading to a call | 17 | /* Mark functions as cold. gcc will assume any path leading to a call |
@@ -53,7 +46,6 @@ | |||
53 | #define __noclone __attribute__((__noclone__)) | 46 | #define __noclone __attribute__((__noclone__)) |
54 | 47 | ||
55 | #endif | 48 | #endif |
56 | |||
57 | #endif | 49 | #endif |
58 | 50 | ||
59 | #if __GNUC_MINOR__ > 0 | 51 | #if __GNUC_MINOR__ > 0 |