summaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2012-01-10 15:08:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 16:30:45 -0800
commitfcfb4dcc9698f932836aa63ba0d82e7dbd300fb3 (patch)
tree3a01fc96cc2ba9c339e2848c20a241a9ec9d2423 /mm/mempolicy.c
parent0c176d52b0b2619f231b2bbf329b90c028134f58 (diff)
downloadop-kernel-dev-fcfb4dcc9698f932836aa63ba0d82e7dbd300fb3.zip
op-kernel-dev-fcfb4dcc9698f932836aa63ba0d82e7dbd300fb3.tar.gz
mm/mempolicy.c: mpol_equal(): use bool
mpol_equal() logically returns a boolean. Use a bool type to slightly improve readability. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Stephen Wilson <wilsons@start.ca> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index c3fdbcb..e3d58f0 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1983,28 +1983,28 @@ struct mempolicy *__mpol_cond_copy(struct mempolicy *tompol,
}
/* Slow path of a mempolicy comparison */
-int __mpol_equal(struct mempolicy *a, struct mempolicy *b)
+bool __mpol_equal(struct mempolicy *a, struct mempolicy *b)
{
if (!a || !b)
- return 0;
+ return false;
if (a->mode != b->mode)
- return 0;
+ return false;
if (a->flags != b->flags)
- return 0;
+ return false;
if (mpol_store_user_nodemask(a))
if (!nodes_equal(a->w.user_nodemask, b->w.user_nodemask))
- return 0;
+ return false;
switch (a->mode) {
case MPOL_BIND:
/* Fall through */
case MPOL_INTERLEAVE:
- return nodes_equal(a->v.nodes, b->v.nodes);
+ return !!nodes_equal(a->v.nodes, b->v.nodes);
case MPOL_PREFERRED:
return a->v.preferred_node == b->v.preferred_node;
default:
BUG();
- return 0;
+ return false;
}
}
OpenPOWER on IntegriCloud