/linux/sound/soc/intel/avs/ |
H A D | cldma.c | 48 unsigned int remaining; member 64 if (cl->remaining > cl->buffer_size) in hda_cldma_fill() 67 size = cl->remaining; in hda_cldma_fill() 78 cl->remaining -= ss; in hda_cldma_fill() 83 cl->remaining -= size; in hda_cldma_fill() 113 if (!cl->remaining) in cldma_memcpy_work() 126 if (!cl->remaining) in hda_cldma_transfer() 202 cl->remaining = size; in hda_cldma_set_data() 209 int remaining = cl->buffer_size; in cldma_setup_bdle() local 214 while (remaining > 0) { in cldma_setup_bdle() [all …]
|
H A D | trace.c | 21 size_t remaining = size; in trace_avs_msg_payload() local 24 while (remaining > 0) { in trace_avs_msg_payload() 27 chunk = min_t(size_t, remaining, MAX_CHUNK_SIZE); in trace_avs_msg_payload() 30 remaining -= chunk; in trace_avs_msg_payload()
|
/linux/sound/soc/sof/ |
H A D | sof-client-ipc-msg-injector.c | 80 size_t remaining; in sof_msg_inject_ipc4_dfs_read() local 89 remaining = header_size; in sof_msg_inject_ipc4_dfs_read() 94 remaining += ipc4_msg->data_size; in sof_msg_inject_ipc4_dfs_read() 96 if (count > remaining) in sof_msg_inject_ipc4_dfs_read() 97 count = remaining; in sof_msg_inject_ipc4_dfs_read() 98 else if (count < remaining) in sof_msg_inject_ipc4_dfs_read() 99 remaining = count; in sof_msg_inject_ipc4_dfs_read() 106 remaining -= header_size; in sof_msg_inject_ipc4_dfs_read() 108 if (!remaining) in sof_msg_inject_ipc4_dfs_read() 111 if (remaining > ipc4_msg->data_size) in sof_msg_inject_ipc4_dfs_read() [all …]
|
/linux/arch/alpha/lib/ |
H A D | srm_puts.c | 12 long remaining, written; in srm_puts() local 17 for (remaining = len; remaining > 0; remaining -= written) in srm_puts() 19 written = callback_puts(0, str, remaining); in srm_puts()
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_res_cursor.h | 39 uint64_t remaining; member 89 cur->remaining = size; in amdgpu_res_first() 100 cur->remaining = size; in amdgpu_res_first() 112 cur->remaining = size; in amdgpu_res_first() 131 BUG_ON(size > cur->remaining); in amdgpu_res_next() 133 cur->remaining -= size; in amdgpu_res_next() 134 if (!cur->remaining) in amdgpu_res_next() 152 cur->size = min(amdgpu_vram_mgr_block_size(block), cur->remaining); in amdgpu_res_next() 160 cur->size = min(node->size << PAGE_SHIFT, cur->remaining); in amdgpu_res_next()
|
H A D | atombios_i2c.c | 112 int i, remaining, current_count, buffer_offset, max_bytes, ret; in amdgpu_atombios_i2c_xfer() local 129 remaining = p->len; in amdgpu_atombios_i2c_xfer() 139 while (remaining) { in amdgpu_atombios_i2c_xfer() 140 if (remaining > max_bytes) in amdgpu_atombios_i2c_xfer() 143 current_count = remaining; in amdgpu_atombios_i2c_xfer() 149 remaining -= current_count; in amdgpu_atombios_i2c_xfer()
|
/linux/include/net/ |
H A D | rtnh.h | 8 static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) in rtnh_ok() argument 10 return remaining >= (int)sizeof(*rtnh) && in rtnh_ok() 12 rtnh->rtnh_len <= remaining; in rtnh_ok() 16 int *remaining) in rtnh_next() argument 20 *remaining -= totlen; in rtnh_next()
|
/linux/drivers/target/tcm_fc/ |
H A D | tfc_io.c | 48 size_t remaining; in ft_queue_data_in() local 74 remaining = se_cmd->data_length; in ft_queue_data_in() 79 BUG_ON(remaining && !se_cmd->t_data_sg); in ft_queue_data_in() 80 if (remaining) { in ft_queue_data_in() 88 use_sg = !(remaining % 4); in ft_queue_data_in() 90 while (remaining) { in ft_queue_data_in() 100 mem_len = min((size_t)sg->length, remaining); in ft_queue_data_in() 112 frame_len = min(frame_len, remaining); in ft_queue_data_in() 154 remaining -= tlen; in ft_queue_data_in() 159 if (!remaining) in ft_queue_data_in() [all …]
|
/linux/drivers/gpu/drm/msm/ |
H A D | msm_gem_shrinker.c | 108 unsigned long remaining; in msm_gem_shrinker_scan() member 118 unsigned long remaining = 0; in msm_gem_shrinker_scan() local 125 &stages[i].remaining, in msm_gem_shrinker_scan() 129 remaining += stages[i].remaining; in msm_gem_shrinker_scan() 138 return (freed > 0 && remaining > 0) ? freed : SHRINK_STOP; in msm_gem_shrinker_scan() 189 unsigned long remaining = 0; in msm_gem_shrinker_vmap() local 194 &remaining, in msm_gem_shrinker_vmap()
|
/linux/lib/ |
H A D | closure.c | 40 atomic_set(&cl->remaining, in closure_put_after_sub() 61 closure_put_after_sub(cl, atomic_sub_return_release(v, &cl->remaining)); in closure_sub() 70 closure_put_after_sub(cl, atomic_dec_return_release(&cl->remaining)); in closure_put() 105 if (atomic_read(&cl->remaining) & CLOSURE_WAITING) in closure_wait() 110 atomic_add(CLOSURE_WAITING + 1, &cl->remaining); in closure_wait() 168 &cl->remaining); in closure_return_sync() 206 unsigned old, new, v = atomic_read(&cl->remaining); in __closure_sync_timeout() 213 } while ((v = atomic_cmpxchg(&cl->remaining, old, new)) != old); in __closure_sync_timeout() 266 int r = atomic_read(&cl->remaining); in debug_show()
|
/linux/drivers/gpu/drm/imagination/ |
H A D | pvr_cccb.c | 111 u32 read_offset, remaining; in pvr_cccb_cmdseq_fits() local 115 remaining = pvr_cccb->size - pvr_cccb->write_offset; in pvr_cccb_cmdseq_fits() 118 * If our command sequence does not fit, reserve the remaining space for a padding in pvr_cccb_cmdseq_fits() 121 if (size + PADDING_COMMAND_SIZE > remaining) in pvr_cccb_cmdseq_fits() 122 size += remaining; in pvr_cccb_cmdseq_fits() 159 u32 remaining = pvr_cccb->size - pvr_cccb->write_offset; in pvr_cccb_write_command_with_header() local 166 if (remaining < sz_with_hdr + PADDING_COMMAND_SIZE) { in pvr_cccb_write_command_with_header() 171 required_size = sz_with_hdr + remaining; in pvr_cccb_write_command_with_header() 185 .cmd_size = remaining - sizeof(pad_cmd), in pvr_cccb_write_command_with_header()
|
/linux/drivers/gpu/drm/radeon/ |
H A D | atombios_i2c.c | 105 int i, remaining, current_count, buffer_offset, max_bytes, ret; in radeon_atom_hw_i2c_xfer() local 122 remaining = p->len; in radeon_atom_hw_i2c_xfer() 132 while (remaining) { in radeon_atom_hw_i2c_xfer() 133 if (remaining > max_bytes) in radeon_atom_hw_i2c_xfer() 136 current_count = remaining; in radeon_atom_hw_i2c_xfer() 142 remaining -= current_count; in radeon_atom_hw_i2c_xfer()
|
/linux/drivers/iommu/iommufd/ |
H A D | iova_bitmap.c | 300 * Returns the remaining bitmap indexes from mapped_total_index to process for 305 unsigned long remaining, bytes; in iova_bitmap_mapped_remaining() local 309 remaining = bitmap->mapped_total_index - bitmap->mapped_base_index; in iova_bitmap_mapped_remaining() 310 remaining = min_t(unsigned long, remaining, in iova_bitmap_mapped_remaining() 313 return remaining; in iova_bitmap_mapped_remaining() 323 unsigned long remaining; in iova_bitmap_mapped_length() local 331 remaining = iova_bitmap_index_to_offset(bitmap, in iova_bitmap_mapped_length() 334 if (iova + remaining - 1 > max_iova) in iova_bitmap_mapped_length() 335 remaining -= ((iova + remaining - 1) - max_iova); in iova_bitmap_mapped_length() 337 return remaining; in iova_bitmap_mapped_length()
|
/linux/net/sunrpc/xprtrdma/ |
H A D | svc_rdma_sendto.c | 57 * the svc_rqst will be recycled as soon as sendto returns. Remaining 412 * @remaining: remaining bytes of the payload left in the Write chunk 417 * that was consumed by the Write segment, and updates @remaining 422 u32 *remaining, unsigned int segno) in svc_rdma_encode_write_segment() argument 433 length = min_t(u32, *remaining, segment->rs_length); in svc_rdma_encode_write_segment() 434 *remaining -= length; in svc_rdma_encode_write_segment() 459 u32 remaining = chunk->ch_payload_length; in svc_rdma_encode_write_chunk() local 475 ret = svc_rdma_encode_write_segment(sctxt, chunk, &remaining, segno); in svc_rdma_encode_write_chunk() 623 unsigned int len, remaining; in svc_rdma_xb_dma_map() local 634 remaining = xdr->page_len; in svc_rdma_xb_dma_map() [all …]
|
/linux/drivers/firmware/tegra/ |
H A D | bpmp-debugfs.c | 196 int remaining, err, close_err; in mrq_debug_read() local 209 remaining = len; in mrq_debug_read() 211 while (remaining > 0) { in mrq_debug_read() 220 if (resp.frd.readlen > remaining) { in mrq_debug_read() 228 remaining -= resp.frd.readlen; in mrq_debug_read() 261 size_t remaining; in mrq_debug_write() local 275 remaining = sz_data; in mrq_debug_write() 277 while (remaining > 0) { in mrq_debug_write() 278 len = min(remaining, sizeof(req.fwr.data)); in mrq_debug_write() 291 remaining -= req.fwr.datalen; in mrq_debug_write() [all …]
|
/linux/drivers/net/wwan/iosm/ |
H A D | iosm_ipc_coredump.c | 22 s32 remaining; in ipc_coredump_collect() local 29 remaining = devlink->cd_file_info[entry].actual_size; in ipc_coredump_collect() 35 while (remaining > 0) { in ipc_coredump_collect() 36 bytes_to_read = min(remaining, MAX_DATA_SIZE); in ipc_coredump_collect() 44 remaining -= bytes_read; in ipc_coredump_collect()
|
/linux/drivers/char/ |
H A D | ps3flash.c | 100 size_t remaining, n; in ps3flash_read() local 121 remaining = count; in ps3flash_read() 123 n = min_t(u64, remaining, dev->bounce_size - offset); in ps3flash_read() 150 remaining -= n; in ps3flash_read() 153 } while (remaining > 0); in ps3flash_read() 169 size_t remaining, n; in ps3flash_write() local 190 remaining = count; in ps3flash_write() 192 n = min_t(u64, remaining, dev->bounce_size - offset); in ps3flash_write() 225 remaining -= n; in ps3flash_write() 228 } while (remaining > 0); in ps3flash_write()
|
/linux/lib/xz/ |
H A D | xz_dec_test.c | 104 size_t remaining; in xz_dec_test_write() local 118 remaining = size; in xz_dec_test_write() 119 while ((remaining > 0 || buffers.out_pos == buffers.out_size) in xz_dec_test_write() 123 buffers.in_size = min(remaining, sizeof(buffer_in)); in xz_dec_test_write() 128 remaining -= buffers.in_size; in xz_dec_test_write() 144 return size - remaining - (buffers.in_size - buffers.in_pos); in xz_dec_test_write()
|
/linux/fs/xfs/ |
H A D | xfs_qm_bhv.c | 36 uint64_t remaining = 0; in xfs_fill_statvfs_from_dquot() local 39 remaining = limit - blkres->reserved; in xfs_fill_statvfs_from_dquot() 42 statp->f_bfree = min(statp->f_bfree, remaining); in xfs_fill_statvfs_from_dquot() 49 uint64_t remaining = 0; in xfs_fill_statvfs_from_dquot() local 52 remaining = limit - dqp->q_ino.reserved; in xfs_fill_statvfs_from_dquot() 55 statp->f_ffree = min(statp->f_ffree, remaining); in xfs_fill_statvfs_from_dquot()
|
/linux/include/linux/ |
H A D | closure.h | 124 * must be cleared before remaining hits 0. Primarily to help guard 156 atomic_t remaining; member 179 return atomic_read(&cl->remaining) & CLOSURE_REMAINING_MASK; in closure_nr_remaining() 245 atomic_sub(CLOSURE_RUNNING, &cl->remaining); in closure_set_stopped() 281 BUG_ON((atomic_inc_return(&cl->remaining) & in closure_get() 284 atomic_inc(&cl->remaining); in closure_get() 293 unsigned old = atomic_read(&cl->remaining); in closure_get_not_zero() 298 } while (!atomic_try_cmpxchg_acquire(&cl->remaining, &old, old + 1)); in closure_get_not_zero() 316 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER); in closure_init() 326 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER); in closure_init_stack() [all …]
|
/linux/net/mptcp/ |
H A D | options.c | 646 unsigned int remaining, in mptcp_established_options_add_addr() argument 662 !mptcp_pm_add_addr_signal(msk, skb, opt_size, remaining, &addr, in mptcp_established_options_add_addr() 671 remaining += opt_size; in mptcp_established_options_add_addr() 676 if (remaining < len) in mptcp_established_options_add_addr() 710 unsigned int remaining, in mptcp_established_options_rm_addr() argument 719 !(mptcp_pm_rm_addr_signal(msk, remaining, &rm_list))) in mptcp_established_options_rm_addr() 725 if (remaining < len) in mptcp_established_options_rm_addr() 740 unsigned int remaining, in mptcp_established_options_mp_prio() argument 752 if (remaining < TCPOLEN_MPTCP_PRIO_ALIGN) in mptcp_established_options_mp_prio() 766 unsigned int remaining, in mptcp_established_options_rst() argument [all …]
|
/linux/drivers/usb/musb/ |
H A D | tusb6010_omap.c | 107 unsigned long remaining, flags, pio; in tusb_omap_dma_cb() local 115 remaining = musb_readl(ep_conf, TUSB_EP_TX_OFFSET); in tusb_omap_dma_cb() 117 remaining = musb_readl(ep_conf, TUSB_EP_RX_OFFSET); in tusb_omap_dma_cb() 119 remaining = TUSB_EP_CONFIG_XFR_SIZE(remaining); in tusb_omap_dma_cb() 122 if (unlikely(remaining > chdat->transfer_len)) { in tusb_omap_dma_cb() 124 chdat->tx ? "tx" : "rx", remaining); in tusb_omap_dma_cb() 125 remaining = 0; in tusb_omap_dma_cb() 128 channel->actual_len = chdat->transfer_len - remaining; in tusb_omap_dma_cb() 131 dev_dbg(musb->controller, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); in tusb_omap_dma_cb() 133 /* Transfer remaining 1 - 31 bytes */ in tusb_omap_dma_cb() [all …]
|
/linux/lib/zstd/common/ |
H A D | entropy_common.c | 50 int remaining; in FSE_readNCount_body() local 78 remaining = (1<<nbBits)+1; in FSE_readNCount_body() 133 int const max = (2*threshold-1) - remaining; in FSE_readNCount_body() 150 remaining -= count; in FSE_readNCount_body() 153 remaining += count; in FSE_readNCount_body() 159 if (remaining < threshold) { in FSE_readNCount_body() 164 if (remaining <= 1) break; in FSE_readNCount_body() 165 nbBits = ZSTD_highbit32(remaining) + 1; in FSE_readNCount_body() 180 if (remaining != 1) return ERROR(corruption_detected); in FSE_readNCount_body()
|
/linux/drivers/net/usb/ |
H A D | asix_common.c | 131 rx->remaining = 0; in reset_asix_rx_fixup_info() 151 if (rx->remaining && (rx->remaining + sizeof(u32) <= skb->len)) { in asix_rx_fixup_internal() 152 offset = ((rx->remaining + 1) & 0xfffe); in asix_rx_fixup_internal() 158 netdev_err(dev->net, "asix_rx_fixup() Data Header synchronisation was lost, remaining %d\n", in asix_rx_fixup_internal() 159 rx->remaining); in asix_rx_fixup_internal() 167 if (!rx->remaining) { in asix_rx_fixup_internal() 209 rx->remaining = size; in asix_rx_fixup_internal() 212 if (rx->remaining > skb->len - offset) { in asix_rx_fixup_internal() 214 rx->remaining -= copy_length; in asix_rx_fixup_internal() 216 copy_length = rx->remaining; in asix_rx_fixup_internal() [all …]
|
/linux/drivers/net/ethernet/rocker/ |
H A D | rocker_tlv.h | 30 int *remaining) in rocker_tlv_next() argument 34 *remaining -= totlen; in rocker_tlv_next() 38 static inline int rocker_tlv_ok(const struct rocker_tlv *tlv, int remaining) in rocker_tlv_ok() argument 40 return remaining >= (int) ROCKER_TLV_HDRLEN && in rocker_tlv_ok() 42 tlv->len <= remaining; in rocker_tlv_ok()
|