Skip to content

Commit 9a2f45f

Browse files
Alexey Dobriyantorvalds
authored andcommitted
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>
1 parent c999fbd commit 9a2f45f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/migrate.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum migrate_reason {
2929
};
3030

3131
/* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
32-
extern char *migrate_reason_names[MR_TYPES];
32+
extern const char *migrate_reason_names[MR_TYPES];
3333

3434
static inline struct page *new_page_nodemask(struct page *page,
3535
int preferred_nid, nodemask_t *nodemask)

‎mm/debug.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "internal.h"
1919

20-
char *migrate_reason_names[MR_TYPES] = {
20+
const char *migrate_reason_names[MR_TYPES] = {
2121
"compaction",
2222
"memory_failure",
2323
"memory_hotplug",

0 commit comments

Comments
 (0)