Searched refs:to_copy (Results 1 - 25 of 41) sorted by relevance

12

/linux-master/net/rds/
H A Dtcp_recv.c75 unsigned long to_copy, skb_off; local
76 for (skb_off = 0; skb_off < skb->len; skb_off += to_copy) {
77 to_copy = iov_iter_count(to);
78 to_copy = min(to_copy, skb->len - skb_off);
80 if (skb_copy_datagram_iter(skb, skb_off, to, to_copy))
83 rds_stats_add(s_copy_to_user, to_copy);
84 ret += to_copy;
110 unsigned int to_copy, skb_off; local
127 to_copy
163 size_t left = len, to_copy; local
[all...]
H A Dmessage.c422 unsigned long to_copy, nbytes; local
446 to_copy = min_t(unsigned long, iov_iter_count(from),
449 rds_stats_add(s_copy_from_user, to_copy);
451 to_copy, from);
452 if (nbytes != to_copy)
455 sg_off += to_copy;
468 unsigned long to_copy; local
482 to_copy = min_t(unsigned long, iov_iter_count(to),
484 to_copy = min_t(unsigned long, to_copy, le
[all...]
H A Dib_recv.c538 unsigned long to_copy; local
554 to_copy = min_t(unsigned long, iov_iter_count(to),
556 to_copy = min_t(unsigned long, to_copy, len - copied);
559 rds_stats_add(s_copy_to_user, to_copy);
562 to_copy,
564 if (ret != to_copy)
567 frag_off += to_copy;
568 copied += to_copy;
792 unsigned long to_copy; local
[all...]
/linux-master/include/linux/
H A Dkmsan-checks.h53 * @to_copy: number of bytes to copy.
61 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy,
77 size_t to_copy, size_t left)
76 kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, size_t left) argument
/linux-master/drivers/staging/fbtft/
H A Dfbtft-bus.c126 size_t to_copy; local
155 to_copy = min(tx_array_size, remain);
156 dev_dbg(par->info->device, "to_copy=%zu, remain=%zu\n",
157 to_copy, remain - to_copy);
159 for (i = 0; i < to_copy; i++)
162 vmem16 = vmem16 + to_copy;
164 startbyte_size + to_copy * 2);
167 remain -= to_copy;
180 size_t to_copy; local
[all...]
H A Dfb_ra8875.c249 size_t to_copy; local
267 to_copy = min(tx_array_size, remain);
268 dev_dbg(par->info->device, " to_copy=%zu, remain=%zu\n",
269 to_copy, remain - to_copy);
271 for (i = 0; i < to_copy; i++)
274 vmem16 = vmem16 + to_copy;
276 startbyte_size + to_copy * 2);
279 remain -= to_copy;
/linux-master/drivers/xen/
H A Dxen-front-pgdir-shbuf.c276 int to_copy = XEN_NUM_GREFS_PER_PAGE; local
278 if (to_copy > grefs_left)
279 to_copy = grefs_left;
281 for (cur_gref = 0; cur_gref < to_copy; cur_gref++) {
292 grefs_left -= to_copy;
362 int cur_gref, grefs_left, to_copy, i, num_pages_dir; local
378 to_copy = grefs_left;
381 to_copy = XEN_NUM_GREFS_PER_PAGE;
385 to_copy * sizeof(grant_ref_t));
387 grefs_left -= to_copy;
[all...]
/linux-master/tools/testing/selftests/arm64/signal/
H A Dtest_signals_utils.c175 size_t to_copy; local
196 to_copy = __builtin_offsetof(ucontext_t,
198 to_copy += offset + sizeof(struct extra_context) + 16;
199 to_copy += extra->size;
203 to_copy = sizeof(ucontext_t);
206 if (to_copy > td->live_sz) {
209 td->live_sz, to_copy);
213 memcpy(td->live_uc, uc, to_copy);
228 to_copy);
/linux-master/drivers/hwtracing/coresight/
H A Dultrasoc-smb.c122 ssize_t to_copy = 0; local
130 to_copy = min(sdb->data_size, len);
133 if (sdb->buf_rdptr + to_copy > sdb->buf_size)
134 to_copy = sdb->buf_size - sdb->buf_rdptr;
136 if (copy_to_user(data, sdb->buf_base + sdb->buf_rdptr, to_copy)) {
141 *ppos += to_copy;
142 smb_update_read_ptr(drvdata, to_copy);
146 dev_dbg(dev, "%zu bytes copied\n", to_copy);
147 return to_copy;
339 unsigned long to_copy; local
[all...]
/linux-master/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_smi_events.c84 size_t to_copy; local
97 to_copy = kfifo_len(&client->fifo);
98 if (!to_copy) {
103 to_copy = min(size, to_copy);
104 ret = kfifo_out(&client->fifo, buf, to_copy);
111 ret = copy_to_user(user, buf, to_copy);
118 return to_copy;
/linux-master/drivers/infiniband/hw/hfi1/
H A Deprom.c263 u32 bytes_available, ncopied, to_copy; local
367 to_copy = entry->size - ncopied;
370 if (to_copy > bytes_available)
371 to_copy = bytes_available;
383 ret = read_length(dd, seg_base + seg_offset, to_copy,
388 ncopied += to_copy;
/linux-master/drivers/nvmem/
H A Dbrcm_nvram.c53 size_t to_copy; local
56 to_copy = max_t(ssize_t, (ssize_t)priv->data_len - offset, 0);
58 to_copy = bytes;
60 memcpy(val, priv->data + offset, to_copy);
62 memset((uint8_t *)val + to_copy, priv->padding_byte, bytes - to_copy);
/linux-master/fs/btrfs/
H A Dzlib.c363 unsigned long to_copy; local
393 to_copy = min(workspace->strm.total_out, destlen);
397 memcpy_to_page(dest_page, dest_pgoff, workspace->buf, to_copy);
400 if (unlikely(to_copy != destlen)) {
402 to_copy, destlen);
410 if (unlikely(to_copy < destlen))
411 memzero_page(dest_page, dest_pgoff + to_copy, destlen - to_copy);
H A Dzstd.c630 unsigned long to_copy = 0; local
657 to_copy = workspace->out_buf.pos;
658 memcpy_to_page(dest_page, dest_pgoff, workspace->out_buf.dst, to_copy);
661 if (unlikely(to_copy < destlen)) {
663 memzero_page(dest_page, dest_pgoff + to_copy, destlen - to_copy);
/linux-master/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_blit.c122 size_t to_copy = size & ~(sizeof(_type) - 1); \
125 ((_type *) dst, (_type *) src, to_copy); \
195 size_t to_copy = round_down(size, sizeof(_type)); \
198 ((_type *) dst, (_type *) src, to_copy); \
199 location = size - to_copy + diff_offs - sizeof(_type); \
203 dst -= to_copy - diff_offs; \
204 src -= to_copy - diff_offs; \
205 size -= to_copy - diff_offs; \
/linux-master/drivers/most/
H A Dmost_cdev.c186 size_t to_copy, left; local
206 to_copy = min(count, c->cfg->buffer_size - c->mbo_offs);
207 left = copy_from_user(mbo->virt_address + c->mbo_offs, buf, to_copy);
208 if (left == to_copy) {
213 c->mbo_offs += to_copy - left;
223 ret = to_copy - left;
239 size_t to_copy, not_copied, copied; local
261 to_copy = min_t(size_t,
267 to_copy);
269 copied = to_copy
[all...]
/linux-master/mm/kmsan/
H A Dhooks.c250 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, argument
263 if (!to_copy)
266 if (to_copy <= left)
272 kmsan_internal_check_memory((void *)from, to_copy - left, to,
282 to_copy - left);
/linux-master/drivers/net/ethernet/brocade/bna/
H A Dbfa_msgq.c205 size_t to_copy; local
213 to_copy = (len < BFI_MSGQ_CMD_ENTRY_SIZE) ?
215 memcpy(dst, src, to_copy);
216 len -= to_copy;
639 size_t to_copy; local
649 to_copy = (len < BFI_MSGQ_RSP_ENTRY_SIZE) ?
651 memcpy(dst, src, to_copy);
652 len -= to_copy;
/linux-master/drivers/infiniband/sw/siw/
H A Dsiw_qp_rx.c886 u16 to_copy = sizeof(struct iwarp_ctrl); local
915 skb_copy_bits(skb, srx->skb_offset, infop, to_copy);
921 infop += to_copy;
922 siw_update_skb_rcvd(srx, to_copy);
923 srx->fpdu_part_rcvd += to_copy;
924 srx->fpdu_part_rem -= to_copy;
926 to_copy = iwarp_pktinfo[op].hdr_len - to_copy;
929 if (to_copy + MPA_CRC_SIZE > srx->skb_new)
932 skb_copy_bits(skb, srx->skb_offset, infop, to_copy);
[all...]
/linux-master/drivers/md/
H A Ddm-flakey.c440 unsigned size_to_add, to_copy; local
458 to_copy = size_to_add;
461 unsigned this_step = min(bvec.bv_len, to_copy);
467 to_copy -= this_step;
469 } while (to_copy);
/linux-master/drivers/vfio/pci/mlx5/
H A Dmain.c743 size_t copy_len, to_copy; local
746 to_copy = min_t(size_t, *len, image_size - vhca_buf->length);
747 copy_len = to_copy;
748 while (to_copy) {
749 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, pos,
771 size_t copy_len, to_copy; local
777 to_copy = min_t(size_t, *len, required_data);
778 copy_len = to_copy;
779 while (to_copy) {
780 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, po
[all...]
/linux-master/net/batman-adv/
H A Dtp_meter.c539 size_t to_copy; local
551 to_copy = min(nbytes, bytes_inbuf);
553 memcpy(&buf[pos], &batadv_tp_prerandom[local_offset], to_copy);
554 pos += to_copy;
555 nbytes -= to_copy;
/linux-master/drivers/misc/vmw_vmci/
H A Dvmci_queue_pair.c345 size_t to_copy; local
355 to_copy = PAGE_SIZE - page_offset;
357 to_copy = size - bytes_copied;
359 if (!copy_from_iter_full((u8 *)va + page_offset, to_copy,
365 bytes_copied += to_copy;
392 size_t to_copy; local
403 to_copy = PAGE_SIZE - page_offset;
405 to_copy = size - bytes_copied;
407 err = copy_to_iter((u8 *)va + page_offset, to_copy, to);
408 if (err != to_copy) {
[all...]
/linux-master/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port_common.c914 unsigned int to_copy; local
921 to_copy = min(space, SFP_PAGE_SIZE - offset);
941 to_copy);
943 return to_copy;
/linux-master/fs/smb/client/
H A Dsmbdirect.c1740 int to_copy, to_read, data_read, offset; local
1796 to_copy = min_t(int, data_length - offset, to_read);
1800 to_copy);
1803 if (to_copy == data_length - offset) {
1825 offset += to_copy;
1827 to_read -= to_copy;
1828 data_read += to_copy;
1831 to_copy, data_length - offset,

Completed in 496 milliseconds

12