Lines Matching refs:len

59 static int do_op_one_page(unsigned long addr, int len, int is_write,  in do_op_one_page()  argument
60 int (*op)(unsigned long addr, int len, void *arg), void *arg) in do_op_one_page()
79 n = (*op)(addr, len, arg); in do_op_one_page()
90 static long buffer_op(unsigned long addr, int len, int is_write, in buffer_op() argument
95 size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len); in buffer_op()
96 remain = len; in buffer_op()
133 static int copy_chunk_from_user(unsigned long from, int len, void *arg) in copy_chunk_from_user() argument
137 memcpy((void *) to, (void *) from, len); in copy_chunk_from_user()
138 *to_ptr += len; in copy_chunk_from_user()
153 static int copy_chunk_to_user(unsigned long to, int len, void *arg) in copy_chunk_to_user() argument
157 memcpy((void *) to, (void *) from, len); in copy_chunk_to_user()
158 *from_ptr += len; in copy_chunk_to_user()
173 static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) in strncpy_chunk_from_user() argument
178 strncpy(to, (void *) from, len); in strncpy_chunk_from_user()
179 n = strnlen(to, len); in strncpy_chunk_from_user()
182 if (n < len) in strncpy_chunk_from_user()
205 static int clear_chunk(unsigned long addr, int len, void *unused) in clear_chunk() argument
207 memset((void *) addr, 0, len); in clear_chunk()
211 unsigned long __clear_user(void __user *mem, unsigned long len) in __clear_user() argument
214 memset((__force void*)mem, 0, len); in __clear_user()
218 return buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL); in __clear_user()
222 static int strnlen_chunk(unsigned long str, int len, void *arg) in strnlen_chunk() argument
226 n = strnlen((void *) str, len); in strnlen_chunk()
229 if (n < len) in strnlen_chunk()
234 long __strnlen_user(const void __user *str, long len) in __strnlen_user() argument
239 return strnlen((__force char*)str, len) + 1; in __strnlen_user()
241 n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); in __strnlen_user()