aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-03-28 14:42:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 17:14:37 -0700
commitc6dd897f3bfc54a44942d742d6dfa842e33d88e0 (patch)
tree4da10b4ce42b5f3b93b90578e962a1bddbfb13f1 /tools
parentselftests/Makefile: make `run_tests' depend on `all' (diff)
downloadlinux-dev-c6dd897f3bfc54a44942d742d6dfa842e33d88e0.tar.xz
linux-dev-c6dd897f3bfc54a44942d742d6dfa842e33d88e0.zip
mm: move page-types.c from Documentation to tools/vm
tools/ is the better place for vm tools which are used by many people. Moving them to tools also make them open to more users instead of hide in Documentation folder. This patch moves page-types.c to tools/vm/page-types.c. Also add a Makefile in tools/vm and fix two coding style problems: a) change const arrary to 'const char * const', b) change a space to tab for indent. Signed-off-by: Dave Young <dyoung@redhat.com> Acked-by: Wu Fengguang <fengguang.wu@intel.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--tools/vm/Makefile11
-rw-r--r--tools/vm/page-types.c (renamed from Documentation/vm/page-types.c)6
2 files changed, 14 insertions, 3 deletions
diff --git a/tools/vm/Makefile b/tools/vm/Makefile
new file mode 100644
index 000000000000..3823d4b1fa75
--- /dev/null
+++ b/tools/vm/Makefile
@@ -0,0 +1,11 @@
+# Makefile for vm tools
+
+CC = $(CROSS_COMPILE)gcc
+CFLAGS = -Wall -Wextra
+
+all: page-types
+%: %.c
+ $(CC) $(CFLAGS) -o $@ $^
+
+clean:
+ $(RM) page-types
diff --git a/Documentation/vm/page-types.c b/tools/vm/page-types.c
index 0b13f02d4059..7dab7b25b5c6 100644
--- a/Documentation/vm/page-types.c
+++ b/tools/vm/page-types.c
@@ -124,7 +124,7 @@
#define BIT(name) (1ULL << KPF_##name)
#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
-static const char *page_flag_names[] = {
+static const char * const page_flag_names[] = {
[KPF_LOCKED] = "L:locked",
[KPF_ERROR] = "E:error",
[KPF_REFERENCED] = "R:referenced",
@@ -166,7 +166,7 @@ static const char *page_flag_names[] = {
};
-static const char *debugfs_known_mountpoints[] = {
+static const char * const debugfs_known_mountpoints[] = {
"/sys/kernel/debug",
"/debug",
0,
@@ -215,7 +215,7 @@ static int hwpoison_forget_fd;
static unsigned long total_pages;
static unsigned long nr_pages[HASH_SIZE];
-static uint64_t page_flags[HASH_SIZE];
+static uint64_t page_flags[HASH_SIZE];
/*