Skip to content

Commit

Permalink
include/linux/list_bl.h: use bool instead of int for boolean functions
Browse files Browse the repository at this point in the history
hlist_bl_unhashed() and hlist_bl_empty() are all boolean functions, so
return bool instead of int.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Chen Gang authored and Linus Torvalds committed Mar 17, 2016
1 parent f68404b commit 26a247f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/list_bl.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h)

#define hlist_bl_entry(ptr, type, member) container_of(ptr,type,member)

static inline int hlist_bl_unhashed(const struct hlist_bl_node *h)
static inline bool hlist_bl_unhashed(const struct hlist_bl_node *h)
{
return !h->pprev;
}
Expand All @@ -68,7 +68,7 @@ static inline void hlist_bl_set_first(struct hlist_bl_head *h,
h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK);
}

static inline int hlist_bl_empty(const struct hlist_bl_head *h)
static inline bool hlist_bl_empty(const struct hlist_bl_head *h)
{
return !((unsigned long)READ_ONCE(h->first) & ~LIST_BL_LOCKMASK);
}
Expand Down

0 comments on commit 26a247f

Please sign in to comment.