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:
committed by
Linus Torvalds
parent
7acd72eb85
commit
9842c38e91
@@ -990,8 +990,13 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task)
|
||||
}
|
||||
|
||||
if (r2t == NULL) {
|
||||
kfifo_out(&tcp_task->r2tqueue,
|
||||
(void *)&tcp_task->r2t, sizeof(void *));
|
||||
if (kfifo_out(&tcp_task->r2tqueue,
|
||||
(void *)&tcp_task->r2t, sizeof(void *)) !=
|
||||
sizeof(void *)) {
|
||||
WARN_ONCE(1, "unexpected fifo state");
|
||||
r2t = NULL;
|
||||
}
|
||||
|
||||
r2t = tcp_task->r2t;
|
||||
}
|
||||
spin_unlock_bh(&session->lock);
|
||||
|
Reference in New Issue
Block a user