All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memcg: mark memcg1_events static const
@ 2018-05-03 19:29 Greg Thelen
  2018-05-03 19:33 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Thelen @ 2018-05-03 19:29 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Vladimir Davydov, Andrew Morton
  Cc: linux-mm, linux-kernel, Greg Thelen

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

Signed-off-by: Greg Thelen <gthelen@google.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2bd3df3d101a..c9c7e5ea0e2f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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,
-- 
2.17.0.441.gb46fe60e1d-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] memcg: mark memcg1_events static const
  2018-05-03 19:29 [PATCH] memcg: mark memcg1_events static const Greg Thelen
@ 2018-05-03 19:33 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2018-05-03 19:33 UTC (permalink / raw)
  To: Greg Thelen
  Cc: Johannes Weiner, Vladimir Davydov, Andrew Morton, linux-mm, linux-kernel

On Thu 03-05-18 12:29:40, Greg Thelen wrote:
> Mark memcg1_events static: it's only used by memcontrol.c.
> And mark it const: it's not modified.
> 
> Signed-off-by: Greg Thelen <gthelen@google.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 2bd3df3d101a..c9c7e5ea0e2f 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -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,
> -- 
> 2.17.0.441.gb46fe60e1d-goog

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-03 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 19:29 [PATCH] memcg: mark memcg1_events static const Greg Thelen
2018-05-03 19:33 ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.