summaryrefslogtreecommitdiffstats
path: root/include/linux/percpu_counter.h
diff options
context:
space:
mode:
authorguoyayun <guoyayun@cmss.chinamobile.com>2017-12-15 14:48:32 +0800
committerTejun Heo <tj@kernel.org>2017-12-15 05:28:06 -0800
commit85dcbba3b8b15c17d3237695440d09d12825184d (patch)
tree0148319b26f1b07033d4c6a644dd80941d98a05b /include/linux/percpu_counter.h
parent032b4cc8ff84490c4bc7c4ef8c91e6d83a637538 (diff)
downloadlinux-85dcbba3b8b15c17d3237695440d09d12825184d.tar.gz
linux-85dcbba3b8b15c17d3237695440d09d12825184d.tar.bz2
linux-85dcbba3b8b15c17d3237695440d09d12825184d.zip
percpu: percpu_counter_initialized can be boolean
This patch makes percpu_counter_initialized return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: guoyayun <guoyayun@cmss.chinamobile.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/percpu_counter.h')
-rw-r--r--include/linux/percpu_counter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index 73a7bf30fe9a..4f052496cdfd 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -86,7 +86,7 @@ static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
return 0;
}
-static inline int percpu_counter_initialized(struct percpu_counter *fbc)
+static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
{
return (fbc->counters != NULL);
}
@@ -167,9 +167,9 @@ static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
return percpu_counter_read(fbc);
}
-static inline int percpu_counter_initialized(struct percpu_counter *fbc)
+static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
{
- return 1;
+ return true;
}
#endif /* CONFIG_SMP */