Skip to contentSkip to conversation

memcg: mark memcg1_events static const

PATCH In review Greg Thelen 2 participants 2 messages May 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memcg: mark memcg1_events static const

Mark memcg1_events static: it's only used by memcontrol.c. And mark it const: it's not modified.

---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
index 2bd3df3d101a..c9c7e5ea0e2f 100644
@@ -3083,7 +3083,7 @@ static int memcg_numa_stat_show(struct seq_file *m, void *v)
 #endif /* CONFIG_NUMA */
 
 /* Universal VM events cgroup1 shows, original sort order */
-unsigned int memcg1_events[] = {
+static const unsigned int memcg1_events[] = {
 	PGPGIN,
 	PGPGOUT,
 	PGFAULT,
Signature · 1 line
2.17.0.441.gb46fe60e1d-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Greg Thelen

Mark memcg1_events static: it's only used by memcontrol.c. And mark it const: it's not modified.

Quoted 19 lines
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
index 2bd3df3d101a..c9c7e5ea0e2f 100644
@@ -3083,7 +3083,7 @@ static int memcg_numa_stat_show(struct seq_file *m, void *v)
 #endif /* CONFIG_NUMA */
 
 /* Universal VM events cgroup1 shows, original sort order */
-unsigned int memcg1_events[] = {
+static const unsigned int memcg1_events[] = {
 	PGPGIN,
 	PGPGOUT,
 	PGFAULT,
Signature · 1 line
2.17.0.441.gb46fe60e1d-goog
Signature · 2 lines
Michal Hocko
SUSE Labs