Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

include/linux/list_bl.h: use bool instead of int for boolean functions

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>

authored by

Chen Gang and committed by
Linus Torvalds
26a247fd f68404bd

+2 -2
+2 -2
include/linux/list_bl.h
··· 48 48 49 49 #define hlist_bl_entry(ptr, type, member) container_of(ptr,type,member) 50 50 51 - static inline int hlist_bl_unhashed(const struct hlist_bl_node *h) 51 + static inline bool hlist_bl_unhashed(const struct hlist_bl_node *h) 52 52 { 53 53 return !h->pprev; 54 54 } ··· 68 68 h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); 69 69 } 70 70 71 - static inline int hlist_bl_empty(const struct hlist_bl_head *h) 71 + static inline bool hlist_bl_empty(const struct hlist_bl_head *h) 72 72 { 73 73 return !((unsigned long)READ_ONCE(h->first) & ~LIST_BL_LOCKMASK); 74 74 }