/drivers/vfio/pci/ |
D | vfio_pci_igd.c | 51 size_t *remaining, in igd_opregion_shift_copy() argument 59 *remaining -= bytes; in igd_opregion_shift_copy() 71 size_t remaining; in vfio_pci_igd_rw() local 77 remaining = count; in vfio_pci_igd_rw() 80 if (remaining && pos < OPREGION_VERSION) { in vfio_pci_igd_rw() 81 size_t bytes = min_t(size_t, remaining, OPREGION_VERSION - pos); in vfio_pci_igd_rw() 85 &remaining, bytes)) in vfio_pci_igd_rw() 90 if (remaining && pos < OPREGION_VERSION + sizeof(__le16)) { in vfio_pci_igd_rw() 91 size_t bytes = min_t(size_t, remaining, in vfio_pci_igd_rw() 103 &pos, &remaining, bytes)) in vfio_pci_igd_rw() [all …]
|
/drivers/gpu/drm/amd/amdgpu/ |
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() 132 BUG_ON(size > cur->remaining); in amdgpu_res_next() 134 cur->remaining -= size; in amdgpu_res_next() 135 if (!cur->remaining) in amdgpu_res_next() 153 cur->size = min(amdgpu_vram_mgr_block_size(block), cur->remaining); in amdgpu_res_next() 161 cur->size = min(node->size << PAGE_SHIFT, cur->remaining); in amdgpu_res_next()
|
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()
|
/drivers/vfio/ |
D | iova_bitmap.c | 300 unsigned long remaining, bytes; in iova_bitmap_mapped_remaining() local 304 remaining = bitmap->mapped_total_index - bitmap->mapped_base_index; in iova_bitmap_mapped_remaining() 305 remaining = min_t(unsigned long, remaining, in iova_bitmap_mapped_remaining() 308 return remaining; in iova_bitmap_mapped_remaining() 318 unsigned long remaining; in iova_bitmap_mapped_length() local 326 remaining = iova_bitmap_index_to_offset(bitmap, in iova_bitmap_mapped_length() 329 if (iova + remaining - 1 > max_iova) in iova_bitmap_mapped_length() 330 remaining -= ((iova + remaining - 1) - max_iova); in iova_bitmap_mapped_length() 332 return remaining; in iova_bitmap_mapped_length()
|
/drivers/gpu/drm/msm/ |
D | msm_gem_shrinker.c | 110 unsigned long remaining; in msm_gem_shrinker_scan() member 120 unsigned long remaining = 0; in msm_gem_shrinker_scan() local 127 &stages[i].remaining, in msm_gem_shrinker_scan() 131 remaining += stages[i].remaining; in msm_gem_shrinker_scan() 140 return (freed > 0 && remaining > 0) ? freed : SHRINK_STOP; in msm_gem_shrinker_scan() 190 unsigned long remaining = 0; in msm_gem_shrinker_vmap() local 195 &remaining, in msm_gem_shrinker_vmap()
|
/drivers/target/tcm_fc/ |
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 …]
|
/drivers/md/bcache/ |
D | closure.h | 156 atomic_t remaining; member 183 if ((atomic_read(&cl->remaining) & CLOSURE_REMAINING_MASK) != 1) in closure_sync() 224 atomic_sub(CLOSURE_RUNNING, &cl->remaining); in closure_set_stopped() 259 BUG_ON((atomic_inc_return(&cl->remaining) & in closure_get() 262 atomic_inc(&cl->remaining); in closure_get() 279 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER); in closure_init() 288 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER); in closure_init_stack()
|
D | closure.c | 25 atomic_set(&cl->remaining, in closure_put_after_sub() 46 closure_put_after_sub(cl, atomic_sub_return(v, &cl->remaining)); in closure_sub() 54 closure_put_after_sub(cl, atomic_dec_return(&cl->remaining)); in closure_put() 87 if (atomic_read(&cl->remaining) & CLOSURE_WAITING) in closure_wait() 91 atomic_add(CLOSURE_WAITING + 1, &cl->remaining); in closure_wait() 169 int r = atomic_read(&cl->remaining); in debug_show()
|
/drivers/gpu/drm/radeon/ |
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()
|
/drivers/iio/imu/bno055/ |
D | bno055_ser_core.c | 386 int remaining = size; in bno055_ser_receive_buf() local 406 remaining--; in bno055_ser_receive_buf() 416 if (remaining == 0) in bno055_ser_receive_buf() 420 if (remaining > 1) { in bno055_ser_receive_buf() 434 remaining--; in bno055_ser_receive_buf() 441 if (remaining == 0) in bno055_ser_receive_buf() 444 if (priv->rx.databuf_count + remaining > priv->rx.expected_len) { in bno055_ser_receive_buf() 469 (priv->rx.databuf_count + remaining <= priv->expected_data_len)) in bno055_ser_receive_buf() 471 buf, remaining); in bno055_ser_receive_buf() 474 priv->rx.databuf_count += remaining; in bno055_ser_receive_buf()
|
/drivers/net/wwan/iosm/ |
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()
|
/drivers/char/ |
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()
|
/drivers/firmware/tegra/ |
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 …]
|
/drivers/net/ethernet/rocker/ |
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()
|
/drivers/net/wireless/intel/iwlwifi/fw/ |
D | paging.c | 174 int remaining = image->sec[sec_idx].len - offset; in iwl_fill_paging_mem() local 182 len = remaining; in iwl_fill_paging_mem() 183 if (remaining != in iwl_fill_paging_mem() 187 remaining); in iwl_fill_paging_mem() 191 } else if (block->fw_paging_size > remaining) { in iwl_fill_paging_mem() 194 idx, remaining); in iwl_fill_paging_mem()
|
/drivers/media/tuners/ |
D | tda18218.c | 16 int ret = 0, len2, remaining; in tda18218_wr_regs() local 33 for (remaining = len; remaining > 0; in tda18218_wr_regs() 34 remaining -= (priv->cfg->i2c_wr_max - 1)) { in tda18218_wr_regs() 35 len2 = remaining; in tda18218_wr_regs() 40 buf[0] = reg + len - remaining; in tda18218_wr_regs() 41 memcpy(&buf[1], &val[len - remaining], len2); in tda18218_wr_regs()
|
/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
D | aux.c | 42 u8 remaining = msg->len; in nvkm_i2c_aux_i2c_xfer() local 45 while (remaining) { in nvkm_i2c_aux_i2c_xfer() 53 if (mcnt || remaining > 16) in nvkm_i2c_aux_i2c_xfer() 59 cnt = min_t(u8, remaining, 16); in nvkm_i2c_aux_i2c_xfer() 72 remaining -= cnt; in nvkm_i2c_aux_i2c_xfer()
|
D | bit.c | 189 u8 remaining = msg->len; in nvkm_i2c_bit_xfer() local 197 while (!ret && remaining--) in nvkm_i2c_bit_xfer() 198 ret = nvkm_i2c_get_byte(bus, ptr++, !remaining); in nvkm_i2c_bit_xfer() 200 while (!ret && remaining--) in nvkm_i2c_bit_xfer()
|
/drivers/net/usb/ |
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() 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() 217 rx->remaining = 0; in asix_rx_fixup_internal() [all …]
|
/drivers/md/ |
D | dm-io.c | 315 sector_t remaining = where->count; in do_region() local 349 num_bvecs = bio_max_segs(dm_sector_div_up(remaining, in do_region() 355 bio->bi_iter.bi_sector = where->sector + (where->count - remaining); in do_region() 361 num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining); in do_region() 363 remaining -= num_sectors; in do_region() 365 while (remaining) { in do_region() 370 len = min(len, to_bytes(remaining)); in do_region() 375 remaining -= to_sector(len); in do_region() 382 } while (remaining); in do_region()
|
/drivers/media/usb/dvb-usb-v2/ |
D | ec168.c | 212 int ret, len, remaining; in ec168_download_firmware() local 217 for (remaining = fw->size; remaining > 0; remaining -= LEN_MAX) { in ec168_download_firmware() 218 len = remaining; in ec168_download_firmware() 223 req.data = (u8 *) &fw->data[fw->size - remaining]; in ec168_download_firmware() 224 req.index = fw->size - remaining; in ec168_download_firmware()
|
/drivers/usb/musb/ |
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()
|
/drivers/net/ethernet/intel/e1000e/ |
D | manage.c | 187 u16 remaining, i, j, prev_bytes; in e1000_mng_host_if_write() local 209 remaining = length & 0x3; in e1000_mng_host_if_write() 210 length -= remaining; in e1000_mng_host_if_write() 226 if (remaining) { in e1000_mng_host_if_write() 228 if (j < remaining) in e1000_mng_host_if_write()
|
/drivers/usb/class/ |
D | usbtmc.c | 826 u32 remaining; in usbtmc_generic_read() local 845 remaining = transfer_size; in usbtmc_generic_read() 855 remaining = max_transfer_size; in usbtmc_generic_read() 982 if (remaining > urb->actual_length) in usbtmc_generic_read() 985 this_part = remaining; in usbtmc_generic_read() 997 remaining -= this_part; in usbtmc_generic_read() 1113 u32 remaining; in usbtmc_generic_write() local 1142 remaining = transfer_size; in usbtmc_generic_write() 1143 if (remaining > INT_MAX) in usbtmc_generic_write() 1144 remaining = INT_MAX; in usbtmc_generic_write() [all …]
|
/drivers/i2c/busses/ |
D | i2c-imx-lpi2c.c | 344 unsigned int temp, remaining; in lpi2c_imx_set_rx_watermark() local 346 remaining = lpi2c_imx->msglen - lpi2c_imx->delivered; in lpi2c_imx_set_rx_watermark() 348 if (remaining > (lpi2c_imx->rxfifosize >> 1)) in lpi2c_imx_set_rx_watermark() 379 unsigned int blocklen, remaining; in lpi2c_imx_read_rxfifo() local 399 remaining = lpi2c_imx->msglen - lpi2c_imx->delivered; in lpi2c_imx_read_rxfifo() 401 if (!remaining) { in lpi2c_imx_read_rxfifo() 412 temp = remaining; in lpi2c_imx_read_rxfifo() 416 temp = (remaining > CHUNK_DATA ? CHUNK_DATA : remaining) - 1; in lpi2c_imx_read_rxfifo()
|