/drivers/media/dvb-core/ |
D | dvb_ringbuffer.c | 135 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 …]
|
D | dvb_vb2.c | 263 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()
|
D | dmxdev.c | 67 size_t todo; in dvb_dmxdev_buffer_read() local 80 for (todo = count; todo > 0; todo -= ret) { in dvb_dmxdev_buffer_read() 99 if (avail > todo) in dvb_dmxdev_buffer_read() 100 avail = todo; in dvb_dmxdev_buffer_read() 109 return (count - todo) ? (count - todo) : ret; in dvb_dmxdev_buffer_read() 764 filter->todo = 0; in dvb_dmxdev_filter_start() 984 if (dfil->todo <= 0) { in dvb_dmxdev_read_sec() 985 hcount = 3 + dfil->todo; in dvb_dmxdev_read_sec() 992 dfil->todo = 0; in dvb_dmxdev_read_sec() 995 if (copy_from_user(dfil->secheader - dfil->todo, buf, result)) in dvb_dmxdev_read_sec() [all …]
|
/drivers/crypto/allwinner/sun4i-ss/ |
D | sun4i-ss-cipher.c | 33 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 …]
|
D | sun4i-ss-prng.c | 26 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()
|
D | sun4i-ss-hash.c | 189 unsigned int i = 0, end, fill, min_fill, nwait, nbw = 0, j = 0, todo; in sun4i_hash() local 313 todo = min3((u32)(end - i) / 4, rx_cnt, (u32)in_r / 4); in sun4i_hash() 314 writesl(ss->base + SS_RXFIFO, mi.addr + in_i, todo); in sun4i_hash() 315 op->byte_count += todo * 4; in sun4i_hash() 316 i += todo * 4; in sun4i_hash() 317 in_i += todo * 4; in sun4i_hash() 318 rx_cnt -= todo; in sun4i_hash()
|
/drivers/crypto/allwinner/sun8i-ce/ |
D | sun8i-ce-trng.c | 29 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 …]
|
D | sun8i-ce-prng.c | 67 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 …]
|
D | sun8i-ce-cipher.c | 91 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()
|
/drivers/platform/chrome/ |
D | cros_ec_spi.c | 198 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 …]
|
/drivers/crypto/allwinner/sun8i-ss/ |
D | sun8i-ss-prng.c | 65 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 …]
|
D | sun8i-ss-cipher.c | 103 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 …]
|
/drivers/usb/gadget/udc/ |
D | max3420_udc.c | 165 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 …]
|
/drivers/media/pci/tw68/ |
D | tw68-risc.c | 39 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()
|
/drivers/media/pci/ttpci/ |
D | av7110_av.c | 387 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 …]
|
/drivers/gpu/drm/msm/dp/ |
D | dp_display.c | 132 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 …]
|
/drivers/w1/slaves/ |
D | w1_ds2430.c | 102 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()
|
D | w1_ds2431.c | 102 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()
|
D | w1_ds2805.c | 99 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()
|
/drivers/firewire/ |
D | core-cdev.c | 129 ISO_RES_ALLOC_ONCE, ISO_RES_DEALLOC_ONCE,} todo; member 1240 int generation, channel, bandwidth, todo; in iso_resource_work() local 1245 todo = r->todo; in iso_resource_work() 1247 if (todo == ISO_RES_ALLOC && in iso_resource_work() 1254 skip = todo == ISO_RES_REALLOC && in iso_resource_work() 1257 free = todo == ISO_RES_DEALLOC || in iso_resource_work() 1258 todo == ISO_RES_ALLOC_ONCE || in iso_resource_work() 1259 todo == ISO_RES_DEALLOC_ONCE; in iso_resource_work() 1270 todo == ISO_RES_ALLOC || in iso_resource_work() 1271 todo == ISO_RES_REALLOC || in iso_resource_work() [all …]
|
/drivers/gpu/drm/ |
D | drm_dp_aux_dev.c | 159 ssize_t todo = min(iov_iter_count(to), sizeof(buf)); in auxdev_read_iter() local 166 res = drm_dp_dpcd_read(aux_dev->aux, pos, buf, todo); in auxdev_read_iter() 202 ssize_t todo = min(iov_iter_count(from), sizeof(buf)); in auxdev_write_iter() local 209 if (!copy_from_iter_full(buf, todo, from)) { in auxdev_write_iter() 214 res = drm_dp_dpcd_write(aux_dev->aux, pos, buf, todo); in auxdev_write_iter()
|
/drivers/s390/cio/ |
D | ccwreq.c | 174 enum uc_todo todo; in ccwreq_status() local 197 todo = cdev->drv->uc_handler(cdev, lcirb); in ccwreq_status() 199 CIO_HEX_EVENT(2, &todo, sizeof(todo)); in ccwreq_status() 200 switch (todo) { in ccwreq_status()
|
/drivers/media/pci/bt8xx/ |
D | bttv-risc.c | 41 u32 instructions,line,todo; in bttv_risc_packed() local 85 todo = bpl; in bttv_risc_packed() 89 todo -= (sg_dma_len(sg)-offset); in bttv_risc_packed() 92 while (todo > sg_dma_len(sg)) { in bttv_risc_packed() 96 todo -= sg_dma_len(sg); in bttv_risc_packed() 100 todo); in bttv_risc_packed() 102 offset += todo; in bttv_risc_packed() 122 unsigned int instructions,line,todo,ylen,chroma; in bttv_risc_planar() local 174 for (todo = ybpl; todo > 0; todo -= ylen) { in bttv_risc_planar() 182 ylen = todo; in bttv_risc_planar() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
D | gf100.c | 152 u64 mask, todo; in gf100_fifo_recover_work() local 159 for (todo = mask; engn = __ffs64(todo), todo; todo &= ~BIT_ULL(engn)) in gf100_fifo_recover_work() 163 for (todo = mask; engn = __ffs64(todo), todo; todo &= ~BIT_ULL(engn)) { in gf100_fifo_recover_work()
|
/drivers/usb/serial/ |
D | usb_wwan.c | 187 int left, todo; in usb_wwan_write() local 200 todo = left; in usb_wwan_write() 201 if (todo > OUT_BUFLEN) in usb_wwan_write() 202 todo = OUT_BUFLEN; in usb_wwan_write() 222 memcpy(this_urb->transfer_buffer, buf, todo); in usb_wwan_write() 223 this_urb->transfer_buffer_length = todo; in usb_wwan_write() 248 buf += todo; in usb_wwan_write() 249 left -= todo; in usb_wwan_write()
|