Home
last modified time | relevance | path

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

12345678910>>...13

/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_ts.c53 u32 nbytes = 0; in vidtv_ts_null_write_into() local
62 nbytes += vidtv_memcpy(args.dest_buf, in vidtv_ts_null_write_into()
63 args.dest_offset + nbytes, in vidtv_ts_null_write_into()
71 nbytes += vidtv_memset(args.dest_buf, in vidtv_ts_null_write_into()
72 args.dest_offset + nbytes, in vidtv_ts_null_write_into()
75 TS_PACKET_LEN - nbytes); in vidtv_ts_null_write_into()
78 if (nbytes != TS_PACKET_LEN) in vidtv_ts_null_write_into()
81 nbytes); in vidtv_ts_null_write_into()
83 return nbytes; in vidtv_ts_null_write_into()
88 u32 nbytes = 0; in vidtv_ts_pcr_write_into() local
[all …]
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 …]
H A Dvidtv_psi.c172 u32 nbytes = 0; in vidtv_psi_ts_psi_write_into() local
184 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into()
185 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
192 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into()
199 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into()
200 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
213 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into()
214 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
220 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into()
223 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into()
[all …]
H A Dvidtv_mux.c164 u32 nbytes; in vidtv_mux_push_si() local
214 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_push_si()
218 return nbytes; in vidtv_mux_push_si()
225 u32 nbytes = 0; in vidtv_mux_push_pcr() local
236 nbytes += vidtv_ts_pcr_write_into(args); in vidtv_mux_push_pcr()
237 m->mux_buf_offset += nbytes; in vidtv_mux_push_pcr()
241 return nbytes; in vidtv_mux_push_pcr()
287 u32 nbytes = 0; in vidtv_mux_packetize_access_units() local
302 args.access_unit_len = au->nbytes; in vidtv_mux_packetize_access_units()
318 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_packetize_access_units()
[all …]
/linux/lib/crypto/mpi/
H A Dmpicoder.c36 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes) in mpi_read_raw_data() argument
44 while (nbytes > 0 && buffer[0] == 0) { in mpi_read_raw_data()
46 nbytes--; in mpi_read_raw_data()
49 nbits = nbytes * 8; in mpi_read_raw_data()
54 if (nbytes > 0) in mpi_read_raw_data()
57 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data()
65 if (nbytes > 0) { in mpi_read_raw_data()
66 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; in mpi_read_raw_data()
85 unsigned int nbits, nbytes; in mpi_read_from_buffer() local
97 nbytes = DIV_ROUND_UP(nbits, 8); in mpi_read_from_buffer()
[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 …]
/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.c105 while (walk.nbytes >= AES_BLOCK_SIZE) { in __ecb_crypt()
106 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in __ecb_crypt()
108 if (walk.nbytes < walk.total) in __ecb_crypt()
116 walk.nbytes - blocks * AES_BLOCK_SIZE); in __ecb_crypt()
163 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_encrypt()
164 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_encrypt()
172 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt()
186 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_decrypt()
187 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_decrypt()
189 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 …]
/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/arch/s390/crypto/
H A Ddes_s390.c94 unsigned int nbytes, n; in ecb_desall_crypt() local
98 while ((nbytes = walk.nbytes) != 0) { in ecb_desall_crypt()
100 n = nbytes & ~(DES_BLOCK_SIZE - 1); in ecb_desall_crypt()
103 ret = skcipher_walk_done(&walk, nbytes - n); in ecb_desall_crypt()
113 unsigned int nbytes, n; in cbc_desall_crypt() local
125 while ((nbytes = walk.nbytes) != 0) { in cbc_desall_crypt()
127 n = nbytes & ~(DES_BLOCK_SIZE - 1); in cbc_desall_crypt()
131 ret = skcipher_walk_done(&walk, nbytes - n); in cbc_desall_crypt()
303 static unsigned int __ctrblk_init(u8 *ctrptr, u8 *iv, unsigned int nbytes) in __ctrblk_init() argument
308 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(DES_BLOCK_SIZE - 1); in __ctrblk_init()
[all …]
/linux/drivers/memory/
H A Drenesas-rpc-if.c343 static u8 rpcif_bits_set(struct rpcif_priv *rpc, u32 nbytes) in rpcif_bits_set() argument
346 nbytes /= 2; in rpcif_bits_set()
347 nbytes = clamp(nbytes, 1U, 4U); in rpcif_bits_set()
348 return GENMASK(3, 4 - nbytes); in rpcif_bits_set()
384 if (op->addr.nbytes == 4) in rpcif_prepare_impl()
388 2, 3 - op->addr.nbytes)); in rpcif_prepare_impl()
405 rpcif_bits_set(rpc, op->option.nbytes)) | in rpcif_prepare_impl()
414 u32 nbytes; in rpcif_prepare_impl() local
431 nbytes = *len; in rpcif_prepare_impl()
433 nbytes = op->data.nbytes; in rpcif_prepare_impl()
[all …]
/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()

12345678910>>...13