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>
This commit is contained in:
Stefani Seibold
2009-12-21 14:37:29 -08:00
committed by Linus Torvalds
parent 7acd72eb85
commit 9842c38e91
7 changed files with 51 additions and 16 deletions

View File

@@ -514,8 +514,10 @@ static int lbs_thread(void *data)
while (kfifo_len(&priv->event_fifo)) {
u32 event;
kfifo_out(&priv->event_fifo, (unsigned char *) &event,
sizeof(event));
if (kfifo_out(&priv->event_fifo,
(unsigned char *) &event, sizeof(event)) !=
sizeof(event))
break;
spin_unlock_irq(&priv->driver_lock);
lbs_process_event(priv, event);
spin_lock_irq(&priv->driver_lock);