提交 c999fbd3 编写于 作者: A Alexey Dobriyan 提交者: Linus Torvalds

mm/mmzone.c: make "migratetype_names" const char *

Those strings are immutable in fact.

Link: http://lkml.kernel.org/r/20181124090327.GA10877@avx2Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1c30844d
...@@ -65,7 +65,7 @@ enum migratetype { ...@@ -65,7 +65,7 @@ enum migratetype {
}; };
/* In mm/page_alloc.c; keep in sync also with show_migration_types() there */ /* 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 #ifdef CONFIG_CMA
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA) # define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
......
...@@ -236,7 +236,7 @@ static char * const zone_names[MAX_NR_ZONES] = { ...@@ -236,7 +236,7 @@ static char * const zone_names[MAX_NR_ZONES] = {
#endif #endif
}; };
char * const migratetype_names[MIGRATE_TYPES] = { const char * const migratetype_names[MIGRATE_TYPES] = {
"Unmovable", "Unmovable",
"Movable", "Movable",
"Reclaimable", "Reclaimable",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册