Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kfifo.c Create Date:2022-07-28 06:24:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kfifo_copy_from_user

Proto:static unsigned long kfifo_copy_from_user(struct __kfifo *fifo, const void __user *from, unsigned int len, unsigned int off, unsigned int *copied)

Type:unsigned long

Parameter:

TypeParameterName
struct __kfifo *fifo
const void __user *from
unsigned intlen
unsigned intoff
unsigned int *copied
179  size = mask + 1
180  esize = esize
184  off &= mask
185  If esize != 1 Then
186  off *= esize
187  size *= esize
188  len *= esize
190  l = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, size - off)
192  ret = copy_from_user(data + off, from, l)
193  If Value for the false possibility is greater at compile time(ret) Then ret = DIV_ROUND_UP(ret + len - l, esize)
195  Else
196  ret = copy_from_user(data, from + l, len - l)
197  If Value for the false possibility is greater at compile time(ret) Then ret = DIV_ROUND_UP(ret, esize)
204  smp_wmb()
205  copied = len - ret * esize
207  Return ret
Caller
NameDescribe
__kfifo_from_user
__kfifo_from_user_r