diff mbox series

mm: make "migratetype_names" const char *

Message ID 20181124090327.GA10877@avx2 (mailing list archive)
State New, archived
Headers show
Series mm: make "migratetype_names" const char * | expand

Commit Message

Alexey Dobriyan Nov. 24, 2018, 9:03 a.m. UTC
Those strings are immutable in fact.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/mmzone.h |    2 +-
 mm/page_alloc.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -65,7 +65,7 @@  enum migratetype {
 };
 
 /* In mm/page_alloc.c; keep in sync also with show_migration_types() there */
-extern char * const migratetype_names[MIGRATE_TYPES];
+extern const char * const migratetype_names[MIGRATE_TYPES];
 
 #ifdef CONFIG_CMA
 #  define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -237,7 +237,7 @@  static char * const zone_names[MAX_NR_ZONES] = {
 #endif
 };
 
-char * const migratetype_names[MIGRATE_TYPES] = {
+const char * const migratetype_names[MIGRATE_TYPES] = {
 	"Unmovable",
 	"Movable",
 	"Reclaimable",