Home
last modified time | relevance | path

Searched refs:todo (Results 1 – 25 of 146) sorted by relevance

123456

/OK3568_Linux_fs/kernel/drivers/media/dvb-core/
H A Ddvb_ringbuffer.c135 size_t todo = len; in dvb_ringbuffer_read_user() local
143 todo -= split; in dvb_ringbuffer_read_user()
150 if (copy_to_user(buf, rbuf->data+rbuf->pread, todo)) in dvb_ringbuffer_read_user()
154 smp_store_release(&rbuf->pread, (rbuf->pread + todo) % rbuf->size); in dvb_ringbuffer_read_user()
161 size_t todo = len; in dvb_ringbuffer_read() local
168 todo -= split; in dvb_ringbuffer_read()
175 memcpy(buf, rbuf->data+rbuf->pread, todo); in dvb_ringbuffer_read()
178 smp_store_release(&rbuf->pread, (rbuf->pread + todo) % rbuf->size); in dvb_ringbuffer_read()
184 size_t todo = len; in dvb_ringbuffer_write() local
192 todo -= split; in dvb_ringbuffer_write()
[all …]
H A Ddvb_vb2.c263 int todo = len; in dvb_vb2_fill_buffer() local
278 while (todo) { in dvb_vb2_fill_buffer()
300 ll = min(todo, ctx->remain); in dvb_vb2_fill_buffer()
303 todo -= ll; in dvb_vb2_fill_buffer()
324 if (todo) in dvb_vb2_fill_buffer()
325 dprintk(1, "[%s] %d bytes are dropped.\n", ctx->name, todo); in dvb_vb2_fill_buffer()
329 dprintk(3, "[%s] %d bytes are copied\n", ctx->name, len - todo); in dvb_vb2_fill_buffer()
330 return (len - todo); in dvb_vb2_fill_buffer()
/OK3568_Linux_fs/kernel/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c33 unsigned int todo; in sun4i_ss_opti_poll() local
85 todo = min(rx_cnt, ileft); in sun4i_ss_opti_poll()
86 todo = min_t(size_t, todo, (mi.length - oi) / 4); in sun4i_ss_opti_poll()
87 if (todo) { in sun4i_ss_opti_poll()
88 ileft -= todo; in sun4i_ss_opti_poll()
89 writesl(ss->base + SS_RXFIFO, mi.addr + oi, todo); in sun4i_ss_opti_poll()
90 oi += todo * 4; in sun4i_ss_opti_poll()
113 todo = min(tx_cnt, oleft); in sun4i_ss_opti_poll()
114 todo = min_t(size_t, todo, (mo.length - oo) / 4); in sun4i_ss_opti_poll()
115 if (todo) { in sun4i_ss_opti_poll()
[all …]
H A Dsun4i-ss-prng.c26 unsigned int todo = (dlen / 4) * 4; in sun4i_ss_prng_generate() local
39 while (todo > 0) { in sun4i_ss_prng_generate()
45 len = min_t(size_t, SS_DATA_LEN / BITS_PER_BYTE, todo); in sun4i_ss_prng_generate()
48 todo -= len; in sun4i_ss_prng_generate()
/OK3568_Linux_fs/kernel/drivers/crypto/allwinner/sun8i-ce/
H A Dsun8i-ce-trng.c29 unsigned int todo; in sun8i_ce_trng_read() local
38 todo = max + 32; in sun8i_ce_trng_read()
39 todo -= todo % 32; in sun8i_ce_trng_read()
41 d = kzalloc(todo, GFP_KERNEL | GFP_DMA); in sun8i_ce_trng_read()
47 ce->hwrng_stat_bytes += todo; in sun8i_ce_trng_read()
50 dma_dst = dma_map_single(ce->dev, d, todo, DMA_FROM_DEVICE); in sun8i_ce_trng_read()
75 cet->t_dlen = cpu_to_le32(todo); in sun8i_ce_trng_read()
77 cet->t_dlen = cpu_to_le32(todo / 4); in sun8i_ce_trng_read()
83 cet->t_dst[0].len = cpu_to_le32(todo / 4); in sun8i_ce_trng_read()
84 ce->chanlist[flow].timeout = todo; in sun8i_ce_trng_read()
[all …]
H A Dsun8i-ce-prng.c67 unsigned int todo; in sun8i_ce_prng_generate() local
82 todo = dlen + ctx->slen + PRNG_DATA_SIZE * 2; in sun8i_ce_prng_generate()
83 todo -= todo % PRNG_DATA_SIZE; in sun8i_ce_prng_generate()
85 d = kzalloc(todo, GFP_KERNEL | GFP_DMA); in sun8i_ce_prng_generate()
92 slen, dlen, todo, todo / PRNG_DATA_SIZE); in sun8i_ce_prng_generate()
96 algt->stat_bytes += todo; in sun8i_ce_prng_generate()
105 dma_dst = dma_map_single(ce->dev, d, todo, DMA_FROM_DEVICE); in sun8i_ce_prng_generate()
130 cet->t_dlen = cpu_to_le32(todo); in sun8i_ce_prng_generate()
132 cet->t_dlen = cpu_to_le32(todo / 4); in sun8i_ce_prng_generate()
142 cet->t_dst[0].len = cpu_to_le32(todo / 4); in sun8i_ce_prng_generate()
[all …]
H A Dsun8i-ce-cipher.c91 unsigned int todo, len, offset, ivsize; in sun8i_ce_cipher_prepare() local
210 todo = min(len, sg_dma_len(sg)); in sun8i_ce_cipher_prepare()
211 cet->t_src[i].len = cpu_to_le32(todo / 4); in sun8i_ce_cipher_prepare()
213 areq->cryptlen, i, cet->t_src[i].len, sg->offset, todo); in sun8i_ce_cipher_prepare()
214 len -= todo; in sun8i_ce_cipher_prepare()
225 todo = min(len, sg_dma_len(sg)); in sun8i_ce_cipher_prepare()
226 cet->t_dst[i].len = cpu_to_le32(todo / 4); in sun8i_ce_cipher_prepare()
228 areq->cryptlen, i, cet->t_dst[i].len, sg->offset, todo); in sun8i_ce_cipher_prepare()
229 len -= todo; in sun8i_ce_cipher_prepare()
/OK3568_Linux_fs/kernel/drivers/platform/chrome/
H A Dcros_ec_spi.c198 int todo; in cros_ec_spi_receive_packet() local
239 todo = end - ++ptr; in cros_ec_spi_receive_packet()
240 BUG_ON(todo < 0 || todo > ec_dev->din_size); in cros_ec_spi_receive_packet()
241 todo = min(todo, need_len); in cros_ec_spi_receive_packet()
242 memmove(ec_dev->din, ptr, todo); in cros_ec_spi_receive_packet()
243 ptr = ec_dev->din + todo; in cros_ec_spi_receive_packet()
245 need_len, todo); in cros_ec_spi_receive_packet()
246 need_len -= todo; in cros_ec_spi_receive_packet()
249 if (todo < sizeof(*response)) { in cros_ec_spi_receive_packet()
250 ret = receive_n_bytes(ec_dev, ptr, sizeof(*response) - todo); in cros_ec_spi_receive_packet()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-prng.c65 unsigned int todo; in sun8i_ss_prng_generate() local
83 todo = dlen + PRNG_SEED_SIZE + PRNG_DATA_SIZE; in sun8i_ss_prng_generate()
84 todo -= todo % PRNG_DATA_SIZE; in sun8i_ss_prng_generate()
86 d = kzalloc(todo, GFP_KERNEL | GFP_DMA); in sun8i_ss_prng_generate()
94 algt->stat_bytes += todo; in sun8i_ss_prng_generate()
110 dma_dst = dma_map_single(ss->dev, d, todo, DMA_FROM_DEVICE); in sun8i_ss_prng_generate()
129 writel(todo / 4, ss->base + SS_LEN_ADR_REG); in sun8i_ss_prng_generate()
139 msecs_to_jiffies(todo)); in sun8i_ss_prng_generate()
141 dev_err(ss->dev, "DMA timeout for PRNG (size=%u)\n", todo); in sun8i_ss_prng_generate()
161 dma_unmap_single(ss->dev, dma_dst, todo, DMA_FROM_DEVICE); in sun8i_ss_prng_generate()
[all …]
H A Dsun8i-ss-cipher.c103 unsigned int todo, offset; in sun8i_ss_setup_ivs() local
137 todo = min(len, sg_dma_len(sg)); in sun8i_ss_setup_ivs()
138 len -= todo; in sun8i_ss_setup_ivs()
169 unsigned int todo, len, offset, ivsize; in sun8i_ss_cipher() local
237 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher()
238 rctx->t_src[i].len = todo / 4; in sun8i_ss_cipher()
240 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sun8i_ss_cipher()
241 len -= todo; in sun8i_ss_cipher()
259 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher()
260 rctx->t_dst[i].len = todo / 4; in sun8i_ss_cipher()
[all …]
/OK3568_Linux_fs/kernel/kernel/power/
H A Dprocess.c37 unsigned int todo; in try_to_freeze_tasks() local
52 todo = 0; in try_to_freeze_tasks()
59 todo++; in try_to_freeze_tasks()
65 todo += wq_busy; in try_to_freeze_tasks()
68 if (!todo || time_after(jiffies, end_time)) in try_to_freeze_tasks()
94 } else if (todo) { in try_to_freeze_tasks()
99 todo - wq_busy, wq_busy); in try_to_freeze_tasks()
116 trace_android_vh_try_to_freeze_todo(todo, elapsed_msecs, wq_busy); in try_to_freeze_tasks()
122 return todo ? -EBUSY : 0; in try_to_freeze_tasks()
/OK3568_Linux_fs/buildroot/dl/sox/git/src/
H A Dsndio.c180 size_t todo, n; in readsamples() local
183 todo = len * p->par.bps; in readsamples()
185 while (todo > 0) { in readsamples()
188 if (cc > todo) in readsamples()
189 cc = todo; in readsamples()
199 todo -= n; in readsamples()
201 return len - todo / p->par.bps; in readsamples()
208 size_t n, todo; in writesamples() local
210 todo = len; in writesamples()
212 while (todo > 0) { in writesamples()
[all …]
/OK3568_Linux_fs/kernel/drivers/usb/gadget/udc/
H A Dmax3420_udc.c165 u32 todo; member
184 u32 todo; member
321 int todo; in spi_max3420_enable() local
324 todo = ep->todo & ENABLE_EP; in spi_max3420_enable()
325 ep->todo &= ~ENABLE_EP; in spi_max3420_enable()
328 if (!todo || ep->id == 0) in spi_max3420_enable()
334 if (todo == ENABLE) { in spi_max3420_enable()
353 int todo; in spi_max3420_stall() local
356 todo = ep->todo & STALL_EP; in spi_max3420_stall()
357 ep->todo &= ~STALL_EP; in spi_max3420_stall()
[all …]
/OK3568_Linux_fs/kernel/arch/powerpc/platforms/powernv/
H A Dopal-lpc.c188 u32 data, pos, len, todo; in lpc_debug_read() local
194 todo = count; in lpc_debug_read()
195 while (todo) { in lpc_debug_read()
205 if (todo > 3 && (pos & 3) == 0) in lpc_debug_read()
207 else if (todo > 1 && (pos & 1) == 0) in lpc_debug_read()
269 todo -= len; in lpc_debug_read()
279 u32 data, pos, len, todo; in lpc_debug_write() local
285 todo = count; in lpc_debug_write()
286 while (todo) { in lpc_debug_write()
296 if (todo > 3 && (pos & 3) == 0) in lpc_debug_write()
[all …]
/OK3568_Linux_fs/kernel/drivers/media/pci/tw68/
H A Dtw68-risc.c39 unsigned int line, todo, done; in tw68_risc_field() local
74 todo = bpl; /* one full line to be done */ in tw68_risc_field()
81 todo -= done; in tw68_risc_field()
84 while (todo > sg_dma_len(sg)) { in tw68_risc_field()
89 todo -= sg_dma_len(sg); in tw68_risc_field()
93 if (todo) { in tw68_risc_field()
97 todo); in tw68_risc_field()
100 offset = todo; in tw68_risc_field()
/OK3568_Linux_fs/u-boot/arch/arm/mach-exynos/
H A Dspl_boot.c65 static void spi_rx_tx(struct exynos_spi *regs, int todo, in spi_rx_tx() argument
72 out_bytes = todo; in spi_rx_tx()
73 in_bytes = todo; in spi_rx_tx()
76 writel(((todo * 8) / 32) | SPI_PACKET_CNT_EN, &regs->pkt_cnt); in spi_rx_tx()
109 int upto, todo; in exynos_spi_copy() local
153 for (upto = 0, i = 0; upto < uboot_size; upto += todo, i++) { in exynos_spi_copy()
154 todo = min(uboot_size - upto, (unsigned int)(1 << 15)); in exynos_spi_copy()
155 spi_rx_tx(regs, todo, (void *)(uboot_addr), in exynos_spi_copy()
/OK3568_Linux_fs/kernel/drivers/media/pci/ttpci/
H A Dav7110_av.c387 unsigned long todo = count; in aux_ring_buffer_write() local
390 while (todo > 0) { in aux_ring_buffer_write()
394 return count - todo; in aux_ring_buffer_write()
397 if (free > todo) in aux_ring_buffer_write()
398 free = todo; in aux_ring_buffer_write()
400 todo -= free; in aux_ring_buffer_write()
404 return count - todo; in aux_ring_buffer_write()
435 unsigned long todo = count; in ts_play() local
448 while (todo >= TS_SIZE) { in ts_play()
451 return count - todo; in ts_play()
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/msm/dp/
H A Ddp_display.c132 struct dp_event *todo; in dp_add_event() local
144 todo = &dp_priv->event_list[dp_priv->event_pndx++]; in dp_add_event()
146 todo->event_id = event; in dp_add_event()
147 todo->data = data; in dp_add_event()
148 todo->delay = delay; in dp_add_event()
158 struct dp_event *todo; in dp_del_event() local
169 todo = &dp_priv->event_list[gndx]; in dp_del_event()
170 if (todo->event_id == event) { in dp_del_event()
171 todo->event_id = EV_NO_EVENT; /* deleted */ in dp_del_event()
172 todo->delay = 0; in dp_del_event()
[all …]
/OK3568_Linux_fs/u-boot/drivers/spi/
H A Dexynos_spi.c96 static int spi_rx_tx(struct exynos_spi_priv *priv, int todo, in spi_rx_tx() argument
109 out_bytes = in_bytes = todo; in spi_rx_tx()
119 if (!((todo | (uintptr_t)rxp | (uintptr_t)txp) & 3) && in spi_rx_tx()
127 spi_request_bytes(regs, todo, step); in spi_rx_tx()
327 int upto, todo; in exynos_spi_xfer() local
347 for (upto = 0; !ret && upto < bytelen; upto += todo) { in exynos_spi_xfer()
348 todo = min(bytelen - upto, (1 << 16) - 4); in exynos_spi_xfer()
349 ret = spi_rx_tx(priv, todo, &din, &dout, flags); in exynos_spi_xfer()
/OK3568_Linux_fs/u-boot/tools/gdb/
H A Dremote.c493 int todo; local
503 todo = min (len, max_buf_size);
508 todo = min (len, max_buf_size / 2); /* num bytes that will fit */
515 p += hexnumstr ((char *)p, (ULONGEST) todo);
526 (i < todo) && (i + escaped) < (max_buf_size - 2);
545 if (i < todo)
560 for (i = 0; i < todo; i++)
/OK3568_Linux_fs/kernel/drivers/w1/slaves/
H A Dw1_ds2430.c102 int todo = count; in eeprom_read() local
111 while (todo > 0) { in eeprom_read()
114 if (todo >= W1_F14_READ_MAXLEN) in eeprom_read()
117 block_read = todo; in eeprom_read()
122 todo -= W1_F14_READ_MAXLEN; in eeprom_read()
H A Dw1_ds2805.c99 int todo = count; in w1_f0d_read_bin() local
108 while (todo > 0) { in w1_f0d_read_bin()
111 if (todo >= W1_F0D_READ_MAXLEN) in w1_f0d_read_bin()
114 block_read = todo; in w1_f0d_read_bin()
121 todo -= W1_F0D_READ_MAXLEN; in w1_f0d_read_bin()
H A Dw1_ds2431.c102 int todo = count; in eeprom_read() local
111 while (todo > 0) { in eeprom_read()
114 if (todo >= W1_F2D_READ_MAXLEN) in eeprom_read()
117 block_read = todo; in eeprom_read()
122 todo -= W1_F2D_READ_MAXLEN; in eeprom_read()
/OK3568_Linux_fs/kernel/drivers/firewire/
H A Dcore-cdev.c129 ISO_RES_ALLOC_ONCE, ISO_RES_DEALLOC_ONCE,} todo; member
1238 int generation, channel, bandwidth, todo; in iso_resource_work() local
1243 todo = r->todo; in iso_resource_work()
1245 if (todo == ISO_RES_ALLOC && in iso_resource_work()
1252 skip = todo == ISO_RES_REALLOC && in iso_resource_work()
1255 free = todo == ISO_RES_DEALLOC || in iso_resource_work()
1256 todo == ISO_RES_ALLOC_ONCE || in iso_resource_work()
1257 todo == ISO_RES_DEALLOC_ONCE; in iso_resource_work()
1268 todo == ISO_RES_ALLOC || in iso_resource_work()
1269 todo == ISO_RES_REALLOC || in iso_resource_work()
[all …]
/OK3568_Linux_fs/kernel/arch/arm64/crypto/
H A Dchacha-neon-glue.c91 unsigned int todo = min_t(unsigned int, bytes, SZ_4K); in chacha_crypt_arch() local
94 chacha_doneon(state, dst, src, todo, nrounds); in chacha_crypt_arch()
97 bytes -= todo; in chacha_crypt_arch()
98 src += todo; in chacha_crypt_arch()
99 dst += todo; in chacha_crypt_arch()

123456