Lines Matching refs:lencopy
102 int linesdone, lineoff, lencopy;
134 lencopy = remain;
136 lencopy = bytesperline - lineoff;
142 if (lencopy > buf->bytesused - buf->length) {
143 lencopy = buf->bytesused - buf->length;
144 remain = lencopy;
148 if (lencopy == 0 || remain == 0)
152 if (lencopy < 0) {
153 printk_ratelimited(KERN_DEBUG "copy skipped: negative lencopy\n");
157 if ((unsigned long)dst + lencopy >
163 memcpy(dst, src, lencopy);
165 buf->bytesused += lencopy;
166 buf->pos += lencopy;
167 remain -= lencopy;
172 dst += lencopy + bytesperline;
173 src += lencopy;
177 lencopy = remain;
179 lencopy = bytesperline;
185 if (lencopy > buf->bytesused - buf->length) {
186 lencopy = buf->bytesused - buf->length;
187 remain = lencopy;
191 if (lencopy == 0 || remain == 0)
194 if (lencopy < 0) {
195 printk_ratelimited(KERN_WARNING "stk1160: negative lencopy detected\n");
199 if ((unsigned long)dst + lencopy >
205 memcpy(dst, src, lencopy);
206 remain -= lencopy;
208 buf->bytesused += lencopy;
209 buf->pos += lencopy;