aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorStefani Seibold <stefani@seibold.net>2009-12-21 17:37:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 17:17:56 -0500
commit7acd72eb85f1c7a15e8b5eb554994949241737f1 (patch)
tree76712bb9f38690d8cf9c2f91bef811e4413d1aa3 /drivers/infiniband/hw
parente64c026dd09b73faf20707711402fc5ed55a8e70 (diff)
kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out...
rename kfifo_put... into kfifo_in... to prevent miss use of old non in kernel-tree drivers ditto for kfifo_get... -> kfifo_out... Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc annotations more readable. Add mini "howto porting to the new API" in kfifo.h Signed-off-by: Stefani Seibold <stefani@seibold.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Andi Kleen <ak@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_resource.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_resource.c b/drivers/infiniband/hw/cxgb3/cxio_resource.c
index d7d18fb02c93..dcbf2606c438 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_resource.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_resource.c
@@ -59,7 +59,7 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo,
59 return -ENOMEM; 59 return -ENOMEM;
60 60
61 for (i = 0; i < skip_low + skip_high; i++) 61 for (i = 0; i < skip_low + skip_high; i++)
62 kfifo_put(fifo, (unsigned char *) &entry, sizeof(u32)); 62 kfifo_in(fifo, (unsigned char *) &entry, sizeof(u32));
63 if (random) { 63 if (random) {
64 j = 0; 64 j = 0;
65 random_bytes = random32(); 65 random_bytes = random32();
@@ -71,22 +71,22 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo,
71 random_bytes = random32(); 71 random_bytes = random32();
72 } 72 }
73 idx = (random_bytes >> (j * 2)) & 0xF; 73 idx = (random_bytes >> (j * 2)) & 0xF;
74 kfifo_put(fifo, 74 kfifo_in(fifo,
75 (unsigned char *) &rarray[idx], 75 (unsigned char *) &rarray[idx],
76 sizeof(u32)); 76 sizeof(u32));
77 rarray[idx] = i; 77 rarray[idx] = i;
78 j++; 78 j++;
79 } 79 }
80 for (i = 0; i < RANDOM_SIZE; i++) 80 for (i = 0; i < RANDOM_SIZE; i++)
81 kfifo_put(fifo, 81 kfifo_in(fifo,
82 (unsigned char *) &rarray[i], 82 (unsigned char *) &rarray[i],
83 sizeof(u32)); 83 sizeof(u32));
84 } else 84 } else
85 for (i = skip_low; i < nr - skip_high; i++) 85 for (i = skip_low; i < nr - skip_high; i++)
86 kfifo_put(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_get_locked(fifo, (unsigned char *) &entry, 89 kfifo_out_locked(fifo, (unsigned char *) &entry,
90 sizeof(u32), fifo_lock); 90 sizeof(u32), fifo_lock);
91 return 0; 91 return 0;
92} 92}
@@ -119,7 +119,7 @@ static int cxio_init_qpid_fifo(struct cxio_rdev *rdev_p)
119 119
120 for (i = 16; i < T3_MAX_NUM_QP; i++) 120 for (i = 16; i < T3_MAX_NUM_QP; i++)
121 if (!(i & rdev_p->qpmask)) 121 if (!(i & rdev_p->qpmask))
122 kfifo_put(&rdev_p->rscp->qpid_fifo, 122 kfifo_in(&rdev_p->rscp->qpid_fifo,
123 (unsigned char *) &i, sizeof(u32)); 123 (unsigned char *) &i, sizeof(u32));
124 return 0; 124 return 0;
125} 125}
@@ -180,7 +180,7 @@ tpt_err:
180static u32 cxio_hal_get_resource(struct kfifo *fifo, spinlock_t * lock) 180static u32 cxio_hal_get_resource(struct kfifo *fifo, spinlock_t * lock)
181{ 181{
182 u32 entry; 182 u32 entry;
183 if (kfifo_get_locked(fifo, (unsigned char *) &entry, sizeof(u32), lock)) 183 if (kfifo_out_locked(fifo, (unsigned char *) &entry, sizeof(u32), lock))
184 return entry; 184 return entry;
185 else 185 else
186 return 0; /* fifo emptry */ 186 return 0; /* fifo emptry */
@@ -190,7 +190,7 @@ static void cxio_hal_put_resource(struct kfifo *fifo, spinlock_t * lock,
190 u32 entry) 190 u32 entry)
191{ 191{
192 BUG_ON( 192 BUG_ON(
193 kfifo_put_locked(fifo, (unsigned char *) &entry, sizeof(u32), lock) 193 kfifo_in_locked(fifo, (unsigned char *) &entry, sizeof(u32), lock)
194 == 0); 194 == 0);
195} 195}
196 196