Lines Matching refs:ret
196 unsigned long ret; in kfifo_copy_from_user() local
206 ret = copy_from_user(fifo->data + off, from, l); in kfifo_copy_from_user()
207 if (unlikely(ret)) in kfifo_copy_from_user()
208 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_from_user()
210 ret = copy_from_user(fifo->data, from + l, len - l); in kfifo_copy_from_user()
211 if (unlikely(ret)) in kfifo_copy_from_user()
212 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_from_user()
219 *copied = len - ret * esize; in kfifo_copy_from_user()
221 return ret; in kfifo_copy_from_user()
228 unsigned long ret; in __kfifo_from_user() local
239 ret = kfifo_copy_from_user(fifo, from, len, fifo->in, copied); in __kfifo_from_user()
240 if (unlikely(ret)) { in __kfifo_from_user()
241 len -= ret; in __kfifo_from_user()
254 unsigned long ret; in kfifo_copy_to_user() local
266 ret = copy_to_user(to, fifo->data + off, l); in kfifo_copy_to_user()
267 if (unlikely(ret)) in kfifo_copy_to_user()
268 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_to_user()
270 ret = copy_to_user(to + l, fifo->data, len - l); in kfifo_copy_to_user()
271 if (unlikely(ret)) in kfifo_copy_to_user()
272 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_to_user()
279 *copied = len - ret * esize; in kfifo_copy_to_user()
281 return ret; in kfifo_copy_to_user()
288 unsigned long ret; in __kfifo_to_user() local
298 ret = kfifo_copy_to_user(fifo, to, len, fifo->out, copied); in __kfifo_to_user()
299 if (unlikely(ret)) { in __kfifo_to_user()
300 len -= ret; in __kfifo_to_user()
516 unsigned long ret; in __kfifo_from_user_r() local
527 ret = kfifo_copy_from_user(fifo, from, len, fifo->in + recsize, copied); in __kfifo_from_user_r()
528 if (unlikely(ret)) { in __kfifo_from_user_r()
540 unsigned long ret; in __kfifo_to_user_r() local
552 ret = kfifo_copy_to_user(fifo, to, len, fifo->out + recsize, copied); in __kfifo_to_user_r()
553 if (unlikely(ret)) { in __kfifo_to_user_r()