/openbmc/linux/net/rds/ |
H A D | tcp_recv.c | 78 to_copy = min(to_copy, skb->len - skb_off); in rds_tcp_inc_copy_to_user() 84 ret += to_copy; in rds_tcp_inc_copy_to_user() 135 to_copy); in rds_tcp_cong_recv() 138 skb_off += to_copy; in rds_tcp_cong_recv() 139 map_off += to_copy; in rds_tcp_cong_recv() 163 size_t left = len, to_copy; in rds_tcp_data_recv() local 202 to_copy); in rds_tcp_data_recv() 204 left -= to_copy; in rds_tcp_data_recv() 205 offset += to_copy; in rds_tcp_data_recv() 233 left -= to_copy; in rds_tcp_data_recv() [all …]
|
H A D | message.c | 422 unsigned long to_copy, nbytes; in rds_message_copy_from_user() local 451 to_copy, from); in rds_message_copy_from_user() 452 if (nbytes != to_copy) in rds_message_copy_from_user() 455 sg_off += to_copy; in rds_message_copy_from_user() 468 unsigned long to_copy; in rds_message_inc_copy_to_user() local 484 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_message_inc_copy_to_user() 486 rds_stats_add(s_copy_to_user, to_copy); in rds_message_inc_copy_to_user() 488 to_copy, to); in rds_message_inc_copy_to_user() 489 if (ret != to_copy) in rds_message_inc_copy_to_user() 492 vec_off += to_copy; in rds_message_inc_copy_to_user() [all …]
|
H A D | ib_recv.c | 538 unsigned long to_copy; in rds_ib_inc_copy_to_user() local 556 to_copy = min_t(unsigned long, to_copy, len - copied); in rds_ib_inc_copy_to_user() 562 to_copy, in rds_ib_inc_copy_to_user() 564 if (ret != to_copy) in rds_ib_inc_copy_to_user() 567 frag_off += to_copy; in rds_ib_inc_copy_to_user() 568 copied += to_copy; in rds_ib_inc_copy_to_user() 792 unsigned long to_copy; in rds_ib_cong_recv() local 821 for (k = 0; k < to_copy; k += 8) { in rds_ib_cong_recv() 829 copied += to_copy; in rds_ib_cong_recv() 831 map_off += to_copy; in rds_ib_cong_recv() [all …]
|
/openbmc/linux/drivers/staging/fbtft/ |
H A D | fbtft-bus.c | 126 size_t to_copy; in fbtft_write_vmem16_bus8() local 157 to_copy, remain - to_copy); in fbtft_write_vmem16_bus8() 159 for (i = 0; i < to_copy; i++) in fbtft_write_vmem16_bus8() 162 vmem16 = vmem16 + to_copy; in fbtft_write_vmem16_bus8() 164 startbyte_size + to_copy * 2); in fbtft_write_vmem16_bus8() 167 remain -= to_copy; in fbtft_write_vmem16_bus8() 180 size_t to_copy; in fbtft_write_vmem16_bus9() local 201 to_copy, remain - to_copy); in fbtft_write_vmem16_bus9() 209 for (i = 0; i < to_copy; i++) in fbtft_write_vmem16_bus9() 212 vmem8 = vmem8 + to_copy; in fbtft_write_vmem16_bus9() [all …]
|
H A 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()
|
/openbmc/qemu/hw/char/ |
H A D | goldfish_tty.c | 72 uint32_t to_copy; in goldfish_tty_cmd() local 98 to_copy = MIN(GOLFISH_TTY_BUFFER_SIZE, len); in goldfish_tty_cmd() 101 data_out, to_copy); in goldfish_tty_cmd() 102 qemu_chr_fe_write_all(&s->chr, data_out, to_copy); in goldfish_tty_cmd() 104 len -= to_copy; in goldfish_tty_cmd() 105 ptr += to_copy; in goldfish_tty_cmd() 112 const uint8_t *buf = fifo8_pop_bufptr(&s->rx_fifo, len, &to_copy); in goldfish_tty_cmd() 114 dma_memory_write_relaxed(&address_space_memory, ptr, buf, to_copy); in goldfish_tty_cmd() 116 len -= to_copy; in goldfish_tty_cmd() 117 ptr += to_copy; in goldfish_tty_cmd()
|
/openbmc/linux/drivers/hwtracing/coresight/ |
H A D | ultrasoc-smb.c | 130 ssize_t to_copy = 0; in smb_read() local 138 to_copy = min(sdb->data_size, len); in smb_read() 142 to_copy = sdb->buf_size - sdb->buf_rdptr; in smb_read() 149 *ppos += to_copy; in smb_read() 150 smb_update_read_ptr(drvdata, to_copy); in smb_read() 154 dev_dbg(dev, "%zu bytes copied\n", to_copy); in smb_read() 155 return to_copy; in smb_read() 361 unsigned long to_copy; in smb_sync_perf_buffer() local 370 to_copy = min(sdb->data_size, pg_space); in smb_sync_perf_buffer() 379 pg_offset += to_copy; in smb_sync_perf_buffer() [all …]
|
/openbmc/linux/drivers/xen/ |
H A D | xen-front-pgdir-shbuf.c | 276 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 …]
|
/openbmc/linux/tools/testing/selftests/arm64/signal/ |
H A D | test_signals_utils.c | 175 size_t to_copy; in handle_signal_copyctx() local 196 to_copy = __builtin_offsetof(ucontext_t, in handle_signal_copyctx() 198 to_copy += offset + sizeof(struct extra_context) + 16; in handle_signal_copyctx() 199 to_copy += extra->size; in handle_signal_copyctx() 203 to_copy = sizeof(ucontext_t); in handle_signal_copyctx() 206 if (to_copy > td->live_sz) { in handle_signal_copyctx() 209 td->live_sz, to_copy); in handle_signal_copyctx() 213 memcpy(td->live_uc, uc, to_copy); in handle_signal_copyctx() 228 to_copy); in handle_signal_copyctx()
|
/openbmc/linux/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_smi_events.c | 84 size_t to_copy; in kfd_smi_ev_read() local 97 to_copy = kfifo_len(&client->fifo); in kfd_smi_ev_read() 98 if (!to_copy) { in kfd_smi_ev_read() 103 to_copy = min(size, to_copy); in kfd_smi_ev_read() 104 ret = kfifo_out(&client->fifo, buf, to_copy); in kfd_smi_ev_read() 111 ret = copy_to_user(user, buf, to_copy); in kfd_smi_ev_read() 118 return to_copy; in kfd_smi_ev_read()
|
/openbmc/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()
|
/openbmc/linux/drivers/most/ |
H A D | most_cdev.c | 186 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()
|
/openbmc/linux/fs/btrfs/ |
H A D | zlib.c | 363 unsigned long to_copy; in zlib_decompress() local 393 to_copy = min(workspace->strm.total_out, destlen); in zlib_decompress() 397 memcpy_to_page(dest_page, dest_pgoff, workspace->buf, to_copy); in zlib_decompress() 400 if (unlikely(to_copy != destlen)) { in zlib_decompress() 402 to_copy, destlen); in zlib_decompress() 410 if (unlikely(to_copy < destlen)) in zlib_decompress() 411 memzero_page(dest_page, dest_pgoff + to_copy, destlen - to_copy); in zlib_decompress()
|
/openbmc/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_blit.c | 122 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; \
|
/openbmc/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()
|
/openbmc/linux/include/linux/ |
H A D | kmsan-checks.h | 61 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, 77 size_t to_copy, size_t left) in kmsan_copy_to_user() argument
|
/openbmc/linux/mm/kmsan/ |
H A D | hooks.c | 250 void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, in kmsan_copy_to_user() argument 263 if (!to_copy) in kmsan_copy_to_user() 266 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() 282 to_copy - left); in kmsan_copy_to_user()
|
/openbmc/linux/drivers/infiniband/sw/siw/ |
H A D | siw_qp_rx.c | 927 infop += to_copy; in siw_proc_terminate() 928 srx->skb_offset += to_copy; in siw_proc_terminate() 929 srx->skb_new -= to_copy; in siw_proc_terminate() 930 srx->skb_copied += to_copy; in siw_proc_terminate() 931 srx->fpdu_part_rcvd += to_copy; in siw_proc_terminate() 932 srx->fpdu_part_rem -= to_copy; in siw_proc_terminate() 934 to_copy = iwarp_pktinfo[op].hdr_len - to_copy; in siw_proc_terminate() 952 srx->skb_new -= to_copy; in siw_proc_terminate() 953 srx->skb_offset += to_copy; in siw_proc_terminate() 954 srx->skb_copied += to_copy; in siw_proc_terminate() [all …]
|
/openbmc/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()
|
/openbmc/qemu/hw/audio/ |
H A D | es1370.c | 627 int acquired, to_copy; in es1370_transfer_audio() local 629 to_copy = MIN(to_transfer, sizeof(tmpbuf)); in es1370_transfer_audio() 630 acquired = AUD_read (s->adc_voice, tmpbuf, to_copy); in es1370_transfer_audio() 645 int copied, to_copy; in es1370_transfer_audio() local 647 to_copy = MIN(to_transfer, sizeof(tmpbuf)); in es1370_transfer_audio() 648 pci_dma_read (&s->dev, addr, tmpbuf, to_copy); in es1370_transfer_audio() 649 copied = AUD_write (voice, tmpbuf, to_copy); in es1370_transfer_audio()
|
H A D | ac97.c | 893 int to_copy = 0; in write_audio() local 903 to_copy = MIN(temp, sizeof(tmpbuf)); in write_audio() 904 pci_dma_read(&s->dev, addr, tmpbuf, to_copy); in write_audio() 905 copied = AUD_write(s->voice_po, tmpbuf, to_copy); in write_audio() 907 max, to_copy, copied); in write_audio() 918 if (to_copy < 4) { in write_audio() 922 s->last_samp = *(uint32_t *)&tmpbuf[to_copy - 4]; in write_audio() 966 int to_copy = 0; in read_audio() local 978 to_copy = MIN(temp, sizeof(tmpbuf)); in read_audio() 979 acquired = AUD_read(voice, tmpbuf, to_copy); in read_audio()
|
H A D | cs4231a.c | 540 size_t to_copy; in cs_write_audio() local 542 to_copy = MIN (temp, left); in cs_write_audio() 543 if (to_copy > sizeof (tmpbuf)) { in cs_write_audio() 544 to_copy = sizeof (tmpbuf); in cs_write_audio() 547 copied = k->read_memory(s->isa_dma, nchan, tmpbuf, dma_pos, to_copy); in cs_write_audio()
|
H A D | gus.c | 192 int to_copy = MIN ((size_t) left, sizeof (tmpbuf)); in GUS_read_DMA() local 195 ldebug ("left=%d to_copy=%d pos=%d\n", left, to_copy, pos); in GUS_read_DMA() 196 copied = k->read_memory(s->isa_dma, nchan, tmpbuf, pos, to_copy); in GUS_read_DMA()
|
/openbmc/linux/drivers/vfio/pci/mlx5/ |
H A D | main.c | 678 size_t copy_len, to_copy; in mlx5vf_resume_read_image() local 681 to_copy = min_t(size_t, *len, image_size - vhca_buf->length); in mlx5vf_resume_read_image() 682 copy_len = to_copy; in mlx5vf_resume_read_image() 683 while (to_copy) { in mlx5vf_resume_read_image() 684 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, pos, in mlx5vf_resume_read_image() 706 size_t copy_len, to_copy; in mlx5vf_resume_read_header_data() local 712 to_copy = min_t(size_t, *len, required_data); in mlx5vf_resume_read_header_data() 713 copy_len = to_copy; in mlx5vf_resume_read_header_data() 714 while (to_copy) { in mlx5vf_resume_read_header_data() 715 ret = mlx5vf_append_page_to_mig_buf(vhca_buf, buf, &to_copy, pos, in mlx5vf_resume_read_header_data()
|
/openbmc/linux/drivers/md/ |
H A D | dm-flakey.c | 440 unsigned size_to_add, to_copy; in clone_bio() local 458 to_copy = size_to_add; in clone_bio() 461 unsigned this_step = min(bvec.bv_len, to_copy); in clone_bio() 467 to_copy -= this_step; in clone_bio() 469 } while (to_copy); in clone_bio()
|