Home
last modified time | relevance | path

Searched refs:to_copy (Results 1 – 25 of 33) sorted by relevance

12

/linux/net/rds/
H A Dtcp_recv.c75 unsigned long to_copy, skb_off; in rds_tcp_inc_copy_to_user() local
76 for (skb_off = 0; skb_off < skb->len; skb_off += to_copy) { in rds_tcp_inc_copy_to_user()
77 to_copy = iov_iter_count(to); in rds_tcp_inc_copy_to_user()
78 to_copy = min(to_copy, skb->len - skb_off); in rds_tcp_inc_copy_to_user()
80 if (skb_copy_datagram_iter(skb, skb_off, to, to_copy)) in rds_tcp_inc_copy_to_user()
83 rds_stats_add(s_copy_to_user, to_copy); in rds_tcp_inc_copy_to_user()
84 ret += to_copy; in rds_tcp_inc_copy_to_user()
110 unsigned int to_copy, skb_off; in rds_tcp_cong_recv() local
127 to_copy = min_t(unsigned int, PAGE_SIZE - map_off, in rds_tcp_cong_recv()
135 to_copy); in rds_tcp_cong_recv()
[all …]
/linux/drivers/staging/fbtft/
H A Dfbtft-bus.c126 size_t to_copy; in fbtft_write_vmem16_bus8() local
152 to_copy = min(tx_array_size, remain); in fbtft_write_vmem16_bus8()
154 to_copy, remain - to_copy); in fbtft_write_vmem16_bus8()
156 for (i = 0; i < to_copy; i++) in fbtft_write_vmem16_bus8()
159 vmem16 = vmem16 + to_copy; in fbtft_write_vmem16_bus8()
161 startbyte_size + to_copy * 2); in fbtft_write_vmem16_bus8()
164 remain -= to_copy; in fbtft_write_vmem16_bus8()
177 size_t to_copy; in fbtft_write_vmem16_bus9() local
193 to_copy = min(tx_array_size, remain); in fbtft_write_vmem16_bus9()
195 to_copy, remain - to_copy); in fbtft_write_vmem16_bus9()
[all …]
H A Dfb_ra8875.c242 size_t to_copy; in write_vmem16_bus8() local
260 to_copy = min(tx_array_size, remain); in write_vmem16_bus8()
262 to_copy, remain - to_copy); in write_vmem16_bus8()
264 for (i = 0; i < to_copy; i++) in write_vmem16_bus8()
267 vmem16 = vmem16 + to_copy; in write_vmem16_bus8()
269 startbyte_size + to_copy * 2); in write_vmem16_bus8()
272 remain -= to_copy; in write_vmem16_bus8()
/linux/crypto/
H A Dscatterwalk.c37 unsigned int to_copy; in memcpy_from_scatterwalk() local
39 to_copy = scatterwalk_next(walk, nbytes); in memcpy_from_scatterwalk()
40 memcpy(buf, walk->addr, to_copy); in memcpy_from_scatterwalk()
41 scatterwalk_done_src(walk, to_copy); in memcpy_from_scatterwalk()
42 buf += to_copy; in memcpy_from_scatterwalk()
43 nbytes -= to_copy; in memcpy_from_scatterwalk()
52 unsigned int to_copy; in memcpy_to_scatterwalk() local
54 to_copy = scatterwalk_next(walk, nbytes); in memcpy_to_scatterwalk()
55 memcpy(walk->addr, buf, to_copy); in memcpy_to_scatterwalk()
56 scatterwalk_done_dst(walk, to_copy); in memcpy_to_scatterwalk()
[all …]
/linux/drivers/hwtracing/coresight/
H A Dultrasoc-smb.c122 ssize_t to_copy = 0; in smb_read() local
130 to_copy = min(sdb->data_size, len); in smb_read()
133 if (sdb->buf_rdptr + to_copy > sdb->buf_size) in smb_read()
134 to_copy = sdb->buf_size - sdb->buf_rdptr; in smb_read()
136 if (copy_to_user(data, sdb->buf_base + sdb->buf_rdptr, to_copy)) { in smb_read()
141 *ppos += to_copy; in smb_read()
142 smb_update_read_ptr(drvdata, to_copy); in smb_read()
146 dev_dbg(dev, "%zu bytes copied\n", to_copy); in smb_read()
147 return to_copy; in smb_read()
339 unsigned long to_copy; in smb_sync_perf_buffer() local
[all …]
H A Dcoresight-tmc-etr.c1583 unsigned long to_copy) in tmc_etr_sync_perf_buffer() argument
1595 while (to_copy > 0) { in tmc_etr_sync_perf_buffer()
1606 bytes = tmc_etr_buf_get_data(etr_buf, src_offset, to_copy, in tmc_etr_sync_perf_buffer()
1614 to_copy -= bytes; in tmc_etr_sync_perf_buffer()
/linux/drivers/xen/
H A Dxen-front-pgdir-shbuf.c276 int to_copy = XEN_NUM_GREFS_PER_PAGE; in backend_map() local
278 if (to_copy > grefs_left) in backend_map()
279 to_copy = grefs_left; in backend_map()
281 for (cur_gref = 0; cur_gref < to_copy; cur_gref++) { in backend_map()
292 grefs_left -= to_copy; in backend_map()
362 int cur_gref, grefs_left, to_copy, i, num_pages_dir; in guest_fill_page_dir() local
378 to_copy = grefs_left; in guest_fill_page_dir()
381 to_copy = XEN_NUM_GREFS_PER_PAGE; in guest_fill_page_dir()
385 to_copy * sizeof(grant_ref_t)); in guest_fill_page_dir()
387 grefs_left -= to_copy; in guest_fill_page_dir()
[all …]
/linux/drivers/nvmem/
H A Dbrcm_nvram.c53 size_t to_copy; in brcm_nvram_read() local
56 to_copy = max_t(ssize_t, (ssize_t)priv->data_len - offset, 0); in brcm_nvram_read()
58 to_copy = bytes; in brcm_nvram_read()
60 memcpy(val, priv->data + offset, to_copy); in brcm_nvram_read()
62 memset((uint8_t *)val + to_copy, priv->padding_byte, bytes - to_copy); in brcm_nvram_read()
/linux/drivers/most/
H A Dmost_cdev.c186 size_t to_copy, left; in comp_write() local
206 to_copy = min(count, c->cfg->buffer_size - c->mbo_offs); in comp_write()
207 left = copy_from_user(mbo->virt_address + c->mbo_offs, buf, to_copy); in comp_write()
208 if (left == to_copy) { in comp_write()
213 c->mbo_offs += to_copy - left; in comp_write()
223 ret = to_copy - left; in comp_write()
239 size_t to_copy, not_copied, copied; in comp_read() local
261 to_copy = min_t(size_t, in comp_read()
267 to_copy); in comp_read()
269 copied = to_copy - not_copied; in comp_read()
/linux/drivers/infiniband/hw/hfi1/
H A Deprom.c263 u32 bytes_available, ncopied, to_copy; in read_segment_platform_config() local
367 to_copy = entry->size - ncopied; in read_segment_platform_config()
370 if (to_copy > bytes_available) in read_segment_platform_config()
371 to_copy = bytes_available; in read_segment_platform_config()
383 ret = read_length(dd, seg_base + seg_offset, to_copy, in read_segment_platform_config()
388 ncopied += to_copy; in read_segment_platform_config()
/linux/tools/objtool/
H A Dbuiltin-check.c212 size_t to_copy, copied; in copy_file()
239 for (to_copy = stat.st_size; to_copy > 0; to_copy -= copied) { in save_argv()
240 copied = sendfile(dst_fd, src_fd, &offset, to_copy); in save_argv()
192 size_t to_copy, copied; copy_file() local
/linux/fs/btrfs/
H A Dzlib.c440 unsigned long to_copy; in zlib_decompress() local
476 to_copy = min(workspace->strm.total_out, destlen); in zlib_decompress()
480 memcpy_to_folio(dest_folio, dest_pgoff, workspace->buf, to_copy); in zlib_decompress()
483 if (unlikely(to_copy != destlen)) { in zlib_decompress()
489 folio_pos(dest_folio), to_copy, destlen); in zlib_decompress()
497 if (unlikely(to_copy < destlen)) in zlib_decompress()
498 folio_zero_range(dest_folio, dest_pgoff + to_copy, destlen - to_copy); in zlib_decompress()
H A Dzstd.c685 unsigned long to_copy = 0; in zstd_decompress() local
722 to_copy = workspace->out_buf.pos; in zstd_decompress()
723 memcpy_to_folio(dest_folio, dest_pgoff, workspace->out_buf.dst, to_copy); in zstd_decompress()
726 if (unlikely(to_copy < destlen)) { in zstd_decompress()
728 folio_zero_range(dest_folio, dest_pgoff + to_copy, destlen - to_copy); in zstd_decompress()
/linux/mm/kmsan/
H A Dhooks.c248 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, in kmsan_copy_to_user() argument
261 if (!to_copy) in kmsan_copy_to_user()
264 if (to_copy <= left) in kmsan_copy_to_user()
271 kmsan_internal_check_memory((void *)from, to_copy - left, to, in kmsan_copy_to_user()
282 to_copy - left); in kmsan_copy_to_user()
/linux/drivers/net/ethernet/brocade/bna/
H A Dbfa_msgq.c205 size_t to_copy; in __cmd_copy() local
213 to_copy = (len < BFI_MSGQ_CMD_ENTRY_SIZE) ? in __cmd_copy()
215 memcpy(dst, src, to_copy); in __cmd_copy()
216 len -= to_copy; in __cmd_copy()
639 size_t to_copy; in bfa_msgq_rsp_copy() local
649 to_copy = (len < BFI_MSGQ_RSP_ENTRY_SIZE) ? in bfa_msgq_rsp_copy()
651 memcpy(dst, src, to_copy); in bfa_msgq_rsp_copy()
652 len -= to_copy; in bfa_msgq_rsp_copy()
/linux/drivers/infiniband/sw/siw/
H A Dsiw_qp_rx.c886 u16 to_copy = sizeof(struct iwarp_ctrl); in siw_proc_terminate() local
915 skb_copy_bits(skb, srx->skb_offset, infop, to_copy); in siw_proc_terminate()
921 infop += to_copy; in siw_proc_terminate()
922 siw_update_skb_rcvd(srx, to_copy); in siw_proc_terminate()
923 srx->fpdu_part_rcvd += to_copy; in siw_proc_terminate()
924 srx->fpdu_part_rem -= to_copy; in siw_proc_terminate()
926 to_copy = iwarp_pktinfo[op].hdr_len - to_copy; in siw_proc_terminate()
929 if (to_copy + MPA_CRC_SIZE > srx->skb_new) in siw_proc_terminate()
932 skb_copy_bits(skb, srx->skb_offset, infop, to_copy); in siw_proc_terminate()
944 siw_update_skb_rcvd(srx, to_copy); in siw_proc_terminate()
[all …]
/linux/drivers/vfio/pci/virtio/
H A Dmigrate.c814 size_t copy_len, to_copy; in virtiovf_resume_read_chunk() local
817 to_copy = min_t(size_t, *len, chunk_size - vhca_buf->length); in virtiovf_resume_read_chunk()
818 copy_len = to_copy; in virtiovf_resume_read_chunk()
819 while (to_copy) { in virtiovf_resume_read_chunk()
820 ret = virtiovf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, in virtiovf_resume_read_chunk()
842 size_t copy_len, to_copy; in virtiovf_resume_read_header_data() local
847 to_copy = min_t(size_t, *len, required_data); in virtiovf_resume_read_header_data()
848 copy_len = to_copy; in virtiovf_resume_read_header_data()
849 while (to_copy) { in virtiovf_resume_read_header_data()
850 ret = virtiovf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, in virtiovf_resume_read_header_data()
/linux/drivers/vfio/pci/mlx5/
H A Dmain.c718 size_t copy_len, to_copy; in mlx5vf_resume_read_image() local
721 to_copy = min_t(size_t, *len, image_size - vhca_buf->length); in mlx5vf_resume_read_image()
722 copy_len = to_copy; in mlx5vf_resume_read_image()
723 while (to_copy) { in mlx5vf_resume_read_image()
724 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, pos, in mlx5vf_resume_read_image()
746 size_t copy_len, to_copy; in mlx5vf_resume_read_header_data() local
752 to_copy = min_t(size_t, *len, required_data); in mlx5vf_resume_read_header_data()
753 copy_len = to_copy; in mlx5vf_resume_read_header_data()
754 while (to_copy) { in mlx5vf_resume_read_header_data()
755 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, pos, in mlx5vf_resume_read_header_data()
/linux/drivers/misc/vmw_vmci/
H A Dvmci_queue_pair.c345 size_t to_copy; in qp_memcpy_to_queue_iter() local
355 to_copy = PAGE_SIZE - page_offset; in qp_memcpy_to_queue_iter()
357 to_copy = size - bytes_copied; in qp_memcpy_to_queue_iter()
359 if (!copy_from_iter_full((u8 *)va + page_offset, to_copy, in qp_memcpy_to_queue_iter()
365 bytes_copied += to_copy; in qp_memcpy_to_queue_iter()
392 size_t to_copy; in qp_memcpy_from_queue_iter() local
403 to_copy = PAGE_SIZE - page_offset; in qp_memcpy_from_queue_iter()
405 to_copy = size - bytes_copied; in qp_memcpy_from_queue_iter()
407 err = copy_to_iter((u8 *)va + page_offset, to_copy, to); in qp_memcpy_from_queue_iter()
408 if (err != to_copy) { in qp_memcpy_from_queue_iter()
[all …]
/linux/net/batman-adv/
H A Dtp_meter.c539 size_t to_copy; in batadv_tp_fill_prerandom() local
551 to_copy = min(nbytes, bytes_inbuf); in batadv_tp_fill_prerandom()
553 memcpy(&buf[pos], &batadv_tp_prerandom[local_offset], to_copy); in batadv_tp_fill_prerandom()
554 pos += to_copy; in batadv_tp_fill_prerandom()
555 nbytes -= to_copy; in batadv_tp_fill_prerandom()
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port_common.c914 unsigned int to_copy; in efx_mcdi_phy_get_module_eeprom_page() local
921 to_copy = min(space, SFP_PAGE_SIZE - offset); in efx_mcdi_phy_get_module_eeprom_page()
941 to_copy); in efx_mcdi_phy_get_module_eeprom_page()
943 return to_copy; in efx_mcdi_phy_get_module_eeprom_page()
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_port_common.c895 unsigned int to_copy; in efx_mcdi_phy_get_module_eeprom_page() local
902 to_copy = min(space, SFP_PAGE_SIZE - offset); in efx_mcdi_phy_get_module_eeprom_page()
922 to_copy); in efx_mcdi_phy_get_module_eeprom_page()
924 return to_copy; in efx_mcdi_phy_get_module_eeprom_page()
/linux/fs/smb/client/
H A Dsmbdirect.c2086 int to_copy, to_read, data_read, offset; in smbd_recv() local
2149 to_copy = min_t(int, data_length - offset, to_read); in smbd_recv()
2151 to_copy, &msg->msg_iter) != to_copy) in smbd_recv()
2155 if (to_copy == data_length - offset) { in smbd_recv()
2176 offset += to_copy; in smbd_recv()
2178 to_read -= to_copy; in smbd_recv()
2179 data_read += to_copy; in smbd_recv()
2182 to_copy, data_length - offset, in smbd_recv()
/linux/net/xdp/
H A Dxsk.c1662 void *to_copy; in xsk_getsockopt()
1691 to_copy = &off; in xsk_getsockopt()
1699 to_copy = &off_v1; in xsk_getsockopt()
1702 if (copy_to_user(optval, to_copy, len)) in xsk_getsockopt()
1664 void *to_copy; xsk_getsockopt() local
/linux/drivers/net/wireless/intel/iwlwifi/dvm/
H A Dsta.c1084 size_t to_copy; in iwlagn_send_sta_key() local
1105 to_copy = min_t(size_t, sizeof(sta_cmd.key.key), keyconf->keylen); in iwlagn_send_sta_key()
1106 memcpy(sta_cmd.key.key, keyconf->key, to_copy); in iwlagn_send_sta_key()

12