[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1513320512-3013-1-git-send-email-guoyayun@cmss.chinamobile.com>
Date: Fri, 15 Dec 2017 14:48:32 +0800
From: guoyayun <guoyayun@...s.chinamobile.com>
To: tj@...nel.org, cl@...ux.com
Cc: linux-kernel@...r.kernel.org,
guoyayun <guoyayun@...s.chinamobile.com>
Subject: [PATCH] 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@...s.chinamobile.com>
---
include/linux/percpu_counter.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index 73a7bf3..4f05249 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 */
--
1.8.3.1
Powered by blists - more mailing lists