Lines Matching refs:iterator
81 struct drm_print_iterator *iterator = p->arg; in __drm_puts_coredump() local
84 if (!iterator->remain) in __drm_puts_coredump()
87 if (iterator->offset < iterator->start) { in __drm_puts_coredump()
92 if (iterator->offset + len <= iterator->start) { in __drm_puts_coredump()
93 iterator->offset += len; in __drm_puts_coredump()
97 copy = len - (iterator->start - iterator->offset); in __drm_puts_coredump()
99 if (copy > iterator->remain) in __drm_puts_coredump()
100 copy = iterator->remain; in __drm_puts_coredump()
103 if (iterator->data) in __drm_puts_coredump()
104 memcpy(iterator->data, in __drm_puts_coredump()
105 str + (iterator->start - iterator->offset), copy); in __drm_puts_coredump()
107 iterator->offset = iterator->start + copy; in __drm_puts_coredump()
108 iterator->remain -= copy; in __drm_puts_coredump()
110 ssize_t pos = iterator->offset - iterator->start; in __drm_puts_coredump()
112 len = min_t(ssize_t, strlen(str), iterator->remain); in __drm_puts_coredump()
114 if (iterator->data) in __drm_puts_coredump()
115 memcpy(iterator->data + pos, str, len); in __drm_puts_coredump()
117 iterator->offset += len; in __drm_puts_coredump()
118 iterator->remain -= len; in __drm_puts_coredump()
125 struct drm_print_iterator *iterator = p->arg; in __drm_printfn_coredump() local
129 if (!iterator->remain) in __drm_printfn_coredump()
136 if (iterator->offset + len <= iterator->start) { in __drm_printfn_coredump()
137 iterator->offset += len; in __drm_printfn_coredump()
142 if ((iterator->offset >= iterator->start) && (len < iterator->remain)) { in __drm_printfn_coredump()
143 ssize_t pos = iterator->offset - iterator->start; in __drm_printfn_coredump()
145 if (iterator->data) in __drm_printfn_coredump()
146 snprintf(((char *) iterator->data) + pos, in __drm_printfn_coredump()
147 iterator->remain, "%pV", vaf); in __drm_printfn_coredump()
149 iterator->offset += len; in __drm_printfn_coredump()
150 iterator->remain -= len; in __drm_printfn_coredump()