From: Robert P. J. Day Date: Wed, 11 Aug 2010 01:03:34 +0000 (-0700) Subject: kfifo: kfifo_is_{full,empty} should return bools, not ints X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad9c7ed0685406fe3cd7f0749b82bf433a39dd9c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git kfifo: kfifo_is_{full,empty} should return bools, not ints For consistency with other kfifo routines, return bool, not int. Signed-off-by: Robert P. J. Day Cc: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 9fad0527344f..57c4eedf4dd6 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -171,7 +171,7 @@ static inline unsigned int kfifo_len(struct kfifo *fifo) * kfifo_is_empty - returns true if the fifo is empty * @fifo: the fifo to be used. */ -static inline __must_check int kfifo_is_empty(struct kfifo *fifo) +static inline __must_check bool kfifo_is_empty(struct kfifo *fifo) { return fifo->in == fifo->out; } @@ -180,7 +180,7 @@ static inline __must_check int kfifo_is_empty(struct kfifo *fifo) * kfifo_is_full - returns true if the fifo is full * @fifo: the fifo to be used. */ -static inline __must_check int kfifo_is_full(struct kfifo *fifo) +static inline __must_check bool kfifo_is_full(struct kfifo *fifo) { return kfifo_len(fifo) == kfifo_size(fifo); }