From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: stefani@seibold.net
Subject: [PATCH] KFIFO: kfifo_is_{full,empty} should return bools, not ints.
Date: Sun, 14 Mar 2010 10:46:54 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1003141045050.5852@localhost> (raw)
For consistency with other kfifo routines, return bool, not int.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.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
========================================================================
reply other threads:[~2010-03-14 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1003141045050.5852@localhost \
--to=rpjday@crashcourse.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=stefani@seibold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox