/Linux-v5.4/net/rds/ |
D | tcp_recv.c | 74 unsigned long to_copy, skb_off; in rds_tcp_inc_copy_to_user() local 75 for (skb_off = 0; skb_off < skb->len; skb_off += to_copy) { in rds_tcp_inc_copy_to_user() 76 to_copy = iov_iter_count(to); in rds_tcp_inc_copy_to_user() 77 to_copy = min(to_copy, skb->len - skb_off); in rds_tcp_inc_copy_to_user() 79 if (skb_copy_datagram_iter(skb, skb_off, to, to_copy)) in rds_tcp_inc_copy_to_user() 82 rds_stats_add(s_copy_to_user, to_copy); in rds_tcp_inc_copy_to_user() 83 ret += to_copy; in rds_tcp_inc_copy_to_user() 109 unsigned int to_copy, skb_off; in rds_tcp_cong_recv() local 126 to_copy = min_t(unsigned int, PAGE_SIZE - map_off, in rds_tcp_cong_recv() 134 to_copy); in rds_tcp_cong_recv() [all …]
|
D | message.c | 431 unsigned long to_copy, nbytes; in rds_message_copy_from_user() local 455 to_copy = min_t(unsigned long, iov_iter_count(from), in rds_message_copy_from_user() 458 rds_stats_add(s_copy_from_user, to_copy); in rds_message_copy_from_user() 460 to_copy, from); in rds_message_copy_from_user() 461 if (nbytes != to_copy) in rds_message_copy_from_user() 464 sg_off += to_copy; in rds_message_copy_from_user() 477 unsigned long to_copy; in rds_message_inc_copy_to_user() local 491 to_copy = min_t(unsigned long, iov_iter_count(to), in rds_message_inc_copy_to_user() 493 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_message_inc_copy_to_user() 495 rds_stats_add(s_copy_to_user, to_copy); in rds_message_inc_copy_to_user() [all …]
|
D | ib_recv.c | 536 unsigned long to_copy; in rds_ib_inc_copy_to_user() local 552 to_copy = min_t(unsigned long, iov_iter_count(to), in rds_ib_inc_copy_to_user() 554 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_ib_inc_copy_to_user() 557 rds_stats_add(s_copy_to_user, to_copy); in rds_ib_inc_copy_to_user() 560 to_copy, in rds_ib_inc_copy_to_user() 562 if (ret != to_copy) in rds_ib_inc_copy_to_user() 565 frag_off += to_copy; in rds_ib_inc_copy_to_user() 566 copied += to_copy; in rds_ib_inc_copy_to_user() 784 unsigned long to_copy; in rds_ib_cong_recv() local 806 to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off); in rds_ib_cong_recv() [all …]
|
/Linux-v5.4/drivers/staging/fbtft/ |
D | fbtft-bus.c | 126 size_t to_copy; in fbtft_write_vmem16_bus8() local 156 to_copy = min(tx_array_size, remain); in fbtft_write_vmem16_bus8() 158 to_copy, remain - to_copy); in fbtft_write_vmem16_bus8() 160 for (i = 0; i < to_copy; i++) in fbtft_write_vmem16_bus8() 163 vmem16 = vmem16 + to_copy; in fbtft_write_vmem16_bus8() 165 startbyte_size + to_copy * 2); in fbtft_write_vmem16_bus8() 168 remain -= to_copy; in fbtft_write_vmem16_bus8() 181 size_t to_copy; in fbtft_write_vmem16_bus9() local 200 to_copy = min(tx_array_size, remain); in fbtft_write_vmem16_bus9() 202 to_copy, remain - to_copy); in fbtft_write_vmem16_bus9() [all …]
|
D | fb_ra8875.c | 249 size_t to_copy; in write_vmem16_bus8() local 267 to_copy = min(tx_array_size, remain); in write_vmem16_bus8() 269 to_copy, remain - to_copy); in write_vmem16_bus8() 271 for (i = 0; i < to_copy; i++) in write_vmem16_bus8() 274 vmem16 = vmem16 + to_copy; in write_vmem16_bus8() 276 startbyte_size + to_copy * 2); in write_vmem16_bus8() 279 remain -= to_copy; in write_vmem16_bus8()
|
/Linux-v5.4/drivers/xen/ |
D | xen-front-pgdir-shbuf.c | 285 int to_copy = XEN_NUM_GREFS_PER_PAGE; in backend_map() local 287 if (to_copy > grefs_left) in backend_map() 288 to_copy = grefs_left; in backend_map() 290 for (cur_gref = 0; cur_gref < to_copy; cur_gref++) { in backend_map() 301 grefs_left -= to_copy; in backend_map() 364 int cur_gref, grefs_left, to_copy, i, num_pages_dir; in guest_fill_page_dir() local 380 to_copy = grefs_left; in guest_fill_page_dir() 383 to_copy = XEN_NUM_GREFS_PER_PAGE; in guest_fill_page_dir() 387 to_copy * sizeof(grant_ref_t)); in guest_fill_page_dir() 389 grefs_left -= to_copy; in guest_fill_page_dir() [all …]
|
/Linux-v5.4/drivers/staging/most/cdev/ |
D | cdev.c | 193 size_t to_copy, left; in comp_write() local 213 to_copy = min(count, c->cfg->buffer_size - c->mbo_offs); in comp_write() 214 left = copy_from_user(mbo->virt_address + c->mbo_offs, buf, to_copy); in comp_write() 215 if (left == to_copy) { in comp_write() 220 c->mbo_offs += to_copy - left; in comp_write() 230 ret = to_copy - left; in comp_write() 246 size_t to_copy, not_copied, copied; in comp_read() local 268 to_copy = min_t(size_t, in comp_read() 274 to_copy); in comp_read() 276 copied = to_copy - not_copied; in comp_read()
|
/Linux-v5.4/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_blit.c | 121 size_t to_copy = size & ~(sizeof(_type) - 1); \ 124 ((_type *) dst, (_type *) src, to_copy); \ 194 size_t to_copy = round_down(size, sizeof(_type)); \ 197 ((_type *) dst, (_type *) src, to_copy); \ 198 location = size - to_copy + diff_offs - sizeof(_type); \ 202 dst -= to_copy - diff_offs; \ 203 src -= to_copy - diff_offs; \ 204 size -= to_copy - diff_offs; \
|
/Linux-v5.4/drivers/infiniband/hw/hfi1/ |
D | eprom.c | 304 u32 bytes_available, ncopied, to_copy; in read_segment_platform_config() local 408 to_copy = entry->size - ncopied; in read_segment_platform_config() 411 if (to_copy > bytes_available) in read_segment_platform_config() 412 to_copy = bytes_available; in read_segment_platform_config() 424 ret = read_length(dd, seg_base + seg_offset, to_copy, in read_segment_platform_config() 429 ncopied += to_copy; in read_segment_platform_config()
|
/Linux-v5.4/drivers/infiniband/sw/siw/ |
D | siw_qp_rx.c | 883 u16 to_copy = sizeof(struct iwarp_ctrl); in siw_proc_terminate() local 912 skb_copy_bits(skb, srx->skb_offset, infop, to_copy); in siw_proc_terminate() 918 infop += to_copy; in siw_proc_terminate() 919 srx->skb_offset += to_copy; in siw_proc_terminate() 920 srx->skb_new -= to_copy; in siw_proc_terminate() 921 srx->skb_copied += to_copy; in siw_proc_terminate() 922 srx->fpdu_part_rcvd += to_copy; in siw_proc_terminate() 923 srx->fpdu_part_rem -= to_copy; in siw_proc_terminate() 925 to_copy = iwarp_pktinfo[op].hdr_len - to_copy; in siw_proc_terminate() 928 if (to_copy + MPA_CRC_SIZE > srx->skb_new) in siw_proc_terminate() [all …]
|
/Linux-v5.4/drivers/net/ethernet/brocade/bna/ |
D | bfa_msgq.c | 206 size_t to_copy; in __cmd_copy() local 214 to_copy = (len < BFI_MSGQ_CMD_ENTRY_SIZE) ? in __cmd_copy() 216 memcpy(dst, src, to_copy); in __cmd_copy() 217 len -= to_copy; in __cmd_copy() 641 size_t to_copy; in bfa_msgq_rsp_copy() local 651 to_copy = (len < BFI_MSGQ_RSP_ENTRY_SIZE) ? in bfa_msgq_rsp_copy() 653 memcpy(dst, src, to_copy); in bfa_msgq_rsp_copy() 654 len -= to_copy; in bfa_msgq_rsp_copy()
|
/Linux-v5.4/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm_debugfs.c | 984 size_t to_copy = log_ctx.pos - *pos; in dtn_log_read() local 986 to_copy = min(to_copy, size); in dtn_log_read() 988 if (!copy_to_user(buf, log_ctx.buf + *pos, to_copy)) { in dtn_log_read() 989 *pos += to_copy; in dtn_log_read() 990 result = to_copy; in dtn_log_read()
|
/Linux-v5.4/drivers/misc/vmw_vmci/ |
D | vmci_queue_pair.c | 343 size_t to_copy; in qp_memcpy_to_queue_iter() local 353 to_copy = PAGE_SIZE - page_offset; in qp_memcpy_to_queue_iter() 355 to_copy = size - bytes_copied; in qp_memcpy_to_queue_iter() 357 if (!copy_from_iter_full((u8 *)va + page_offset, to_copy, in qp_memcpy_to_queue_iter() 363 bytes_copied += to_copy; in qp_memcpy_to_queue_iter() 390 size_t to_copy; in qp_memcpy_from_queue_iter() local 401 to_copy = PAGE_SIZE - page_offset; in qp_memcpy_from_queue_iter() 403 to_copy = size - bytes_copied; in qp_memcpy_from_queue_iter() 405 err = copy_to_iter((u8 *)va + page_offset, to_copy, to); in qp_memcpy_from_queue_iter() 406 if (err != to_copy) { in qp_memcpy_from_queue_iter() [all …]
|
/Linux-v5.4/net/batman-adv/ |
D | tp_meter.c | 535 size_t to_copy; in batadv_tp_fill_prerandom() local 547 to_copy = min(nbytes, bytes_inbuf); in batadv_tp_fill_prerandom() 549 memcpy(&buf[pos], &batadv_tp_prerandom[local_offset], to_copy); in batadv_tp_fill_prerandom() 550 pos += to_copy; in batadv_tp_fill_prerandom() 551 nbytes -= to_copy; in batadv_tp_fill_prerandom()
|
/Linux-v5.4/net/xdp/ |
D | xsk.c | 881 void *to_copy; in xsk_getsockopt() local 910 to_copy = &off; in xsk_getsockopt() 918 to_copy = &off_v1; in xsk_getsockopt() 921 if (copy_to_user(optval, to_copy, len)) in xsk_getsockopt()
|
/Linux-v5.4/fs/cifs/ |
D | smbdirect.c | 1851 int to_copy, to_read, data_read, offset; in smbd_recv_buf() local 1907 to_copy = min_t(int, data_length - offset, to_read); in smbd_recv_buf() 1911 to_copy); in smbd_recv_buf() 1914 if (to_copy == data_length - offset) { in smbd_recv_buf() 1936 offset += to_copy; in smbd_recv_buf() 1938 to_read -= to_copy; in smbd_recv_buf() 1939 data_read += to_copy; in smbd_recv_buf() 1944 to_copy, data_length - offset, in smbd_recv_buf()
|
/Linux-v5.4/drivers/crypto/amcc/ |
D | crypto4xx_core.c | 458 unsigned int to_copy; in crypto4xx_copy_pkt_to_dst() local 477 to_copy = min(nbytes, PPC4XX_SD_BUFFER_SIZE * in crypto4xx_copy_pkt_to_dst() 479 scatterwalk_map_and_copy(buf, dst, dst_start, to_copy, 1); in crypto4xx_copy_pkt_to_dst() 480 nbytes -= to_copy; in crypto4xx_copy_pkt_to_dst() 485 dst_start += to_copy; in crypto4xx_copy_pkt_to_dst()
|
/Linux-v5.4/drivers/net/ethernet/sfc/ |
D | mcdi_port.c | 934 unsigned int to_copy; in efx_mcdi_phy_get_module_eeprom_page() local 940 to_copy = min(space, SFP_PAGE_SIZE - offset); in efx_mcdi_phy_get_module_eeprom_page() 960 to_copy); in efx_mcdi_phy_get_module_eeprom_page() 962 return to_copy; in efx_mcdi_phy_get_module_eeprom_page()
|
/Linux-v5.4/drivers/hwtracing/coresight/ |
D | coresight-tmc-etr.c | 1422 unsigned long to_copy) in tmc_etr_sync_perf_buffer() argument 1435 while (to_copy > 0) { in tmc_etr_sync_perf_buffer() 1446 bytes = tmc_etr_buf_get_data(etr_buf, src_offset, to_copy, in tmc_etr_sync_perf_buffer() 1454 to_copy -= bytes; in tmc_etr_sync_perf_buffer()
|
/Linux-v5.4/net/ceph/ |
D | osdmap.c | 994 u32 to_copy; in osdmap_set_max_osd() local 1011 to_copy = min(map->max_osd, max); in osdmap_set_max_osd() 1013 memcpy(state, map->osd_state, to_copy * sizeof(*state)); in osdmap_set_max_osd() 1014 memcpy(weight, map->osd_weight, to_copy * sizeof(*weight)); in osdmap_set_max_osd() 1015 memcpy(addr, map->osd_addr, to_copy * sizeof(*addr)); in osdmap_set_max_osd() 1039 to_copy * sizeof(*affinity)); in osdmap_set_max_osd()
|
/Linux-v5.4/drivers/media/usb/dvb-usb/ |
D | cxusb-analog.c | 153 unsigned int to_copy; in cxusb_auxbuf_append_urb() local 155 to_copy = urb->iso_frame_desc[i].actual_length; in cxusb_auxbuf_append_urb() 158 urb->iso_frame_desc[i].offset, to_copy); in cxusb_auxbuf_append_urb() 160 auxbuf->paylen += to_copy; in cxusb_auxbuf_append_urb()
|
/Linux-v5.4/drivers/md/ |
D | dm-integrity.c | 1300 unsigned to_copy; in dm_integrity_rw_tag() local 1311 to_copy = min((1U << SECTOR_SHIFT << ic->log2_buffer_sectors) - *metadata_offset, total_size); in dm_integrity_rw_tag() 1314 memcpy(tag, dp, to_copy); in dm_integrity_rw_tag() 1316 memcpy(dp, tag, to_copy); in dm_integrity_rw_tag() 1317 dm_bufio_mark_partial_buffer_dirty(b, *metadata_offset, *metadata_offset + to_copy); in dm_integrity_rw_tag() 1320 if (unlikely(memcmp(dp, tag, to_copy))) { in dm_integrity_rw_tag() 1323 for (i = 0; i < to_copy; i++) { in dm_integrity_rw_tag() 1334 tag += to_copy; in dm_integrity_rw_tag() 1335 *metadata_offset += to_copy; in dm_integrity_rw_tag() 1340 total_size -= to_copy; in dm_integrity_rw_tag()
|
/Linux-v5.4/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_cmn.c | 3398 int to_copy = 0, hlen = 0; in bnx2x_pkt_req_lin() local 3435 to_copy = 1; in bnx2x_pkt_req_lin() 3449 to_copy = 1; in bnx2x_pkt_req_lin() 3458 to_copy = 1; in bnx2x_pkt_req_lin() 3463 if (unlikely(to_copy)) in bnx2x_pkt_req_lin() 3469 return to_copy; in bnx2x_pkt_req_lin()
|
/Linux-v5.4/net/core/ |
D | skbuff.c | 5923 int to_copy, gfp_t gfp) in pskb_extract() argument 5931 pskb_trim(clone, to_copy)) { in pskb_extract()
|
/Linux-v5.4/include/linux/ |
D | skbuff.h | 3534 struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy,
|