public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung.kim@lge.com>
Subject: [PATCH 1/8] tools include: Move perf's linux/compiler.h to a generic place
Date: Thu,  9 Jan 2014 23:00:52 +0900	[thread overview]
Message-ID: <1389276059-8829-2-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1389276059-8829-1-git-send-email-namhyung@kernel.org>

So that it can be shared with others like libtraceevent.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/include/linux/compiler.h           |   30 ++++++++++++++++++++++++++++++
 tools/perf/Makefile.perf                 |    2 +-
 tools/perf/config/Makefile               |    1 +
 tools/perf/util/include/linux/compiler.h |   30 ------------------------------
 4 files changed, 32 insertions(+), 31 deletions(-)
 create mode 100644 tools/include/linux/compiler.h
 delete mode 100644 tools/perf/util/include/linux/compiler.h

diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
new file mode 100644
index 000000000000..0135ccf2a00c
--- /dev/null
+++ b/tools/include/linux/compiler.h
@@ -0,0 +1,30 @@
+#ifndef _TOOLS_LINUX_COMPILER_H_
+#define _TOOLS_LINUX_COMPILER_H_
+
+#ifndef __always_inline
+# define __always_inline	inline __attribute__((always_inline))
+#endif
+
+#define __user
+
+#ifndef __attribute_const__
+# define __attribute_const__
+#endif
+
+#ifndef __maybe_unused
+# define __maybe_unused		__attribute__((unused))
+#endif
+
+#ifndef __packed
+# define __packed		__attribute__((__packed__))
+#endif
+
+#ifndef __force
+# define __force
+#endif
+
+#ifndef __weak
+# define __weak			__attribute__((weak))
+#endif
+
+#endif /* _TOOLS_LINUX_COMPILER_H */
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 3638b0bd20dc..6be06767da7b 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -211,7 +211,7 @@ LIB_H += ../../include/linux/hash.h
 LIB_H += ../../include/linux/stringify.h
 LIB_H += util/include/linux/bitmap.h
 LIB_H += util/include/linux/bitops.h
-LIB_H += util/include/linux/compiler.h
+LIB_H += ../include/linux/compiler.h
 LIB_H += util/include/linux/const.h
 LIB_H += util/include/linux/ctype.h
 LIB_H += util/include/linux/kernel.h
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f2bc659d20af..600d39781d11 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -224,6 +224,7 @@ endif
 
 CFLAGS += -I$(src-perf)/util/include
 CFLAGS += -I$(src-perf)/arch/$(ARCH)/include
+CFLAGS += -I$(srctree)/tools/include/
 CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
 CFLAGS += -I$(srctree)/arch/$(ARCH)/include
 CFLAGS += -I$(srctree)/include/uapi
diff --git a/tools/perf/util/include/linux/compiler.h b/tools/perf/util/include/linux/compiler.h
deleted file mode 100644
index b003ad7200b2..000000000000
--- a/tools/perf/util/include/linux/compiler.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _PERF_LINUX_COMPILER_H_
-#define _PERF_LINUX_COMPILER_H_
-
-#ifndef __always_inline
-# define __always_inline	inline __attribute__((always_inline))
-#endif
-
-#define __user
-
-#ifndef __attribute_const__
-# define __attribute_const__
-#endif
-
-#ifndef __maybe_unused
-# define __maybe_unused		__attribute__((unused))
-#endif
-
-#ifndef __packed
-# define __packed		__attribute__((__packed__))
-#endif
-
-#ifndef __force
-# define __force
-#endif
-
-#ifndef __weak
-# define __weak			__attribute__((weak))
-#endif
-
-#endif
-- 
1.7.9.2


  reply	other threads:[~2014-01-09 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 14:00 [PATCHSET 0/8] tools lib traceevent: Get rid of *die finally!! (v3) Namhyung Kim
2014-01-09 14:00 ` Namhyung Kim [this message]
2014-01-14 16:40   ` [tip:perf/core] tools include: Move perf's linux/ compiler.h to a generic place tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 2/8] tools include: Define likely/unlikely in linux/compiler.h Namhyung Kim
2014-01-14 16:40   ` [tip:perf/core] tools include: Define likely/unlikely in linux/ compiler.h tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 3/8] tools include: Move perf's bug.h to a generic place Namhyung Kim
2014-01-14 16:40   ` [tip:perf/core] tools include: Move perf' s " tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 4/8] tools include: Include <linux/compiler.h> from asm/bug.h Namhyung Kim
2014-01-14 16:41   ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 5/8] tools lib traceevent: Add state member to struct trace_seq Namhyung Kim
2014-01-09 14:00 ` [PATCH 6/8] tools lib traceevent: Check return value of realloc() Namhyung Kim
2014-01-09 14:00 ` [PATCH 7/8] tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init() Namhyung Kim
2014-01-09 14:00 ` [PATCH 8/8] tools lib traceevent: Get rid of die() finally!! Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389276059-8829-2-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox