Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 262) sorted by relevance

1234567891011

/linux/drivers/comedi/
H A Dcomedi_buf.c277 unsigned int nbytes) in _comedi_buf_write_alloc() argument
282 if (nbytes > unalloc) in _comedi_buf_write_alloc()
283 nbytes = unalloc; in _comedi_buf_write_alloc()
285 async->buf_write_alloc_count += nbytes; in _comedi_buf_write_alloc()
293 return nbytes; in _comedi_buf_write_alloc()
308 unsigned int nbytes) in comedi_buf_write_alloc() argument
311 nbytes = _comedi_buf_write_alloc(s, nbytes); in comedi_buf_write_alloc()
314 nbytes = 0; in comedi_buf_write_alloc()
316 return nbytes; in comedi_buf_write_alloc()
378 unsigned int nbytes) in _comedi_buf_write_free() argument
[all …]
/linux/drivers/media/test-drivers/vidtv/
H A Dvidtv_pes.c83 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_pts_dts() local
123 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_pts_dts()
124 args->dest_offset + nbytes, in vidtv_pes_write_pts_dts()
129 return nbytes; in vidtv_pes_write_pts_dts()
134 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_h() local
159 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h()
160 args->dest_offset + nbytes, in vidtv_pes_write_h()
166 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h()
167 args->dest_offset + nbytes, in vidtv_pes_write_h()
174 pts_dts_args.dest_offset = args->dest_offset + nbytes; in vidtv_pes_write_h()
[all …]
/linux/crypto/
H A Dscatterwalk.c18 void scatterwalk_skip(struct scatter_walk *walk, unsigned int nbytes) in scatterwalk_skip() argument
22 nbytes += walk->offset - sg->offset; in scatterwalk_skip()
24 while (nbytes > sg->length) { in scatterwalk_skip()
25 nbytes -= sg->length; in scatterwalk_skip()
29 walk->offset = sg->offset + nbytes; in scatterwalk_skip()
34 unsigned int nbytes) in memcpy_from_scatterwalk() argument
39 to_copy = scatterwalk_next(walk, nbytes); in memcpy_from_scatterwalk()
43 nbytes -= to_copy; in memcpy_from_scatterwalk()
44 } while (nbytes); in memcpy_from_scatterwalk()
49 unsigned int nbytes) in memcpy_to_scatterwalk() argument
[all …]
H A Dchacha.c60 while (walk.nbytes > 0) { in chacha_stream_xor()
61 unsigned int nbytes = walk.nbytes; in chacha_stream_xor() local
63 if (nbytes < walk.total) in chacha_stream_xor()
64 nbytes = round_down(nbytes, CHACHA_BLOCK_SIZE); in chacha_stream_xor()
67 nbytes, ctx->nrounds); in chacha_stream_xor()
68 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in chacha_stream_xor()
/linux/include/crypto/
H A Dscatterwalk.h53 unsigned int nbytes) in scatterwalk_clamp() argument
80 return min3(nbytes, len_this_sg, limit); in scatterwalk_clamp()
144 unsigned int nbytes = scatterwalk_clamp(walk, total); in scatterwalk_next() local
147 return nbytes; in scatterwalk_next()
157 unsigned int nbytes) in scatterwalk_advance() argument
159 walk->offset += nbytes; in scatterwalk_advance()
171 unsigned int nbytes) in scatterwalk_done_src() argument
174 scatterwalk_advance(walk, nbytes); in scatterwalk_done_src()
187 unsigned int nbytes) in __scatterwalk_flush_dcache_pages() argument
198 num_pages = nbytes / PAGE_SIZE; in __scatterwalk_flush_dcache_pages()
[all …]
/linux/arch/arm64/crypto/
H A Dsm4-neon-glue.c39 unsigned int nbytes; in sm4_ecb_do_crypt() local
44 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt()
49 nblocks = nbytes / SM4_BLOCK_SIZE; in sm4_ecb_do_crypt()
55 err = skcipher_walk_done(&walk, nbytes % SM4_BLOCK_SIZE); in sm4_ecb_do_crypt()
82 unsigned int nbytes; in sm4_cbc_encrypt() local
87 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt()
92 while (nbytes >= SM4_BLOCK_SIZE) { in sm4_cbc_encrypt()
98 nbytes -= SM4_BLOCK_SIZE; in sm4_cbc_encrypt()
103 err = skcipher_walk_done(&walk, nbytes); in sm4_cbc_encrypt()
114 unsigned int nbytes; in sm4_cbc_decrypt() local
[all …]
H A Daes-neonbs-glue.c97 while (walk.nbytes >= AES_BLOCK_SIZE) { in __ecb_crypt()
98 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in __ecb_crypt()
100 if (walk.nbytes < walk.total) in __ecb_crypt()
108 walk.nbytes - blocks * AES_BLOCK_SIZE); in __ecb_crypt()
159 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_encrypt()
160 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_encrypt()
168 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt()
182 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_decrypt()
183 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_decrypt()
185 if (walk.nbytes < walk.total) in cbc_decrypt()
[all …]
H A Dsm4-ce-glue.c24 #define BYTES2BLKS(nbytes) ((nbytes) >> 4) argument
36 u8 *iv, unsigned int nbytes);
38 u8 *iv, unsigned int nbytes);
42 u8 *tweak, unsigned int nbytes,
45 u8 *tweak, unsigned int nbytes,
109 unsigned int nbytes; in sm4_ecb_do_crypt() local
114 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt()
120 nblks = BYTES2BLKS(nbytes); in sm4_ecb_do_crypt()
123 nbytes -= nblks * SM4_BLOCK_SIZE; in sm4_ecb_do_crypt()
127 err = skcipher_walk_done(&walk, nbytes); in sm4_ecb_do_crypt()
[all …]
/linux/drivers/spi/
H A Dspi-mem.c45 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data()
58 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes, in spi_controller_dma_map_mem_op_data()
91 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data()
151 if (op->addr.nbytes && in spi_mem_check_buswidth()
155 if (op->dummy.nbytes && in spi_mem_check_buswidth()
183 if (op->cmd.nbytes != 2) in spi_mem_default_supports_op()
186 if ((op->addr.nbytes % 2) || in spi_mem_default_supports_op()
187 (op->dummy.nbytes % 2) || in spi_mem_default_supports_op()
188 (op->data.nbytes % 2)) { in spi_mem_default_supports_op()
195 if (op->cmd.nbytes != 1) in spi_mem_default_supports_op()
[all …]
H A Dspi-wpcm-fiu.c78 static void wpcm_fiu_set_data(struct wpcm_fiu_spi *fiu, const u8 *data, unsigned int nbytes) in wpcm_fiu_set_data() argument
82 for (i = 0; i < nbytes; i++) in wpcm_fiu_set_data()
86 static void wpcm_fiu_get_data(struct wpcm_fiu_spi *fiu, u8 *data, unsigned int nbytes) in wpcm_fiu_get_data() argument
90 for (i = 0; i < nbytes; i++) in wpcm_fiu_get_data()
146 return (op->addr.nbytes == 0 || op->addr.nbytes == 3) && in wpcm_fiu_normal_match()
147 op->dummy.nbytes == 0 && op->data.nbytes <= 4; in wpcm_fiu_normal_match()
158 wpcm_fiu_set_data(fiu, op->data.buf.out, op->data.nbytes); in wpcm_fiu_normal_exec()
160 ret = wpcm_fiu_do_uma(fiu, spi_get_chipselect(mem->spi, 0), op->addr.nbytes == 3, in wpcm_fiu_normal_exec()
161 op->data.dir == SPI_MEM_DATA_OUT, op->data.nbytes); in wpcm_fiu_normal_exec()
164 wpcm_fiu_get_data(fiu, op->data.buf.in, op->data.nbytes); in wpcm_fiu_normal_exec()
[all …]
H A Dspi-axiado.c572 op->data.nbytes); in ax_spi_mem_exec_op()
576 (op->addr.nbytes && op->addr.buswidth != 0 && in ax_spi_mem_exec_op()
578 (op->dummy.nbytes && op->dummy.buswidth != 0 && in ax_spi_mem_exec_op()
580 (op->data.nbytes && op->data.buswidth != 1)) { in ax_spi_mem_exec_op()
592 if (op->cmd.nbytes == 2) { in ax_spi_mem_exec_op()
600 if (op->addr.nbytes) { in ax_spi_mem_exec_op()
601 for (i = op->addr.nbytes - 1; i >= 0; i--) { in ax_spi_mem_exec_op()
618 for (i = 0; i < op->dummy.nbytes; i++) in ax_spi_mem_exec_op()
620 for (i = 0; i < op->data.nbytes; i++) in ax_spi_mem_exec_op()
623 for (i = 0; i < op->data.nbytes; i++) in ax_spi_mem_exec_op()
[all …]
H A Dspi-atcspi200.c151 int trans_bytes = op->data.nbytes; in atcspi_xfer_data_poll()
191 if (op->cmd.nbytes) in atcspi_set_trans_ctl()
193 if (op->addr.nbytes) in atcspi_set_trans_ctl()
197 if (op->data.nbytes) { in atcspi_set_trans_ctl()
208 if (op->dummy.nbytes) in atcspi_set_trans_ctl()
210 TRANS_DUMMY_CNT(op->dummy.nbytes); in atcspi_set_trans_ctl()
213 tc |= TRANS_RD_TRANS_CNT(op->data.nbytes); in atcspi_set_trans_ctl()
216 TRANS_WR_TRANS_CNT(op->data.nbytes); in atcspi_set_trans_ctl()
230 if (op->data.nbytes) { in atcspi_set_trans_fmt()
232 !(op->data.nbytes % 4)) { in atcspi_set_trans_fmt()
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dpio_copy.c184 unsigned int nbytes) in read_low_bytes() argument
187 jcopy(&pbuf->carry.val8[0], from, nbytes); in read_low_bytes()
188 pbuf->carry_bytes = nbytes; in read_low_bytes()
200 const void *from, unsigned int nbytes) in read_extra_bytes() argument
202 jcopy(&pbuf->carry.val8[pbuf->carry_bytes], from, nbytes); in read_extra_bytes()
203 pbuf->carry_bytes += nbytes; in read_extra_bytes()
263 const void *from, size_t nbytes) in seg_pio_copy_start() argument
273 dend = dest + ((nbytes >> 3) * sizeof(u64)); in seg_pio_copy_start()
338 read_low_bytes(pbuf, from, nbytes & 0x7); in seg_pio_copy_start()
340 pbuf->qw_written = 1 /*PBC*/ + (nbytes >> 3); in seg_pio_copy_start()
[all …]
/linux/arch/x86/crypto/
H A Daria_aesni_avx2_glue.c92 unsigned int nbytes; in aria_avx2_ctr_encrypt() local
97 while ((nbytes = walk.nbytes) > 0) { in aria_avx2_ctr_encrypt()
101 while (nbytes >= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE) { in aria_avx2_ctr_encrypt()
109 nbytes -= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE; in aria_avx2_ctr_encrypt()
112 while (nbytes >= ARIA_AESNI_PARALLEL_BLOCK_SIZE) { in aria_avx2_ctr_encrypt()
120 nbytes -= ARIA_AESNI_PARALLEL_BLOCK_SIZE; in aria_avx2_ctr_encrypt()
123 while (nbytes >= ARIA_BLOCK_SIZE) { in aria_avx2_ctr_encrypt()
134 nbytes -= ARIA_BLOCK_SIZE; in aria_avx2_ctr_encrypt()
137 if (walk.nbytes == walk.total && nbytes > 0) { in aria_avx2_ctr_encrypt()
146 nbytes); in aria_avx2_ctr_encrypt()
[all …]
H A Daria_aesni_avx_glue.c90 unsigned int nbytes; in aria_avx_ctr_encrypt() local
95 while ((nbytes = walk.nbytes) > 0) { in aria_avx_ctr_encrypt()
99 while (nbytes >= ARIA_AESNI_PARALLEL_BLOCK_SIZE) { in aria_avx_ctr_encrypt()
107 nbytes -= ARIA_AESNI_PARALLEL_BLOCK_SIZE; in aria_avx_ctr_encrypt()
110 while (nbytes >= ARIA_BLOCK_SIZE) { in aria_avx_ctr_encrypt()
121 nbytes -= ARIA_BLOCK_SIZE; in aria_avx_ctr_encrypt()
124 if (walk.nbytes == walk.total && nbytes > 0) { in aria_avx_ctr_encrypt()
133 nbytes); in aria_avx_ctr_encrypt()
134 dst += nbytes; in aria_avx_ctr_encrypt()
135 src += nbytes; in aria_avx_ctr_encrypt()
[all …]
H A Decb_cbc_helpers.h20 while (walk.nbytes > 0) { \
21 unsigned int nbytes = walk.nbytes; \
23 nbytes >= __fpu_blocks * __bsize; \
35 nbytes -= (blocks) * __bsize; \
44 while (nbytes >= __blocks * __bsize) { \
52 while (nbytes >= __bsize) { \
67 while (nbytes >= __blocks * __bsize) { \
80 err = skcipher_walk_done(&walk, nbytes); \
/linux/fs/coda/
H A Dpsdev.c92 size_t nbytes, loff_t *off) in coda_psdev_write() argument
103 if (nbytes < (2 * sizeof(u_int32_t))) in coda_psdev_write()
114 if ( nbytes < sizeof(struct coda_out_hdr) ) { in coda_psdev_write()
117 count = nbytes; in coda_psdev_write()
120 if ( nbytes > size ) { in coda_psdev_write()
123 nbytes = size; in coda_psdev_write()
126 dcbuf = vmemdup_user(buf, nbytes); in coda_psdev_write()
133 error = coda_downcall(vcp, hdr.opcode, dcbuf, nbytes); in coda_psdev_write()
142 count = nbytes; in coda_psdev_write()
166 if (req->uc_outSize < nbytes) { in coda_psdev_write()
[all …]
/linux/drivers/crypto/
H A Dpadlock-aes.c349 unsigned int nbytes; in ecb_aes_encrypt() local
356 while ((nbytes = walk.nbytes) != 0) { in ecb_aes_encrypt()
359 nbytes / AES_BLOCK_SIZE); in ecb_aes_encrypt()
360 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_encrypt()
361 err = skcipher_walk_done(&walk, nbytes); in ecb_aes_encrypt()
374 unsigned int nbytes; in ecb_aes_decrypt() local
381 while ((nbytes = walk.nbytes) != 0) { in ecb_aes_decrypt()
384 nbytes / AES_BLOCK_SIZE); in ecb_aes_decrypt()
385 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_decrypt()
386 err = skcipher_walk_done(&walk, nbytes); in ecb_aes_decrypt()
[all …]
/linux/drivers/pci/hotplug/
H A Drpadlpar_sysfs.c28 const char *buf, size_t nbytes) in add_slot_store() argument
34 if (nbytes >= MAX_DRC_NAME_LEN) in add_slot_store()
37 strscpy(drc_name, buf, nbytes + 1); in add_slot_store()
47 return nbytes; in add_slot_store()
58 const char *buf, size_t nbytes) in remove_slot_store() argument
64 if (nbytes >= MAX_DRC_NAME_LEN) in remove_slot_store()
67 strscpy(drc_name, buf, nbytes + 1); in remove_slot_store()
77 return nbytes; in remove_slot_store()
/linux/lib/crypto/
H A Dpoly1305.c38 const u8 *src, unsigned int nbytes) in poly1305_update() argument
40 if (desc->buflen + nbytes >= POLY1305_BLOCK_SIZE) { in poly1305_update()
48 nbytes -= l; in poly1305_update()
55 bulk_len = round_down(nbytes, POLY1305_BLOCK_SIZE); in poly1305_update()
56 nbytes %= POLY1305_BLOCK_SIZE; in poly1305_update()
63 if (nbytes) { in poly1305_update()
64 memcpy(&desc->buf[desc->buflen], src, nbytes); in poly1305_update()
65 desc->buflen += nbytes; in poly1305_update()
/linux/fs/
H A Dsync.c224 int sync_file_range(struct file *file, loff_t offset, loff_t nbytes, in sync_file_range() argument
236 endbyte = offset + nbytes; in sync_file_range()
258 nbytes = 0; in sync_file_range()
262 if (nbytes == 0) in sync_file_range()
349 int ksys_sync_file_range(int fd, loff_t offset, loff_t nbytes, in ksys_sync_file_range() argument
357 return sync_file_range(fd_file(f), offset, nbytes, flags); in ksys_sync_file_range()
360 SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, in SYSCALL_DEFINE4() argument
363 return ksys_sync_file_range(fd, offset, nbytes, flags); in SYSCALL_DEFINE4()
368 compat_arg_u64_dual(nbytes), unsigned int, flags) in COMPAT_SYSCALL_DEFINE6() argument
371 compat_arg_u64_glue(nbytes), flags); in COMPAT_SYSCALL_DEFINE6()
[all …]
/linux/drivers/zorro/
H A Dproc.c31 proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) in proc_bus_zorro_read() argument
39 if (nbytes >= sizeof(struct ConfigDev)) in proc_bus_zorro_read()
40 nbytes = sizeof(struct ConfigDev); in proc_bus_zorro_read()
41 if (pos + nbytes > sizeof(struct ConfigDev)) in proc_bus_zorro_read()
42 nbytes = sizeof(struct ConfigDev) - pos; in proc_bus_zorro_read()
52 if (copy_to_user(buf, (void *)&cd + pos, nbytes)) in proc_bus_zorro_read()
54 *ppos += nbytes; in proc_bus_zorro_read()
56 return nbytes; in proc_bus_zorro_read()
/linux/drivers/pnp/isapnp/
H A Dproc.c23 size_t nbytes, loff_t * ppos) in isapnp_proc_bus_read() argument
31 if (nbytes >= size) in isapnp_proc_bus_read()
32 nbytes = size; in isapnp_proc_bus_read()
33 if (pos + nbytes > size) in isapnp_proc_bus_read()
34 nbytes = size - pos; in isapnp_proc_bus_read()
35 cnt = nbytes; in isapnp_proc_bus_read()
49 return nbytes; in isapnp_proc_bus_read()
/linux/tools/usb/
H A Dffs-test.c336 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes);
337 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes);
338 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes);
339 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes);
340 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes);
483 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes) in read_wrap() argument
485 return read(t->fd, buf, nbytes); in read_wrap()
488 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes) in write_wrap() argument
490 return write(t->fd, buf, nbytes); in write_wrap()
501 fill_in_buf(struct thread *ignore, void *buf, size_t nbytes) in fill_in_buf() argument
[all …]
/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-hash.c206 op->byte_count, areq->nbytes, op->mode, in sun4i_hash()
209 if (unlikely(!areq->nbytes) && !(op->flags & SS_HASH_FINAL)) in sun4i_hash()
213 if (unlikely(areq->nbytes > UINT_MAX - op->len)) { in sun4i_hash()
218 if (op->len + areq->nbytes < 64 && !(op->flags & SS_HASH_FINAL)) { in sun4i_hash()
221 op->buf + op->len, areq->nbytes, 0); in sun4i_hash()
245 end = ((areq->nbytes + op->len) / 64) * 64 - op->len; in sun4i_hash()
247 if (end > areq->nbytes || areq->nbytes - end > 63) { in sun4i_hash()
249 end, areq->nbytes); in sun4i_hash()
255 if (areq->nbytes < 4) in sun4i_hash()
258 end = ((areq->nbytes + op->len) / 4) * 4 - op->len; in sun4i_hash()
[all …]

1234567891011