/linux/drivers/mtd/ubi/ |
H A D | gluebi.c | 156 int err = 0, lnum, offs, bytes_left; in gluebi_read() local 161 bytes_left = len; in gluebi_read() 162 while (bytes_left) { in gluebi_read() 165 if (to_read > bytes_left) in gluebi_read() 166 to_read = bytes_left; in gluebi_read() 174 bytes_left -= to_read; in gluebi_read() 178 *retlen = len - bytes_left; in gluebi_read() 196 int err = 0, lnum, offs, bytes_left; in gluebi_write() local 205 bytes_left = len; in gluebi_write() 206 while (bytes_left) { in gluebi_write() [all …]
|
H A D | nvmem.c | 25 size_t to_read, bytes_left = bytes; in ubi_nvmem_reg_read() local 38 while (bytes_left) { in ubi_nvmem_reg_read() 41 if (to_read > bytes_left) in ubi_nvmem_reg_read() 42 to_read = bytes_left; in ubi_nvmem_reg_read() 50 bytes_left -= to_read; in ubi_nvmem_reg_read()
|
/linux/drivers/media/usb/gspca/ |
H A D | sq905c.c | 125 int bytes_left; /* bytes remaining in current frame. */ in sq905c_dostream() local 154 bytes_left = buffer[0x40]|(buffer[0x41]<<8)|(buffer[0x42]<<16) in sq905c_dostream() 157 bytes_left); in sq905c_dostream() 162 while (bytes_left > 0 && gspca_dev->present) { in sq905c_dostream() 163 data_len = bytes_left > SQ905C_MAX_TRANSFER ? in sq905c_dostream() 164 SQ905C_MAX_TRANSFER : bytes_left; in sq905c_dostream() 173 data_len, bytes_left); in sq905c_dostream() 174 bytes_left -= data_len; in sq905c_dostream() 175 if (bytes_left == 0) in sq905c_dostream()
|
H A D | sq905.c | 202 int bytes_left; /* bytes remaining in current frame. */ in sq905_dostream() local 227 bytes_left = frame_sz; in sq905_dostream() 234 while (bytes_left > 0 && gspca_dev->present) { in sq905_dostream() 235 data_len = bytes_left > SQ905_MAX_TRANSFER ? in sq905_dostream() 236 SQ905_MAX_TRANSFER : bytes_left; in sq905_dostream() 242 data_len, bytes_left); in sq905_dostream() 243 bytes_left -= data_len; in sq905_dostream() 252 } else if (bytes_left == 0) { in sq905_dostream() 262 bytes_left == 0) in sq905_dostream()
|
H A D | jl2005bcd.c | 308 int bytes_left = 0; /* bytes remaining in current frame. */ in jl2005c_dostream() local 351 bytes_left = buffer[0x07] * dev->block_size - act_len; in jl2005c_dostream() 353 bytes_left); in jl2005c_dostream() 360 while (bytes_left > 0 && gspca_dev->present) { in jl2005c_dostream() 361 data_len = bytes_left > JL2005C_MAX_TRANSFER ? in jl2005c_dostream() 362 JL2005C_MAX_TRANSFER : bytes_left; in jl2005c_dostream() 371 data_len, bytes_left); in jl2005c_dostream() 372 bytes_left -= data_len; in jl2005c_dostream() 373 if (bytes_left == 0) { in jl2005c_dostream()
|
/linux/drivers/i2c/busses/ |
H A D | i2c-riic.c | 110 int bytes_left; member 184 riic->bytes_left = RIIC_INIT_MSG; in riic_xfer() 215 if (!riic->bytes_left) in riic_tdre_isr() 218 if (riic->bytes_left == RIIC_INIT_MSG) { in riic_tdre_isr() 224 riic->bytes_left = riic->msg->len; in riic_tdre_isr() 230 riic->bytes_left--; in riic_tdre_isr() 238 if (riic->bytes_left == 0) in riic_tdre_isr() 260 } else if (riic->bytes_left) { in riic_tend_isr() 280 if (!riic->bytes_left) in riic_rdrf_isr() 283 if (riic->bytes_left == RIIC_INIT_MSG) { in riic_rdrf_isr() [all …]
|
/linux/sound/soc/sof/intel/ |
H A D | hda-loader-skl.c | 458 unsigned int bytes_left = total_size; in cl_skl_cldma_copy_to_buf() local 465 while (bytes_left > 0) { in cl_skl_cldma_copy_to_buf() 466 if (bytes_left > bufsize) { in cl_skl_cldma_copy_to_buf() 474 __func__, bytes_left); in cl_skl_cldma_copy_to_buf() 478 bytes_left -= bufsize; in cl_skl_cldma_copy_to_buf() 481 dev_dbg(sdev->dev, "cldma copy %#x bytes\n", bytes_left); in cl_skl_cldma_copy_to_buf() 484 cl_skl_cldma_fill_buffer(sdev, dmab, bufsize, bytes_left, curr_pos, false); in cl_skl_cldma_copy_to_buf() 489 return bytes_left; in cl_skl_cldma_copy_to_buf()
|
/linux/drivers/virt/coco/efi_secret/ |
H A D | efi_secret.c | 216 int ret = 0, i = 0, bytes_left; in efi_secret_securityfs_setup() local 263 bytes_left = h->len - sizeof(*h); in efi_secret_securityfs_setup() 265 while (bytes_left >= (int)sizeof(*e) && i < EFI_SECRET_NUM_FILES) { in efi_secret_securityfs_setup() 267 if (e->len < sizeof(*e) || e->len > (unsigned int)bytes_left) { in efi_secret_securityfs_setup() 288 bytes_left -= e->len; in efi_secret_securityfs_setup()
|
/linux/fs/btrfs/ |
H A D | ordered-data.c | 182 entry->bytes_left = num_bytes; in alloc_ordered_extent() 360 if (WARN_ON_ONCE(len > ordered->bytes_left)) { in can_finish_ordered_extent() 365 len, ordered->bytes_left); in can_finish_ordered_extent() 366 ordered->bytes_left = 0; in can_finish_ordered_extent() 368 ordered->bytes_left -= len; in can_finish_ordered_extent() 374 if (ordered->bytes_left) in can_finish_ordered_extent() 578 if (io_size > entry->bytes_left) in btrfs_dec_test_ordered_pending() 581 entry->bytes_left, io_size); in btrfs_dec_test_ordered_pending() 583 entry->bytes_left -= io_size; in btrfs_dec_test_ordered_pending() 585 if (entry->bytes_left == 0) { in btrfs_dec_test_ordered_pending() [all …]
|
H A D | backref.c | 2133 s64 bytes_left = ((s64)size) - 1; in btrfs_ref_to_path() local 2138 if (bytes_left >= 0) in btrfs_ref_to_path() 2139 dest[bytes_left] = '\0'; in btrfs_ref_to_path() 2142 bytes_left -= name_len; in btrfs_ref_to_path() 2143 if (bytes_left >= 0) in btrfs_ref_to_path() 2144 read_extent_buffer(eb, dest + bytes_left, in btrfs_ref_to_path() 2178 --bytes_left; in btrfs_ref_to_path() 2179 if (bytes_left >= 0) in btrfs_ref_to_path() 2180 dest[bytes_left] = '/'; in btrfs_ref_to_path() 2188 return dest + bytes_left; in btrfs_ref_to_path() [all …]
|
H A D | zlib.c | 108 unsigned long bytes_left; in zlib_compress_folios() local 153 bytes_left = len - workspace->strm.total_in; in zlib_compress_folios() 154 in_buf_folios = min(DIV_ROUND_UP(bytes_left, PAGE_SIZE), in zlib_compress_folios() 179 workspace->strm.avail_in = min(bytes_left, in zlib_compress_folios()
|
/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | scan.c | 1197 u32 bytes_left; in mwifiex_update_bss_desc_with_ie() local 1205 bytes_left = bss_entry->beacon_buf_size; in mwifiex_update_bss_desc_with_ie() 1208 while (bytes_left >= 2) { in mwifiex_update_bss_desc_with_ie() 1213 if (bytes_left < total_ie_len) { in mwifiex_update_bss_desc_with_ie() 1440 bytes_left -= total_ie_len; in mwifiex_update_bss_desc_with_ie() 1730 u32 *bytes_left, u64 fw_tsf, u8 *radio_type, in mwifiex_parse_single_response_buf() argument 1751 if (*bytes_left >= sizeof(beacon_size)) { in mwifiex_parse_single_response_buf() 1754 *bytes_left -= sizeof(beacon_size); in mwifiex_parse_single_response_buf() 1758 if (!beacon_size || beacon_size > *bytes_left) { in mwifiex_parse_single_response_buf() 1759 *bss_info += *bytes_left; in mwifiex_parse_single_response_buf() [all …]
|
/linux/arch/x86/events/ |
H A D | utils.c | 92 int bytes_read, bytes_left, insn_offset; in get_branch_type() local 124 bytes_left = copy_from_user_nmi(buf, (void __user *)from, in get_branch_type() 126 bytes_read = MAX_INSN_SIZE - bytes_left; in get_branch_type()
|
/linux/drivers/infiniband/hw/hfi1/ |
H A D | pio_copy.c | 360 unsigned long bytes_left = nbytes & 0x7; in mid_copy_mix() local 433 if (pbuf->carry_bytes + bytes_left >= 8) { in mid_copy_mix() 463 bytes_left -= nread; in mid_copy_mix() 465 read_low_bytes(pbuf, from, bytes_left); in mid_copy_mix() 468 read_extra_bytes(pbuf, from, bytes_left); in mid_copy_mix()
|
/linux/drivers/scsi/elx/efct/ |
H A D | efct_driver.c | 251 u32 bytes_left; in efct_firmware_write() local 260 bytes_left = buf_len; in efct_firmware_write() 269 while (bytes_left > 0) { in efct_firmware_write() 270 if (bytes_left > FW_WRITE_BUFSIZE) in efct_firmware_write() 273 xfer_size = bytes_left; in efct_firmware_write() 277 if (bytes_left == xfer_size) in efct_firmware_write() 296 bytes_left -= result.actual_xfer; in efct_firmware_write()
|
/linux/fs/nfs/blocklayout/ |
H A D | blocklayout.c | 172 size_t bytes_left = header->args.count; in bl_mark_devices_unavailable() local 177 bytes_left += header->args.offset - (isect << SECTOR_SHIFT); in bl_mark_devices_unavailable() 179 while (bytes_left > 0) { in bl_mark_devices_unavailable() 185 if (bytes_left > extent_length << SECTOR_SHIFT) in bl_mark_devices_unavailable() 186 bytes_left -= extent_length << SECTOR_SHIFT; in bl_mark_devices_unavailable() 188 bytes_left = 0; in bl_mark_devices_unavailable() 239 size_t bytes_left = header->args.count; in bl_read_pagelist() local 274 if (pg_offset + bytes_left > PAGE_SIZE) in bl_read_pagelist() 277 pg_len = bytes_left; in bl_read_pagelist() 307 bytes_left -= pg_len; in bl_read_pagelist()
|
/linux/drivers/remoteproc/ |
H A D | remoteproc_coredump.c | 180 size_t seg_data, bytes_left = count; in rproc_coredump_read() local 199 while (bytes_left) { in rproc_coredump_read() 210 copy_sz = min_t(size_t, bytes_left, seg_data); in rproc_coredump_read() 217 bytes_left -= copy_sz; in rproc_coredump_read() 220 return count - bytes_left; in rproc_coredump_read()
|
/linux/drivers/gpu/drm/ttm/ |
H A D | ttm_bo_vm.c | 374 unsigned long bytes_left = len; in ttm_bo_vm_access_kmap() local 382 unsigned long bytes = min(bytes_left, PAGE_SIZE - offset); in ttm_bo_vm_access_kmap() 401 bytes_left -= bytes; in ttm_bo_vm_access_kmap() 403 } while (bytes_left); in ttm_bo_vm_access_kmap()
|
/linux/drivers/crypto/ccp/ |
H A D | ccp-ops.c | 86 wa->bytes_left = len; in ccp_init_sg_workarea() 108 unsigned int nbytes = min_t(u64, len, wa->bytes_left); in ccp_update_sg_workarea() 115 wa->bytes_left -= nbytes; in ccp_update_sg_workarea() 314 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); in ccp_queue_buf() 320 while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { in ccp_queue_buf() 323 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); in ccp_queue_buf() 354 sg_src_len = min_t(u64, src->sg_wa.bytes_left, sg_src_len); in ccp_prepare_data() 358 sg_dst_len = min_t(u64, src->sg_wa.bytes_left, sg_dst_len); in ccp_prepare_data() 570 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd() 572 if (aes->cmac_final && !src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd() [all …]
|
/linux/drivers/memory/ |
H A D | renesas-rpc-if.c | 526 u32 bytes_left = rpc->xferlen - pos; in rpcif_manual_xfer() local 532 nbytes = bytes_left >= max ? max : (1 << ilog2(bytes_left)); in rpcif_manual_xfer() 533 if (bytes_left > nbytes) in rpcif_manual_xfer() 584 u32 bytes_left = rpc->xferlen - pos; in rpcif_manual_xfer() local 588 nbytes = bytes_left >= max ? max : (1 << ilog2(bytes_left)); in rpcif_manual_xfer()
|
/linux/fs/ocfs2/dlmfs/ |
H A D | dlmfs.c | 242 int bytes_left; in dlmfs_file_write() 258 bytes_left = copy_from_user(lvb_buf, buf, count); in dlmfs_file_write() 259 count -= bytes_left; in dlmfs_file_write() 241 int bytes_left; dlmfs_file_write() local
|
/linux/drivers/net/ethernet/cavium/liquidio/ |
H A D | octeon_droq.c | 338 u32 i, bytes_left; in octeon_create_recv_info() local 354 bytes_left = (u32)info->length; in octeon_create_recv_info() 367 (bytes_left >= in octeon_create_recv_info() 368 droq->buffer_size) ? droq->buffer_size : bytes_left; in octeon_create_recv_info() 374 bytes_left -= droq->buffer_size; in octeon_create_recv_info()
|
/linux/drivers/spi/ |
H A D | spi-pxa2xx.c | 670 u32 bytes_left; in interrupt_transfer() local 685 bytes_left = drv_data->rx_end - drv_data->rx; in interrupt_transfer() 688 bytes_left >>= 2; in interrupt_transfer() 691 bytes_left >>= 1; in interrupt_transfer() 696 if (rx_thre > bytes_left) in interrupt_transfer() 697 rx_thre = bytes_left; in interrupt_transfer()
|
/linux/net/sched/ |
H A D | sch_netem.c | 153 s32 bytes_left; member 670 q->slot.bytes_left = q->slot_config.max_bytes; in get_slot_next() 736 q->slot.bytes_left -= qdisc_pkt_len(skb); in netem_dequeue() 738 q->slot.bytes_left <= 0) in netem_dequeue() 842 q->slot.bytes_left = q->slot_config.max_bytes; in get_slot()
|
/linux/fs/ocfs2/ |
H A D | namei.c | 1717 int virtual, blocks, status, i, bytes_left; in ocfs2_create_symlink_data() local 1719 bytes_left = i_size_read(inode) + 1; in ocfs2_create_symlink_data() 1722 blocks = (bytes_left + sb->s_blocksize - 1) >> sb->s_blocksize_bits; in ocfs2_create_symlink_data() 1728 if (bytes_left > in ocfs2_create_symlink_data() 1752 if ((p_blocks << sb->s_blocksize_bits) < bytes_left) { in ocfs2_create_symlink_data() 1759 while(bytes_left > 0) { in ocfs2_create_symlink_data() 1782 (bytes_left > sb->s_blocksize) ? sb->s_blocksize : in ocfs2_create_symlink_data() 1783 bytes_left); in ocfs2_create_symlink_data() 1789 bytes_left -= sb->s_blocksize; in ocfs2_create_symlink_data()
|