/* Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these functions.  */
int kfifo_to_user(struct kfifo *fifo, void __user *to, unsigned int len, unsigned *lenout)
/* Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these functions.  */
int kfifo_to_user(struct kfifo *fifo, void __user *to, unsigned int len, unsigned *lenout)
{
	int ret;
	len = min(kfifo_len(fifo), len);
	ret = __kfifo_to_user_data(fifo, to, len, 0, lenout);
	__kfifo_add_out(fifo, *lenout);
	return ret;
}