| /linux/drivers/comedi/ |
| H A D | comedi_buf.c | 277 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 D | vidtv_pes.c | 83 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 D | scatterwalk.c | 18 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 D | chacha.c | 60 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 D | scatterwalk.h | 53 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 D | sm4-neon-glue.c | 39 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 D | aes-neonbs-glue.c | 97 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 D | sm4-ce-glue.c | 24 #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 D | spi-realtek-rtl-snand.c | 57 if (op->cmd.nbytes != 1 || op->cmd.buswidth != 1) in rtl_snand_supports_op() 91 if (op->addr.nbytes && op->addr.buswidth == 1) { in rtl_snand_xfer_head() 92 val |= op->addr.val << ((3 - op->addr.nbytes) * 8); in rtl_snand_xfer_head() 93 len += op->addr.nbytes; in rtl_snand_xfer_head() 113 val = op->addr.val << ((3 - op->addr.nbytes) * 8); in rtl_snand_xfer_head() 114 len = op->addr.nbytes; in rtl_snand_xfer_head() 130 if (op->dummy.nbytes) { in rtl_snand_xfer_head() 134 CMR_WID(op->dummy.buswidth) | CMR_LEN(op->dummy.nbytes)); in rtl_snand_xfer_head() 157 unsigned int pos, nbytes; in rtl_snand_xfer() local 167 len = op->data.nbytes; in rtl_snand_xfer() [all …]
|
| H A D | spi-wpcm-fiu.c | 77 static void wpcm_fiu_set_data(struct wpcm_fiu_spi *fiu, const u8 *data, unsigned int nbytes) in wpcm_fiu_set_data() argument 81 for (i = 0; i < nbytes; i++) in wpcm_fiu_set_data() 85 static void wpcm_fiu_get_data(struct wpcm_fiu_spi *fiu, u8 *data, unsigned int nbytes) in wpcm_fiu_get_data() argument 89 for (i = 0; i < nbytes; i++) in wpcm_fiu_get_data() 145 return (op->addr.nbytes == 0 || op->addr.nbytes == 3) && in wpcm_fiu_normal_match() 146 op->dummy.nbytes == 0 && op->data.nbytes <= 4; in wpcm_fiu_normal_match() 157 wpcm_fiu_set_data(fiu, op->data.buf.out, op->data.nbytes); in wpcm_fiu_normal_exec() 159 ret = wpcm_fiu_do_uma(fiu, spi_get_chipselect(mem->spi, 0), op->addr.nbytes == 3, in wpcm_fiu_normal_exec() 160 op->data.dir == SPI_MEM_DATA_OUT, op->data.nbytes); in wpcm_fiu_normal_exec() 163 wpcm_fiu_get_data(fiu, op->data.buf.in, op->data.nbytes); in wpcm_fiu_normal_exec() [all …]
|
| H A D | spi-fsl-qspi.c | 399 if (op->addr.nbytes) in fsl_qspi_supports_op() 402 if (op->dummy.nbytes) in fsl_qspi_supports_op() 405 if (op->data.nbytes) in fsl_qspi_supports_op() 415 if (op->addr.nbytes + in fsl_qspi_supports_op() 416 (op->dummy.nbytes ? 1:0) + in fsl_qspi_supports_op() 417 (op->data.nbytes ? 1:0) > 6) in fsl_qspi_supports_op() 421 if (op->dummy.nbytes && in fsl_qspi_supports_op() 422 (op->dummy.nbytes * 8 / op->dummy.buswidth > 64)) in fsl_qspi_supports_op() 427 (op->data.nbytes > q->devtype_data->ahb_buf_size || in fsl_qspi_supports_op() 428 (op->data.nbytes > q->devtype_data->rxfifo - 4 && in fsl_qspi_supports_op() [all …]
|
| H A D | spi-dw-core.c | 576 op->data.nbytes = clamp_val(op->data.nbytes, 0, DW_SPI_NDF_MASK + 1); in dw_spi_adjust_enh_mem_op_size() 578 op->data.nbytes = clamp_val(op->data.nbytes, 0, DW_SPI_NDF_MASK); in dw_spi_adjust_enh_mem_op_size() 586 op->data.nbytes = clamp_val(op->data.nbytes, 0, DW_SPI_NDF_MASK + 1); in dw_spi_adjust_mem_op_size() 596 if (op->addr.nbytes != 0 && op->addr.buswidth != 1 && in dw_spi_supports_enh_mem_op() 600 if (op->addr.nbytes >= 8) in dw_spi_supports_enh_mem_op() 607 if (op->dummy.nbytes && !op->dummy.buswidth) in dw_spi_supports_enh_mem_op() 610 if (op->dummy.nbytes != 0 && op->data.dir == SPI_MEM_DATA_OUT) in dw_spi_supports_enh_mem_op() 614 if (op->dummy.nbytes != 0 && in dw_spi_supports_enh_mem_op() 615 op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth > in dw_spi_supports_enh_mem_op() 619 if ((dws->quirk_flags & DW_SPI_QUIRK_JHB100) && op->addr.nbytes && in dw_spi_supports_enh_mem_op() [all …]
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | pio_copy.c | 184 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 D | aria_aesni_avx2_glue.c | 92 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 D | ecb_cbc_helpers.h | 20 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); \
|
| H A D | aria_aesni_avx_glue.c | 90 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 …]
|
| /linux/arch/s390/crypto/ |
| H A D | aes_s390.c | 70 unsigned int nbytes; member 125 unsigned int nbytes, n; in ecb_aes_crypt() local 132 while (!ret && ((nbytes = walk.nbytes) != 0)) { in ecb_aes_crypt() 134 n = nbytes & ~(AES_BLOCK_SIZE - 1); in ecb_aes_crypt() 137 ret = skcipher_walk_done(&walk, nbytes - n); in ecb_aes_crypt() 221 unsigned int nbytes, n; in cbc_aes_crypt() local 236 while (!ret && ((nbytes = walk.nbytes) != 0)) { in cbc_aes_crypt() 238 n = nbytes & ~(AES_BLOCK_SIZE - 1); in cbc_aes_crypt() 242 ret = skcipher_walk_done(&walk, nbytes - n); in cbc_aes_crypt() 321 unsigned int offset, nbytes, n; in xts_aes_crypt() local [all …]
|
| /linux/fs/coda/ |
| H A D | psdev.c | 92 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/iio/pressure/ |
| H A D | abp2030pa_i2c.c | 16 static int abp2_i2c_read(struct abp2_data *data, u8 unused, u8 nbytes) in abp2_i2c_read() argument 21 if (nbytes > ABP2_MEASUREMENT_RD_SIZE) in abp2_i2c_read() 24 ret = i2c_master_recv(client, data->rx_buf, nbytes); in abp2_i2c_read() 27 if (ret != nbytes) in abp2_i2c_read() 33 static int abp2_i2c_write(struct abp2_data *data, u8 cmd, u8 nbytes) in abp2_i2c_write() argument 38 if (nbytes > ABP2_MEASUREMENT_RD_SIZE) in abp2_i2c_write() 42 ret = i2c_master_send(client, data->tx_buf, nbytes); in abp2_i2c_write() 45 if (ret != nbytes) in abp2_i2c_write()
|
| /linux/drivers/crypto/ |
| H A D | padlock-aes.c | 349 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 D | rpadlpar_sysfs.c | 28 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 D | poly1305.c | 38 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/drivers/pnp/isapnp/ |
| H A D | proc.c | 23 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/drivers/zorro/ |
| H A D | proc.c | 31 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/tools/usb/ |
| H A D | ffs-test.c | 336 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 …]
|