Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Borislav Petkov and committed by
Linus Torvalds
c837fb37 80cdc6da

+8 -16
+8
include/linux/compiler-gcc.h
··· 92 92 #if !defined(__noclone) 93 93 #define __noclone /* not needed */ 94 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))
-8
include/linux/compiler-gcc3.h
··· 21 21 # error "GCOV profiling support for gcc versions below 3.4 not included" 22 22 # endif /* __GNUC_MINOR__ */ 23 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))
-8
include/linux/compiler-gcc4.h
··· 12 12 #define __used __attribute__((__used__)) 13 13 #define __must_check __attribute__((warn_unused_result)) 14 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 16 #if __GNUC_MINOR__ >= 3 24 17 /* Mark functions as cold. gcc will assume any path leading to a call ··· 46 53 #define __noclone __attribute__((__noclone__)) 47 54 48 55 #endif 49 - 50 56 #endif 51 57 52 58 #if __GNUC_MINOR__ > 0