mm/debug.c: make "migrate_reason_names[]" const char *

Those strings are immutable as well.

Link: http://lkml.kernel.org/r/20181124090508.GB10877@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alexey Dobriyan 2018-12-28 00:35:59 -08:00 committed by Linus Torvalds
parent c999fbd3dc
commit 9a2f45ff32
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ enum migrate_reason {
}; };
/* In mm/debug.c; also keep sync with include/trace/events/migrate.h */ /* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
extern char *migrate_reason_names[MR_TYPES]; extern const char *migrate_reason_names[MR_TYPES];
static inline struct page *new_page_nodemask(struct page *page, static inline struct page *new_page_nodemask(struct page *page,
int preferred_nid, nodemask_t *nodemask) int preferred_nid, nodemask_t *nodemask)

View File

@ -17,7 +17,7 @@
#include "internal.h" #include "internal.h"
char *migrate_reason_names[MR_TYPES] = { const char *migrate_reason_names[MR_TYPES] = {
"compaction", "compaction",
"memory_failure", "memory_failure",
"memory_hotplug", "memory_hotplug",