Skip to content

Commit

Permalink
mm/debug.c: make "migrate_reason_names[]" const char *
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Dec 28, 2018
1 parent c999fbd commit 9a2f45f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/migrate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum migrate_reason {
};

/* 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,
int preferred_nid, nodemask_t *nodemask)
Expand Down
2 changes: 1 addition & 1 deletion mm/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "internal.h"

char *migrate_reason_names[MR_TYPES] = {
const char *migrate_reason_names[MR_TYPES] = {
"compaction",
"memory_failure",
"memory_hotplug",
Expand Down

0 comments on commit 9a2f45f

Please sign in to comment.