* [PATCH-next] MEMCG: memcontrol: make local symbol static
@ 2018-01-18 19:33 Christopher Díaz Riveros
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 19:33 UTC (permalink / raw)
To: hannes, mhocko, vdavydov.dev
Cc: Christopher Díaz Riveros, cgroups, linux-mm, linux-kernel
Fixes the following sparse warning:
mm/memcontrol.c:1097:14: warning:
symbol 'memcg1_stats' was not declared. Should it be static?
Signed-off-by: Christopher DA-az Riveros <chrisadr@gentoo.org>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c3d1eaef752d..c992491dfb03 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
return false;
}
-unsigned int memcg1_stats[] = {
+static const unsigned int memcg1_stats[] = {
MEMCG_CACHE,
MEMCG_RSS,
MEMCG_RSS_HUGE,
--
2.15.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH-next] MEMCG: memcontrol: make local symbol static
2018-01-18 15:08 Christopher Díaz Riveros
2018-01-18 15:14 ` Joe Perches
@ 2018-01-18 19:23 ` Joe Perches
1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2018-01-18 19:23 UTC (permalink / raw)
To: Christopher Díaz Riveros, hannes, mhocko, vdavydov.dev
Cc: cgroups, linux-mm, linux-kernel, kernel-janitors
On Thu, 2018-01-18 at 10:08 -0500, Christopher Diaz Riveros wrote:
> Fixes the following sparse warning:
>
> mm/memcontrol.c:1097:14: warning:
> symbol 'memcg1_stats' was not declared. Should it be static?
>
> Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
[]
> @@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
> return false;
> }
>
> -unsigned int memcg1_stats[] = {
> +static unsigned int memcg1_stats[] = {
This should almost certainly be static const
> MEMCG_CACHE,
> MEMCG_RSS,
> MEMCG_RSS_HUGE,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH-next] MEMCG: memcontrol: make local symbol static
2018-01-18 15:08 Christopher Díaz Riveros
@ 2018-01-18 15:14 ` Joe Perches
2018-01-18 19:23 ` Joe Perches
1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2018-01-18 15:14 UTC (permalink / raw)
To: Christopher Díaz Riveros, hannes, mhocko, vdavydov.dev
Cc: cgroups, linux-mm, linux-kernel, kernel-janitors
On Thu, 2018-01-18 at 10:08 -0500, Christopher Diaz Riveros wrote:
> Fixes the following sparse warning:
>
> mm/memcontrol.c:1097:14: warning:
> symbol 'memcg1_stats' was not declared. Should it be static?
>
> Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
[]
> @@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
> return false;
> }
>
> -unsigned int memcg1_stats[] = {
> +static unsigned int memcg1_stats[] = {
This should almost certainly be static const
> MEMCG_CACHE,
> MEMCG_RSS,
> MEMCG_RSS_HUGE,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH-next] MEMCG: memcontrol: make local symbol static
@ 2018-01-18 15:08 Christopher Díaz Riveros
2018-01-18 15:14 ` Joe Perches
2018-01-18 19:23 ` Joe Perches
0 siblings, 2 replies; 4+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 15:08 UTC (permalink / raw)
To: hannes, mhocko, vdavydov.dev
Cc: Christopher Díaz Riveros, cgroups, linux-mm, linux-kernel,
kernel-janitors
Fixes the following sparse warning:
mm/memcontrol.c:1097:14: warning:
symbol 'memcg1_stats' was not declared. Should it be static?
Signed-off-by: Christopher DA-az Riveros <chrisadr@gentoo.org>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c3d1eaef752d..396674fd97ef 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
return false;
}
-unsigned int memcg1_stats[] = {
+static unsigned int memcg1_stats[] = {
MEMCG_CACHE,
MEMCG_RSS,
MEMCG_RSS_HUGE,
--
2.15.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-18 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 19:33 [PATCH-next] MEMCG: memcontrol: make local symbol static Christopher Díaz Riveros
-- strict thread matches above, loose matches on Subject: below --
2018-01-18 15:08 Christopher Díaz Riveros
2018-01-18 15:14 ` Joe Perches
2018-01-18 19:23 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox