Lines Matching refs:len
28 static bool seq_buf_can_fit(struct seq_buf *s, size_t len) in seq_buf_can_fit() argument
30 return s->len + len <= s->size; in seq_buf_can_fit()
42 unsigned int len = seq_buf_used(s); in seq_buf_print_seq() local
44 return seq_write(m, s->buffer, len); in seq_buf_print_seq()
59 int len; in seq_buf_vprintf() local
63 if (s->len < s->size) { in seq_buf_vprintf()
64 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); in seq_buf_vprintf()
65 if (s->len + len < s->size) { in seq_buf_vprintf()
66 s->len += len; in seq_buf_vprintf()
109 if (s->size == 0 || s->len == 0) in seq_buf_do_printk()
116 int len = lf - start + 1; in seq_buf_do_printk() local
118 printk("%s%.*s", lvl, len, start); in seq_buf_do_printk()
123 if (start < s->buffer + s->len) in seq_buf_do_printk()
148 unsigned int len = seq_buf_buffer_left(s); in seq_buf_bprintf() local
153 if (s->len < s->size) { in seq_buf_bprintf()
154 ret = bstr_printf(s->buffer + s->len, len, fmt, binary); in seq_buf_bprintf()
155 if (s->len + ret < s->size) { in seq_buf_bprintf()
156 s->len += ret; in seq_buf_bprintf()
176 size_t len = strlen(str); in seq_buf_puts() local
181 len += 1; in seq_buf_puts()
183 if (seq_buf_can_fit(s, len)) { in seq_buf_puts()
184 memcpy(s->buffer + s->len, str, len); in seq_buf_puts()
186 s->len += len - 1; in seq_buf_puts()
207 s->buffer[s->len++] = c; in seq_buf_putc()
226 int seq_buf_putmem(struct seq_buf *s, const void *mem, unsigned int len) in seq_buf_putmem() argument
230 if (seq_buf_can_fit(s, len)) { in seq_buf_putmem()
231 memcpy(s->buffer + s->len, mem, len); in seq_buf_putmem()
232 s->len += len; in seq_buf_putmem()
255 unsigned int len) argument
266 while (len) {
267 start_len = min(len, MAX_MEMHEX_BYTES);
276 if (WARN_ON_ONCE(j == 0 || j/2 > len))
286 len -= start_len;
345 int len; local
351 len = seq_buf_used(s);
353 if (len <= s->readpos)
356 len -= s->readpos;
357 if (cnt > len)
358 cnt = len;
395 const void *buf, size_t len, bool ascii) argument
398 int i, linelen, remaining = len;
405 for (i = 0; i < len; i += rowsize) {