aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3
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/infiniband/hw/cxgb3
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/infiniband/hw/cxgb3')
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_resource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_resource.c b/drivers/infiniband/hw/cxgb3/cxio_resource.c
index dcbf2606c438..31f9201b2980 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_resource.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_resource.c
@@ -86,8 +86,9 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo,
86 kfifo_in(fifo, (unsigned char *) &i, sizeof(u32)); 86 kfifo_in(fifo, (unsigned char *) &i, sizeof(u32));
87 87
88 for (i = 0; i < skip_low + skip_high; i++) 88 for (i = 0; i < skip_low + skip_high; i++)
89 kfifo_out_locked(fifo, (unsigned char *) &entry, 89 if (kfifo_out_locked(fifo, (unsigned char *) &entry,
90 sizeof(u32), fifo_lock); 90 sizeof(u32), fifo_lock) != sizeof(u32))
91 break;
91 return 0; 92 return 0;
92} 93}
93 94