aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi_tcp.c
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 /drivers/scsi/libiscsi_tcp.c
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 'drivers/scsi/libiscsi_tcp.c')
-rw-r--r--drivers/scsi/libiscsi_tcp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index d51ffeca2ec9..db6856c138fc 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -990,8 +990,13 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task)
990 } 990 }
991 991
992 if (r2t == NULL) { 992 if (r2t == NULL) {
993 kfifo_out(&tcp_task->r2tqueue, 993 if (kfifo_out(&tcp_task->r2tqueue,
994 (void *)&tcp_task->r2t, sizeof(void *)); 994 (void *)&tcp_task->r2t, sizeof(void *)) !=
995 sizeof(void *)) {
996 WARN_ONCE(1, "unexpected fifo state");
997 r2t = NULL;
998 }
999
995 r2t = tcp_task->r2t; 1000 r2t = tcp_task->r2t;
996 } 1001 }
997 spin_unlock_bh(&session->lock); 1002 spin_unlock_bh(&session->lock);