| /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 | 499 unsigned long to_copy, nbytes; in rds_message_copy_from_user() local 523 to_copy = min_t(unsigned long, iov_iter_count(from), in rds_message_copy_from_user() 526 rds_stats_add(s_copy_from_user, to_copy); in rds_message_copy_from_user() 528 to_copy, from); in rds_message_copy_from_user() 529 if (nbytes != to_copy) in rds_message_copy_from_user() 532 sg_off += to_copy; in rds_message_copy_from_user() 545 unsigned long to_copy; in rds_message_inc_copy_to_user() local 559 to_copy = min_t(unsigned long, iov_iter_count(to), in rds_message_inc_copy_to_user() 561 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_message_inc_copy_to_user() 563 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 | 119 ssize_t to_copy = 0; in smb_read() local 127 to_copy = min(sdb->data_size, len); in smb_read() 130 if (sdb->buf_rdptr + to_copy > sdb->buf_size) in smb_read() 131 to_copy = sdb->buf_size - sdb->buf_rdptr; in smb_read() 133 if (copy_to_user(data, sdb->buf_base + sdb->buf_rdptr, to_copy)) { in smb_read() 138 *ppos += to_copy; in smb_read() 139 smb_update_read_ptr(drvdata, to_copy); in smb_read() 143 dev_dbg(dev, "%zu bytes copied\n", to_copy); in smb_read() 144 return to_copy; in smb_read() 336 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/nvmem/ |
| H A D | brcm_nvram.c | 53 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 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 | 215 size_t to_copy, copied; in copy_file() 242 for (to_copy = stat.st_size; to_copy > 0; to_copy -= copied) { in save_argv() 243 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 | 125 size_t to_copy = size & ~(sizeof(_type) - 1); \ 128 ((_type *) dst, (_type *) src, to_copy); \ 198 size_t to_copy = round_down(size, sizeof(_type)); \ 201 ((_type *) dst, (_type *) src, to_copy); \ 202 location = size - to_copy + diff_offs - sizeof(_type); \ 206 dst -= to_copy - diff_offs; \ 207 src -= to_copy - diff_offs; \ 208 size -= to_copy - diff_offs; \
|
| /linux/mm/kmsan/ |
| H A D | hooks.c | 249 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, in kmsan_copy_to_user() 262 if (!to_copy) in kmsan_copy_to_user() 265 if (to_copy <= left) in kmsan_copy_to_user() 272 kmsan_internal_check_memory((void *)from, to_copy - left, to, in kmsan_copy_to_user() 283 to_copy - left); in kmsan_copy_to_user() 248 kmsan_copy_to_user(void __user * to,const void * from,size_t to_copy,size_t left) kmsan_copy_to_user() argument
|
| /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()
|
| H A D | dm-verity-fec.c | 58 unsigned int n, i, j, parity_pos, to_copy; in fec_decode_bufs() local 96 to_copy = min(v->fec->block_size - parity_pos, v->fec->roots); in fec_decode_bufs() 97 for (j = 0; j < to_copy; j++) in fec_decode_bufs() 99 if (to_copy < v->fec->roots) { in fec_decode_bufs()
|
| /linux/drivers/hid/ |
| H A D | hid-sensor-hub.c | 247 size_t to_copy; in sensor_hub_get_feature() local 284 to_copy = min(field_size, report_size - copied); in sensor_hub_get_feature() 285 memcpy(&((u8 *)buffer)[copied], &field->value[i], to_copy); in sensor_hub_get_feature() 286 copied += to_copy; in sensor_hub_get_feature()
|
| /linux/net/batman-adv/ |
| H A D | tp_meter.c | 585 size_t to_copy; in batadv_tp_fill_prerandom() local 597 to_copy = min(nbytes, bytes_inbuf); in batadv_tp_fill_prerandom() 599 memcpy(&buf[pos], &batadv_tp_prerandom[local_offset], to_copy); in batadv_tp_fill_prerandom() 600 pos += to_copy; in batadv_tp_fill_prerandom() 601 nbytes -= to_copy; in batadv_tp_fill_prerandom()
|
| /linux/net/xfrm/ |
| H A D | xfrm_iptfs.c | 2004 u32 to_copy = skb->len - mtu; in iptfs_copy_create_frags() local 2014 to_copy = skb->len - offset; in iptfs_copy_create_frags() 2015 while (to_copy) { in iptfs_copy_create_frags() 2017 trace_iptfs_first_fragmenting(nskb, mtu, to_copy, NULL); in iptfs_copy_create_frags() 2024 copy_len = min(to_copy, mtu); in iptfs_copy_create_frags() 2033 iptfs_output_prepare_skb(nskb, to_copy); in iptfs_copy_create_frags() 2035 to_copy -= copy_len; in iptfs_copy_create_frags() 2036 blkoff = to_copy; in iptfs_copy_create_frags()
|
| /linux/drivers/net/ethernet/sfc/ |
| H A D | mcdi_port_common.c | 895 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/drivers/net/ethernet/sfc/siena/ |
| H A D | mcdi_port_common.c | 914 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()
|