| /linux/net/rds/ |
| H A D | tcp_recv.c | 75 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 in rds_tcp_cong_recv() 163 size_t left = len, to_copy; rds_tcp_data_recv() local [all...] |
| H A D | message.c | 472 unsigned long to_copy, nbytes; in rds_message_copy_from_user() local 496 to_copy = min_t(unsigned long, iov_iter_count(from), in rds_message_copy_from_user() 499 rds_stats_add(s_copy_from_user, to_copy); in rds_message_copy_from_user() 501 to_copy, from); in rds_message_copy_from_user() 502 if (nbytes != to_copy) in rds_message_copy_from_user() 505 sg_off += to_copy; in rds_message_copy_from_user() 518 unsigned long to_copy; in rds_message_inc_copy_to_user() local 532 to_copy = min_t(unsigned long, iov_iter_count(to), in rds_message_inc_copy_to_user() 534 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_message_inc_copy_to_user() 536 rds_stats_add(s_copy_to_user, to_copy); in rds_message_inc_copy_to_user() [all …]
|
| /linux/drivers/staging/fbtft/ |
| H A D | fbtft-bus.c | 126 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 D | fb_ra8875.c | 242 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 D | scatterwalk.c | 37 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/arch/powerpc/platforms/pseries/ |
| H A D | htmdump.c | 125 u64 to_copy = 0; in htmsystem_mem_read() local 167 to_copy = 32 + (be64_to_cpu(*num_entries) * 32); in htmsystem_mem_read() 169 *ppos += to_copy; in htmsystem_mem_read() 170 return simple_read_from_buffer(ubuf, count, &offset, htm_mem_data, to_copy); in htmsystem_mem_read() 293 u64 to_copy; in htmstatus_read() local 335 to_copy = 32 + (be64_to_cpu(*num_entries) * htmstatus_flag); in htmstatus_read() 336 *ppos += to_copy; in htmstatus_read() 338 return simple_read_from_buffer(ubuf, count, &offset, htm_status_data, to_copy); in htmstatus_read() 353 u64 to_copy; in htminfo_read() local 390 to_copy = 32 + (be64_to_cpu(*num_entries) * 16); in htminfo_read() [all …]
|
| /linux/drivers/hwtracing/coresight/ |
| H A D | ultrasoc-smb.c | 120 ssize_t to_copy = 0; in smb_read() local 128 to_copy = min(sdb->data_size, len); in smb_read() 131 if (sdb->buf_rdptr + to_copy > sdb->buf_size) in smb_read() 132 to_copy = sdb->buf_size - sdb->buf_rdptr; in smb_read() 134 if (copy_to_user(data, sdb->buf_base + sdb->buf_rdptr, to_copy)) { in smb_read() 139 *ppos += to_copy; in smb_read() 140 smb_update_read_ptr(drvdata, to_copy); in smb_read() 144 dev_dbg(dev, "%zu bytes copied\n", to_copy); in smb_read() 145 return to_copy; in smb_read() 337 unsigned long to_copy; in smb_sync_perf_buffer() local [all …]
|
| /linux/drivers/xen/ |
| H A D | xen-front-pgdir-shbuf.c | 274 int to_copy = XEN_NUM_GREFS_PER_PAGE; in backend_map() local 276 if (to_copy > grefs_left) in backend_map() 277 to_copy = grefs_left; in backend_map() 279 for (cur_gref = 0; cur_gref < to_copy; cur_gref++) { in backend_map() 290 grefs_left -= to_copy; in backend_map() 360 int cur_gref, grefs_left, to_copy, i, num_pages_dir; in guest_fill_page_dir() local 376 to_copy = grefs_left; in guest_fill_page_dir() 379 to_copy = XEN_NUM_GREFS_PER_PAGE; in guest_fill_page_dir() 383 to_copy * sizeof(grant_ref_t)); in guest_fill_page_dir() 385 grefs_left -= to_copy; in guest_fill_page_dir() [all …]
|
| /linux/drivers/most/ |
| H A D | most_cdev.c | 189 size_t to_copy, left; in comp_write() local 209 to_copy = min(count, c->cfg->buffer_size - c->mbo_offs); in comp_write() 210 left = copy_from_user(mbo->virt_address + c->mbo_offs, buf, to_copy); in comp_write() 211 if (left == to_copy) { in comp_write() 216 c->mbo_offs += to_copy - left; in comp_write() 226 ret = to_copy - left; in comp_write() 242 size_t to_copy, not_copied, copied; in comp_read() local 264 to_copy = min_t(size_t, in comp_read() 270 to_copy); in comp_read() 272 copied = to_copy - not_copied; in comp_read()
|
| /linux/drivers/gpu/drm/amd/amdkfd/ |
| H A D | kfd_smi_events.c | 85 size_t to_copy; in kfd_smi_ev_read() local 98 to_copy = kfifo_len(&client->fifo); in kfd_smi_ev_read() 99 if (!to_copy) { in kfd_smi_ev_read() 104 to_copy = min(size, to_copy); in kfd_smi_ev_read() 105 ret = kfifo_out(&client->fifo, buf, to_copy); in kfd_smi_ev_read() 112 ret = copy_to_user(user, buf, to_copy); in kfd_smi_ev_read() 119 return to_copy; in kfd_smi_ev_read()
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | eprom.c | 263 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 D | builtin-check.c | 212 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 D | zlib.c | 448 unsigned long to_copy; in zlib_decompress() local 484 to_copy = min(workspace->strm.total_out, destlen); in zlib_decompress() 488 memcpy_to_folio(dest_folio, dest_pgoff, workspace->buf, to_copy); in zlib_decompress() 491 if (unlikely(to_copy != destlen)) { in zlib_decompress() 497 folio_pos(dest_folio), to_copy, destlen); in zlib_decompress() 505 if (unlikely(to_copy < destlen)) in zlib_decompress() 506 folio_zero_range(dest_folio, dest_pgoff + to_copy, destlen - to_copy); in zlib_decompress()
|
| H A D | zstd.c | 684 unsigned long to_copy = 0; in zstd_decompress() local 721 to_copy = workspace->out_buf.pos; in zstd_decompress() 722 memcpy_to_folio(dest_folio, dest_pgoff, workspace->out_buf.dst, to_copy); in zstd_decompress() 725 if (unlikely(to_copy < destlen)) { in zstd_decompress() 727 folio_zero_range(dest_folio, dest_pgoff + to_copy, destlen - to_copy); in zstd_decompress()
|
| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_blit.c | 124 size_t to_copy = size & ~(sizeof(_type) - 1); \ 127 ((_type *) dst, (_type *) src, to_copy); \ 197 size_t to_copy = round_down(size, sizeof(_type)); \ 200 ((_type *) dst, (_type *) src, to_copy); \ 201 location = size - to_copy + diff_offs - sizeof(_type); \ 205 dst -= to_copy - diff_offs; \ 206 src -= to_copy - diff_offs; \ 207 size -= to_copy - diff_offs; \
|
| /linux/drivers/android/binder/ |
| H A D | page_range.rs | 556 self.iterate(offset, size, |page, offset, to_copy| { in copy_from_user_slice() 557 page.copy_from_user_slice_raw(reader, offset, to_copy) in copy_from_user_slice() 572 self.iterate(offset, size_of::<T>(), |page, offset, to_copy| { in read() 576 page.read_raw(obj_ptr, offset, to_copy)?; in read() 577 out_offset += to_copy; in read() 594 self.iterate(offset, size_of_val(obj), |page, offset, to_copy| { in write() 598 page.write_raw(obj_ptr, offset, to_copy)?; in write() 599 obj_offset += to_copy; in write()
|
| /linux/mm/kmsan/ |
| H A D | hooks.c | 248 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 D | bfa_msgq.c | 205 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/md/ |
| H A D | dm-flakey.c | 455 unsigned size_to_add, to_copy; in clone_bio() local 473 to_copy = size_to_add; in clone_bio() 476 unsigned this_step = min(bvec.bv_len, to_copy); in clone_bio() 482 to_copy -= this_step; in clone_bio() 484 } while (to_copy); in clone_bio()
|
| /linux/drivers/misc/vmw_vmci/ |
| H A D | vmci_queue_pair.c | 345 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 D | tp_meter.c | 539 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/fs/smb/smbdirect/ |
| H A D | connection.c | 1798 int to_copy, to_read, data_read, offset; in smbdirect_connection_recvmsg() local 1876 to_copy = min_t(int, data_length - offset, to_read); in smbdirect_connection_recvmsg() 1878 to_copy, &msg->msg_iter) != to_copy) in smbdirect_connection_recvmsg() 1882 if (to_copy == data_length - offset) { in smbdirect_connection_recvmsg() 1904 offset += to_copy; in smbdirect_connection_recvmsg() 1906 to_read -= to_copy; in smbdirect_connection_recvmsg() 1907 data_read += to_copy; in smbdirect_connection_recvmsg() 1911 to_copy, data_length - offset, in smbdirect_connection_recvmsg()
|
| /linux/net/xfrm/ |
| H A D | xfrm_iptfs.c | 2001 u32 to_copy = skb->len - mtu; in iptfs_copy_create_frags() local 2011 to_copy = skb->len - offset; in iptfs_copy_create_frags() 2012 while (to_copy) { in iptfs_copy_create_frags() 2014 trace_iptfs_first_fragmenting(nskb, mtu, to_copy, NULL); in iptfs_copy_create_frags() 2021 copy_len = min(to_copy, mtu); in iptfs_copy_create_frags() 2030 iptfs_output_prepare_skb(nskb, to_copy); in iptfs_copy_create_frags() 2032 to_copy -= copy_len; in iptfs_copy_create_frags() 2033 blkoff = to_copy; in iptfs_copy_create_frags()
|
| /linux/fs/xfs/ |
| H A D | xfs_healthmon.c | 859 size_t to_copy; in xfs_healthmon_copybuf() local 864 to_copy = xfs_healthmon_outbuf_bytes(hm); in xfs_healthmon_copybuf() 865 if (to_copy) { in xfs_healthmon_copybuf() 866 w = copy_to_iter(hm->buffer + hm->buftail, to_copy, to); in xfs_healthmon_copybuf()
|
| /linux/drivers/md/dm-pcache/ |
| H A D | cache_key.c | 757 u32 to_copy, count = 0; in cache_replay() local 774 to_copy = min(PCACHE_KSET_ONMEDIA_SIZE_MAX, PCACHE_SEG_SIZE - pos->seg_off); in cache_replay() 775 ret = copy_mc_to_kernel(kset_onmedia, cache_pos_addr(pos), to_copy); in cache_replay()
|