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>
This commit is contained in:
parent
032b4cc8ff
commit
85dcbba3b8
|
@ -86,7 +86,7 @@ static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
|
||||||
return 0;
|
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);
|
return (fbc->counters != NULL);
|
||||||
}
|
}
|
||||||
|
@ -167,9 +167,9 @@ static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
|
||||||
return percpu_counter_read(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 */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user