From: Nicholas Krause <xerofoify@gmail.com>
To: hannes@cmpxchg.org
Cc: mhocko@suse.cz, cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] mm:Make the function alloc_mem_cgroup_per_zone_info bool
Date: Mon, 29 Jun 2015 10:13:53 -0400 [thread overview]
Message-ID: <1435587233-27976-1-git-send-email-xerofoify@gmail.com> (raw)
This makes the function alloc_mem_cgroup_per_zone_info have a
return type of bool now due to this particular function always
returning either one or zero as its return value.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
mm/memcontrol.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index acb93c5..35d86d2 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4425,7 +4425,7 @@ static struct cftype mem_cgroup_legacy_files[] = {
{ }, /* terminate */
};
-static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
+static bool alloc_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
{
struct mem_cgroup_per_node *pn;
struct mem_cgroup_per_zone *mz;
@@ -4442,7 +4442,7 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
tmp = -1;
pn = kzalloc_node(sizeof(*pn), GFP_KERNEL, tmp);
if (!pn)
- return 1;
+ return true;
for (zone = 0; zone < MAX_NR_ZONES; zone++) {
mz = &pn->zoneinfo[zone];
@@ -4452,7 +4452,7 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
mz->memcg = memcg;
}
memcg->nodeinfo[node] = pn;
- return 0;
+ return false;
}
static void free_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
--
2.1.4
--
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>
next reply other threads:[~2015-06-29 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 14:13 Nicholas Krause [this message]
2015-06-29 15:03 ` Michal Hocko
2015-06-29 15:23 ` Nicholas Krause
2015-06-29 15:36 ` Michal Hocko
2015-06-29 15:44 ` nick
2015-06-29 15:50 ` nick
2015-06-29 15:55 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435587233-27976-1-git-send-email-xerofoify@gmail.com \
--to=xerofoify@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox