Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad9c7ed0 authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds
Browse files

kfifo: kfifo_is_{full,empty} should return bools, not ints



For consistency with other kfifo routines, return bool, not int.

Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Cc: Stefani Seibold <stefani@seibold.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ab654bab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}