linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: make "migratetype_names" const char *
@ 2018-11-24  9:03 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2018-11-24  9:03 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm

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(-)

--- 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",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-24  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-24  9:03 [PATCH] mm: make "migratetype_names" const char * Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).