Home
last modified time | relevance | path

Searched refs:remaining (Results 1 – 25 of 95) sorted by relevance

1234

/drivers/md/bcache/
Dclosure.h164 atomic_t remaining; member
222 if (atomic_read(&cl->remaining) & CLOSURE_SLEEPING) in __closure_end_sleep()
223 atomic_sub(CLOSURE_SLEEPING, &cl->remaining); in __closure_end_sleep()
232 if (!(atomic_read(&cl->remaining) & CLOSURE_SLEEPING)) in __closure_start_sleep()
233 atomic_add(CLOSURE_SLEEPING, &cl->remaining); in __closure_start_sleep()
238 atomic_sub(CLOSURE_RUNNING, &cl->remaining); in closure_set_stopped()
268 BUG_ON((atomic_inc_return(&cl->remaining) & in closure_get()
271 atomic_inc(&cl->remaining); in closure_get()
288 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER); in closure_init()
297 atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER|CLOSURE_STACK); in closure_init_stack()
Dclosure.c27 atomic_set(&cl->remaining, in closure_put_after_sub()
48 closure_put_after_sub(cl, atomic_sub_return(v, &cl->remaining)); in closure_sub()
57 closure_put_after_sub(cl, atomic_dec_return(&cl->remaining)); in closure_put()
92 if (atomic_read(&cl->remaining) & CLOSURE_WAITING) in closure_wait()
96 atomic_add(CLOSURE_WAITING + 1, &cl->remaining); in closure_wait()
115 if ((atomic_read(&cl->remaining) & in closure_sync()
165 int r = atomic_read(&cl->remaining); in debug_seq_show()
/drivers/target/tcm_fc/
Dtfc_io.c61 size_t remaining; in ft_queue_data_in() local
87 remaining = se_cmd->data_length; in ft_queue_data_in()
92 BUG_ON(remaining && !se_cmd->t_data_sg); in ft_queue_data_in()
93 if (remaining) { in ft_queue_data_in()
101 use_sg = !(remaining % 4); in ft_queue_data_in()
103 while (remaining) { in ft_queue_data_in()
113 mem_len = min((size_t)sg->length, remaining); in ft_queue_data_in()
125 frame_len = min(frame_len, remaining); in ft_queue_data_in()
168 remaining -= tlen; in ft_queue_data_in()
173 if (!remaining) in ft_queue_data_in()
[all …]
/drivers/usb/host/whci/
Dqset.c267 size_t remaining, offset; in qset_copy_bounce_to_sg() local
270 remaining = std->len; in qset_copy_bounce_to_sg()
275 while (remaining) { in qset_copy_bounce_to_sg()
278 len = min(sg->length - offset, remaining); in qset_copy_bounce_to_sg()
282 remaining -= len; in qset_copy_bounce_to_sg()
437 size_t remaining; in qset_add_urb_sg() local
447 remaining = urb->transfer_buffer_length; in qset_add_urb_sg()
455 if (remaining == 0) { in qset_add_urb_sg()
460 dma_remaining = min_t(size_t, sg_dma_len(sg), remaining); in qset_add_urb_sg()
529 remaining -= dma_len; in qset_add_urb_sg()
[all …]
/drivers/gpu/drm/radeon/
Datombios_i2c.c110 int i, remaining, current_count, buffer_offset, max_bytes, ret; in radeon_atom_hw_i2c_xfer() local
127 remaining = p->len; in radeon_atom_hw_i2c_xfer()
137 while (remaining) { in radeon_atom_hw_i2c_xfer()
138 if (remaining > max_bytes) in radeon_atom_hw_i2c_xfer()
141 current_count = remaining; in radeon_atom_hw_i2c_xfer()
147 remaining -= current_count; in radeon_atom_hw_i2c_xfer()
/drivers/gpu/drm/amd/amdgpu/
Datombios_i2c.c110 int i, remaining, current_count, buffer_offset, max_bytes, ret; in amdgpu_atombios_i2c_xfer() local
127 remaining = p->len; in amdgpu_atombios_i2c_xfer()
137 while (remaining) { in amdgpu_atombios_i2c_xfer()
138 if (remaining > max_bytes) in amdgpu_atombios_i2c_xfer()
141 current_count = remaining; in amdgpu_atombios_i2c_xfer()
147 remaining -= current_count; in amdgpu_atombios_i2c_xfer()
/drivers/usb/class/
Dusbtmc.c600 size_t remaining; in usbtmc_read() local
631 remaining = count; in usbtmc_read()
632 this_part = remaining; in usbtmc_read()
635 while (remaining > 0) { in usbtmc_read()
637 dev_dbg(dev, "usb_bulk_msg_in: remaining(%zu), count(%zu)\n", remaining, count); in usbtmc_read()
639 if (remaining > USBTMC_SIZE_IOBUFFER - USBTMC_HEADER_SIZE - 3) in usbtmc_read()
642 this_part = remaining; in usbtmc_read()
660 …b_bulk_msg: retval(%u), done(%zu), remaining(%zu), actual(%d)\n", retval, done, remaining, actual); in usbtmc_read()
714 if (remaining > n_characters) in usbtmc_read()
715 remaining = n_characters; in usbtmc_read()
[all …]
/drivers/char/
Dps3flash.c112 size_t remaining, n; in ps3flash_read() local
133 remaining = count; in ps3flash_read()
135 n = min_t(u64, remaining, dev->bounce_size - offset); in ps3flash_read()
162 remaining -= n; in ps3flash_read()
165 } while (remaining > 0); in ps3flash_read()
181 size_t remaining, n; in ps3flash_write() local
202 remaining = count; in ps3flash_write()
204 n = min_t(u64, remaining, dev->bounce_size - offset); in ps3flash_write()
237 remaining -= n; in ps3flash_write()
240 } while (remaining > 0); in ps3flash_write()
/drivers/md/
Ddm-io.c305 sector_t remaining = where->count; in do_region() local
345 dm_sector_div_up(remaining, (PAGE_SIZE >> SECTOR_SHIFT))); in do_region()
349 bio->bi_iter.bi_sector = where->sector + (where->count - remaining); in do_region()
356 num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining); in do_region()
358 remaining -= num_sectors; in do_region()
365 num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining); in do_region()
369 remaining -= num_sectors; in do_region()
371 } else while (remaining) { in do_region()
376 len = min(len, to_bytes(remaining)); in do_region()
381 remaining -= to_sector(len); in do_region()
[all …]
/drivers/net/ethernet/rocker/
Drocker_tlv.h34 int *remaining) in rocker_tlv_next() argument
38 *remaining -= totlen; in rocker_tlv_next()
42 static inline int rocker_tlv_ok(const struct rocker_tlv *tlv, int remaining) in rocker_tlv_ok() argument
44 return remaining >= (int) ROCKER_TLV_HDRLEN && in rocker_tlv_ok()
46 tlv->len <= remaining; in rocker_tlv_ok()
/drivers/media/tuners/
Dtda18218.c25 int ret = 0, len2, remaining; in tda18218_wr_regs() local
42 for (remaining = len; remaining > 0; in tda18218_wr_regs()
43 remaining -= (priv->cfg->i2c_wr_max - 1)) { in tda18218_wr_regs()
44 len2 = remaining; in tda18218_wr_regs()
49 buf[0] = reg + len - remaining; in tda18218_wr_regs()
50 memcpy(&buf[1], &val[len - remaining], len2); in tda18218_wr_regs()
/drivers/misc/
Dlkdtm_bugs.c35 static int recursive_loop(int remaining) in recursive_loop() argument
40 memset(buf, (remaining & 0xff) | 0x1, REC_STACK_SIZE); in recursive_loop()
41 if (!remaining) in recursive_loop()
44 return recursive_loop(remaining - 1); in recursive_loop()
/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
Daux.c39 u8 remaining = msg->len; in nvkm_i2c_aux_i2c_xfer() local
42 while (remaining) { in nvkm_i2c_aux_i2c_xfer()
50 if (mcnt || remaining > 16) in nvkm_i2c_aux_i2c_xfer()
56 cnt = min_t(u8, remaining, 16); in nvkm_i2c_aux_i2c_xfer()
69 remaining -= cnt; in nvkm_i2c_aux_i2c_xfer()
Dbit.c189 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/
Dasix_common.c94 rx->remaining = 0; in reset_asix_rx_fixup_info()
114 if (rx->remaining && (rx->remaining + sizeof(u32) <= skb->len)) { in asix_rx_fixup_internal()
115 offset = ((rx->remaining + 1) & 0xfffe); in asix_rx_fixup_internal()
122 rx->remaining); in asix_rx_fixup_internal()
130 if (!rx->remaining) { in asix_rx_fixup_internal()
172 rx->remaining = size; in asix_rx_fixup_internal()
175 if (rx->remaining > skb->len - offset) { in asix_rx_fixup_internal()
177 rx->remaining -= copy_length; in asix_rx_fixup_internal()
179 copy_length = rx->remaining; in asix_rx_fixup_internal()
180 rx->remaining = 0; in asix_rx_fixup_internal()
[all …]
/drivers/media/usb/dvb-usb-v2/
Dec168.c210 int ret, len, remaining; in ec168_download_firmware() local
215 for (remaining = fw->size; remaining > 0; remaining -= LEN_MAX) { in ec168_download_firmware()
216 len = remaining; in ec168_download_firmware()
221 req.data = (u8 *) &fw->data[fw->size - remaining]; in ec168_download_firmware()
222 req.index = fw->size - remaining; in ec168_download_firmware()
/drivers/net/ethernet/intel/e1000e/
Dmanage.c205 u16 remaining, i, j, prev_bytes; in e1000_mng_host_if_write() local
227 remaining = length & 0x3; in e1000_mng_host_if_write()
228 length -= remaining; in e1000_mng_host_if_write()
244 if (remaining) { in e1000_mng_host_if_write()
246 if (j < remaining) in e1000_mng_host_if_write()
/drivers/usb/musb/
Dtusb6010_omap.c110 unsigned long remaining, flags, pio; in tusb_omap_dma_cb() local
118 remaining = musb_readl(ep_conf, TUSB_EP_TX_OFFSET); in tusb_omap_dma_cb()
120 remaining = musb_readl(ep_conf, TUSB_EP_RX_OFFSET); in tusb_omap_dma_cb()
122 remaining = TUSB_EP_CONFIG_XFR_SIZE(remaining); in tusb_omap_dma_cb()
125 if (unlikely(remaining > chdat->transfer_len)) { in tusb_omap_dma_cb()
127 chdat->tx ? "tx" : "rx", remaining); in tusb_omap_dma_cb()
128 remaining = 0; in tusb_omap_dma_cb()
131 channel->actual_len = chdat->transfer_len - remaining; in tusb_omap_dma_cb()
134 dev_dbg(musb->controller, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); in tusb_omap_dma_cb()
/drivers/i2c/busses/
Di2c-imx-lpi2c.c354 unsigned int temp, remaining; in lpi2c_imx_set_rx_watermark() local
356 remaining = lpi2c_imx->msglen - lpi2c_imx->delivered; in lpi2c_imx_set_rx_watermark()
358 if (remaining > (lpi2c_imx->rxfifosize >> 1)) in lpi2c_imx_set_rx_watermark()
389 unsigned int blocklen, remaining; in lpi2c_imx_read_rxfifo() local
409 remaining = lpi2c_imx->msglen - lpi2c_imx->delivered; in lpi2c_imx_read_rxfifo()
411 if (!remaining) { in lpi2c_imx_read_rxfifo()
422 temp = remaining; in lpi2c_imx_read_rxfifo()
426 temp = (remaining > CHUNK_DATA ? CHUNK_DATA : remaining) - 1; in lpi2c_imx_read_rxfifo()
/drivers/staging/rtl8723bs/
DTODO3 - find and remove remaining code valid only for 5 HGz. Most of the obvious
6 - convert any remaining unusual variable types
8 - checkpatch.pl fixes - most of the remaining ones are lines too long. Many
/drivers/staging/rtl8188eu/
DTODO2 - find and remove remaining code valid only for 5 HGz. Most of the obvious
5 - convert any remaining unusual variable types
7 - checkpatch.pl fixes - most of the remaining ones are lines too long. Many
/drivers/mtd/spi-nor/
Dcadence-quadspi.c501 unsigned int remaining = n_rx; in cqspi_indirect_read_execute() local
507 writel(remaining, reg_base + CQSPI_REG_INDIRECTRDBYTES); in cqspi_indirect_read_execute()
518 while (remaining > 0) { in cqspi_indirect_read_execute()
532 unsigned int word_remain = round_down(remaining, 4); in cqspi_indirect_read_execute()
535 bytes_to_read = bytes_to_read > remaining ? in cqspi_indirect_read_execute()
536 remaining : bytes_to_read; in cqspi_indirect_read_execute()
551 remaining -= bytes_to_read; in cqspi_indirect_read_execute()
555 if (remaining > 0) in cqspi_indirect_read_execute()
616 unsigned int remaining = n_tx; in cqspi_indirect_write_execute() local
620 writel(remaining, reg_base + CQSPI_REG_INDIRECTWRBYTES); in cqspi_indirect_write_execute()
[all …]
/drivers/firmware/efi/
Dapple-properties.c64 int remaining = dev_header->len - (ptr - (void *)dev_header); in unmarshal_key_value_pairs() local
68 if (sizeof(key_len) > remaining) in unmarshal_key_value_pairs()
72 if (key_len + sizeof(val_len) > remaining || in unmarshal_key_value_pairs()
81 if (key_len + val_len > remaining || in unmarshal_key_value_pairs()
/drivers/media/dvb-frontends/
Dsi2168.c417 int ret, len, remaining; in si2168_init() local
486 for (remaining = fw->size; remaining > 0; remaining -= 17) { in si2168_init()
487 len = fw->data[fw->size - remaining]; in si2168_init()
492 memcpy(cmd.args, &fw->data[(fw->size - remaining) + 1], len); in si2168_init()
501 for (remaining = fw->size; remaining > 0; remaining -= 8) { in si2168_init()
503 memcpy(cmd.args, &fw->data[fw->size - remaining], len); in si2168_init()
/drivers/usb/c67x00/
Dc67x00-sched.c661 int remaining; in c67x00_add_data_urb() local
670 remaining = urb->transfer_buffer_length - urb->actual_length; in c67x00_add_data_urb()
675 usb_pipeout(urb->pipe) && !(remaining % maxps); in c67x00_add_data_urb()
677 while (remaining || need_empty) { in c67x00_add_data_urb()
681 len = (remaining > maxps) ? maxps : remaining; in c67x00_add_data_urb()
687 remaining; in c67x00_add_data_urb()
694 remaining -= len; in c67x00_add_data_urb()
873 int maxps, need_empty, remaining; in c67x00_end_of_data() local
887 remaining = urb->transfer_buffer_length - urb->actual_length; in c67x00_end_of_data()
889 usb_pipeout(urb->pipe) && !(remaining % maxps); in c67x00_end_of_data()
[all …]

1234