Lines Matching refs:len

70 void __fill_random_buf(void *buf, unsigned int len, unsigned long seed)  in __fill_random_buf()  argument
74 while (len) { in __fill_random_buf()
77 if (len >= sizeof(int64_t)) { in __fill_random_buf()
80 } else if (len >= sizeof(int32_t)) { in __fill_random_buf()
83 } else if (len >= sizeof(int16_t)) { in __fill_random_buf()
91 len -= this_len; in __fill_random_buf()
98 unsigned int len) in fill_random_buf() argument
105 __fill_random_buf(buf, len, r); in fill_random_buf()
109 void fill_pattern(void *p, unsigned int len, char *pattern, in fill_pattern() argument
117 memset(p, pattern[0], len); in fill_pattern()
123 while (i < len) { in fill_pattern()
125 if (size > (len - i)) in fill_pattern()
126 size = len - i; in fill_pattern()
137 unsigned int segment, unsigned int len, in __fill_random_buf_percentage() argument
144 fill_pattern(buf, len, pattern, pbytes); in __fill_random_buf_percentage()
146 memset(buf, 0, len); in __fill_random_buf_percentage()
150 if (segment > len) in __fill_random_buf_percentage()
151 segment = len; in __fill_random_buf_percentage()
153 while (len) { in __fill_random_buf_percentage()
158 if (this_len > len) in __fill_random_buf_percentage()
159 this_len = len; in __fill_random_buf_percentage()
163 len -= this_len; in __fill_random_buf_percentage()
164 if (!len) in __fill_random_buf_percentage()
168 if (this_len > len) in __fill_random_buf_percentage()
169 this_len = len; in __fill_random_buf_percentage()
170 else if (len - this_len <= sizeof(long)) in __fill_random_buf_percentage()
171 this_len = len; in __fill_random_buf_percentage()
178 len -= this_len; in __fill_random_buf_percentage()
185 unsigned int segment, unsigned int len, in fill_random_buf_percentage() argument
193 __fill_random_buf_percentage(r, buf, percentage, segment, len, in fill_random_buf_percentage()