aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kfifo.h
diff options
context:
space:
mode:
authorStefani Seibold <stefani@seibold.net>2009-12-21 17:37:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 17:17:56 -0500
commit9842c38e917636fa7dc6b88aff17a8f1fd7f0cc0 (patch)
tree71d0b52ddc243743046bba9f774beca9febc393a /include/linux/kfifo.h
parent7acd72eb85f1c7a15e8b5eb554994949241737f1 (diff)
kfifo: fix warn_unused_result
Fix the "ignoring return value of '...', declared with attribute warn_unused_result" compiler warning in several users of the new kfifo API. It removes the __must_check attribute from kfifo_in() and kfifo_in_locked() which must not necessary performed. Fix the allocation bug in the nozomi driver file, by moving out the kfifo_alloc from the interrupt handler into the probe function. Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected end of fifo. Signed-off-by: Stefani Seibold <stefani@seibold.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kfifo.h')
-rw-r--r--include/linux/kfifo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 1b59c4a0e85..5ed2565c89b 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -56,7 +56,7 @@ extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer,
56extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, 56extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size,
57 gfp_t gfp_mask); 57 gfp_t gfp_mask);
58extern void kfifo_free(struct kfifo *fifo); 58extern void kfifo_free(struct kfifo *fifo);
59extern __must_check unsigned int kfifo_in(struct kfifo *fifo, 59extern unsigned int kfifo_in(struct kfifo *fifo,
60 const unsigned char *from, unsigned int len); 60 const unsigned char *from, unsigned int len);
61extern __must_check unsigned int kfifo_out(struct kfifo *fifo, 61extern __must_check unsigned int kfifo_out(struct kfifo *fifo,
62 unsigned char *to, unsigned int len); 62 unsigned char *to, unsigned int len);
@@ -94,7 +94,7 @@ static inline unsigned int kfifo_len(struct kfifo *fifo)
94 * the FIFO depending on the free space, and returns the number of 94 * the FIFO depending on the free space, and returns the number of
95 * bytes copied. 95 * bytes copied.
96 */ 96 */
97static inline __must_check unsigned int kfifo_in_locked(struct kfifo *fifo, 97static inline unsigned int kfifo_in_locked(struct kfifo *fifo,
98 const unsigned char *from, unsigned int n, spinlock_t *lock) 98 const unsigned char *from, unsigned int n, spinlock_t *lock)
99{ 99{
100 unsigned long flags; 100 unsigned long flags;