Skip to content

Commit

Permalink
include/linux/compiler-gcc*.h: unify macro definitions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Borislav Petkov authored and Linus Torvalds committed Mar 23, 2011
1 parent 80cdc6d commit c837fb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 8 additions & 0 deletions include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@
#if !defined(__noclone)
#define __noclone /* not needed */
#endif

/*
* A trick to suppress uninitialized variable warning without generating any
* code
*/
#define uninitialized_var(x) x = x

#define __always_inline inline __attribute__((always_inline))
8 changes: 0 additions & 8 deletions include/linux/compiler-gcc3.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,3 @@
# error "GCOV profiling support for gcc versions below 3.4 not included"
# endif /* __GNUC_MINOR__ */
#endif /* CONFIG_GCOV_KERNEL */

/*
* A trick to suppress uninitialized variable warning without generating any
* code
*/
#define uninitialized_var(x) x = x

#define __always_inline inline __attribute__((always_inline))
8 changes: 0 additions & 8 deletions include/linux/compiler-gcc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
#define __always_inline inline __attribute__((always_inline))

/*
* A trick to suppress uninitialized variable warning without generating any
* code
*/
#define uninitialized_var(x) x = x

#if __GNUC_MINOR__ >= 3
/* Mark functions as cold. gcc will assume any path leading to a call
Expand Down Expand Up @@ -53,7 +46,6 @@
#define __noclone __attribute__((__noclone__))

#endif

#endif

#if __GNUC_MINOR__ > 0
Expand Down

0 comments on commit c837fb3

Please sign in to comment.