[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1003141045050.5852@localhost>
Date: Sun, 14 Mar 2010 10:46:54 -0400 (EDT)
From: "Robert P. J. Day" <rpjday@...shcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
cc: stefani@...bold.net
Subject: [PATCH] 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 <rpjday@...shcourse.ca>
---
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index bc0fc79..d6af6df 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -172,7 +172,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;
}
@@ -181,7 +181,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);
}
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists