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

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>

authored by

Dave Young and committed by
Linus Torvalds
c6dd897f cab6b056

+15 -4
+1 -1
Documentation/vm/Makefile
··· 2 2 obj- := dummy.o 3 3 4 4 # List of programs to build 5 - hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb 5 + hostprogs-y := hugepage-mmap hugepage-shm map_hugetlb 6 6 7 7 # Tell kbuild to always build the programs 8 8 always := $(hostprogs-y)
+3 -3
Documentation/vm/page-types.c tools/vm/page-types.c
··· 124 124 #define BIT(name) (1ULL << KPF_##name) 125 125 #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) 126 126 127 - static const char *page_flag_names[] = { 127 + static const char * const page_flag_names[] = { 128 128 [KPF_LOCKED] = "L:locked", 129 129 [KPF_ERROR] = "E:error", 130 130 [KPF_REFERENCED] = "R:referenced", ··· 166 166 }; 167 167 168 168 169 - static const char *debugfs_known_mountpoints[] = { 169 + static const char * const debugfs_known_mountpoints[] = { 170 170 "/sys/kernel/debug", 171 171 "/debug", 172 172 0, ··· 215 215 216 216 static unsigned long total_pages; 217 217 static unsigned long nr_pages[HASH_SIZE]; 218 - static uint64_t page_flags[HASH_SIZE]; 218 + static uint64_t page_flags[HASH_SIZE]; 219 219 220 220 221 221 /*
+11
tools/vm/Makefile
··· 1 + # Makefile for vm tools 2 + 3 + CC = $(CROSS_COMPILE)gcc 4 + CFLAGS = -Wall -Wextra 5 + 6 + all: page-types 7 + %: %.c 8 + $(CC) $(CFLAGS) -o $@ $^ 9 + 10 + clean: 11 + $(RM) page-types