aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsrp.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/libsrp.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/libsrp.c')
-rw-r--r--drivers/scsi/libsrp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c
index 8424b8606efb..ab19b3b4be52 100644
--- a/drivers/scsi/libsrp.c
+++ b/drivers/scsi/libsrp.c
@@ -163,8 +163,11 @@ struct iu_entry *srp_iu_get(struct srp_target *target)
163{ 163{
164 struct iu_entry *iue = NULL; 164 struct iu_entry *iue = NULL;
165 165
166 kfifo_out_locked(&target->iu_queue.queue, (void *) &iue, 166 if (kfifo_out_locked(&target->iu_queue.queue, (void *) &iue,
167 sizeof(void *), &target->iu_queue.lock); 167 sizeof(void *), &target->iu_queue.lock) != sizeof(void *)) {
168 WARN_ONCE(1, "unexpected fifo state");
169 return NULL;
170 }
168 if (!iue) 171 if (!iue)
169 return iue; 172 return iue;
170 iue->target = target; 173 iue->target = target;