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()
116 unsigned int len = seq_buf_buffer_left(s); in seq_buf_bprintf() local
121 if (s->len < s->size) { in seq_buf_bprintf()
122 ret = bstr_printf(s->buffer + s->len, len, fmt, binary); in seq_buf_bprintf()
123 if (s->len + ret < s->size) { in seq_buf_bprintf()
124 s->len += ret; in seq_buf_bprintf()
144 size_t len = strlen(str); in seq_buf_puts() local
149 len += 1; in seq_buf_puts()
151 if (seq_buf_can_fit(s, len)) { in seq_buf_puts()
152 memcpy(s->buffer + s->len, str, len); in seq_buf_puts()
154 s->len += len - 1; in seq_buf_puts()
175 s->buffer[s->len++] = c; in seq_buf_putc()
194 int seq_buf_putmem(struct seq_buf *s, const void *mem, unsigned int len) in seq_buf_putmem() argument
198 if (seq_buf_can_fit(s, len)) { in seq_buf_putmem()
199 memcpy(s->buffer + s->len, mem, len); in seq_buf_putmem()
200 s->len += len; in seq_buf_putmem()
223 unsigned int len) argument
234 while (len) {
235 start_len = min(len, MAX_MEMHEX_BYTES);
244 if (WARN_ON_ONCE(j == 0 || j/2 > len))
254 len -= start_len;
313 int len; local
319 len = seq_buf_used(s);
321 if (len <= s->readpos)
324 len -= s->readpos;
325 if (cnt > len)
326 cnt = len;
363 const void *buf, size_t len, bool ascii) argument
366 int i, linelen, remaining = len;
373 for (i = 0; i < len; i += rowsize) {