/drivers/staging/comedi/ |
D | comedi_buf.c | 276 unsigned int nbytes) in comedi_buf_write_alloc() argument 281 if (nbytes > unalloc) in comedi_buf_write_alloc() 282 nbytes = unalloc; in comedi_buf_write_alloc() 284 async->buf_write_alloc_count += nbytes; in comedi_buf_write_alloc() 292 return nbytes; in comedi_buf_write_alloc() 366 unsigned int nbytes) in comedi_buf_write_free() argument 371 if (nbytes > allocated) in comedi_buf_write_free() 372 nbytes = allocated; in comedi_buf_write_free() 374 async->buf_write_count += nbytes; in comedi_buf_write_free() 375 async->buf_write_ptr += nbytes; in comedi_buf_write_free() [all …]
|
/drivers/crypto/ |
D | geode-aes.c | 184 unsigned int nbytes) in fallback_blk_dec() argument 193 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); in fallback_blk_dec() 200 unsigned int nbytes) in fallback_blk_enc() argument 209 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); in fallback_blk_enc() 306 unsigned int nbytes) in geode_cbc_decrypt() argument 313 return fallback_blk_dec(desc, dst, src, nbytes); in geode_cbc_decrypt() 315 blkcipher_walk_init(&walk, dst, src, nbytes); in geode_cbc_decrypt() 319 while ((nbytes = walk.nbytes)) { in geode_cbc_decrypt() 323 op->len = nbytes - (nbytes % AES_BLOCK_SIZE); in geode_cbc_decrypt() 328 nbytes -= ret; in geode_cbc_decrypt() [all …]
|
D | padlock-aes.c | 344 unsigned int nbytes) in ecb_aes_encrypt() argument 353 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_encrypt() 357 while ((nbytes = walk.nbytes)) { in ecb_aes_encrypt() 360 nbytes / AES_BLOCK_SIZE); in ecb_aes_encrypt() 361 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_encrypt() 362 err = blkcipher_walk_done(desc, &walk, nbytes); in ecb_aes_encrypt() 373 unsigned int nbytes) in ecb_aes_decrypt() argument 382 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_decrypt() 386 while ((nbytes = walk.nbytes)) { in ecb_aes_decrypt() 389 nbytes / AES_BLOCK_SIZE); in ecb_aes_decrypt() [all …]
|
D | hifn_795x.c | 1122 void *priv, unsigned int nbytes) in hifn_setup_cmd_desc() argument 1147 buf_pos += hifn_setup_base_command(dev, buf_pos, nbytes, in hifn_setup_cmd_desc() 1148 nbytes, mask, dev->snum); in hifn_setup_cmd_desc() 1209 nbytes, nbytes, ctx->key, ctx->keysize, in hifn_setup_cmd_desc() 1329 unsigned int nbytes, void *priv) in hifn_setup_dma() argument 1336 n = nbytes; in hifn_setup_dma() 1349 n = nbytes; in hifn_setup_dma() 1371 hifn_setup_cmd_desc(dev, ctx, rctx, priv, nbytes); in hifn_setup_dma() 1419 unsigned int copy, drest = *drestp, nbytes = *nbytesp; in ablkcipher_add() local 1422 if (drest < size || size > nbytes) in ablkcipher_add() [all …]
|
/drivers/infiniband/hw/hfi1/ |
D | pio_copy.c | 226 unsigned int nbytes) in read_low_bytes() argument 229 jcopy(&pbuf->carry.val8[0], from, nbytes); in read_low_bytes() 230 pbuf->carry_bytes = nbytes; in read_low_bytes() 242 const void *from, unsigned int nbytes) in read_extra_bytes() argument 244 jcopy(&pbuf->carry.val8[pbuf->carry_bytes], from, nbytes); in read_extra_bytes() 245 pbuf->carry_bytes += nbytes; in read_extra_bytes() 305 const void *from, size_t nbytes) in seg_pio_copy_start() argument 315 dend = dest + ((nbytes >> 3) * sizeof(u64)); in seg_pio_copy_start() 380 read_low_bytes(pbuf, from, nbytes & 0x7); in seg_pio_copy_start() 382 pbuf->qw_written = 1 /*PBC*/ + (nbytes >> 3); in seg_pio_copy_start() [all …]
|
/drivers/crypto/vmx/ |
D | aes_cbc.c | 100 struct scatterlist *src, unsigned int nbytes) in p8_aes_cbc_encrypt() argument 114 nbytes); in p8_aes_cbc_encrypt() 120 blkcipher_walk_init(&walk, dst, src, nbytes); in p8_aes_cbc_encrypt() 122 while ((nbytes = walk.nbytes)) { in p8_aes_cbc_encrypt() 125 nbytes & AES_BLOCK_MASK, in p8_aes_cbc_encrypt() 127 nbytes &= AES_BLOCK_SIZE - 1; in p8_aes_cbc_encrypt() 128 ret = blkcipher_walk_done(desc, &walk, nbytes); in p8_aes_cbc_encrypt() 141 struct scatterlist *src, unsigned int nbytes) in p8_aes_cbc_decrypt() argument 155 nbytes); in p8_aes_cbc_decrypt() 161 blkcipher_walk_init(&walk, dst, src, nbytes); in p8_aes_cbc_decrypt() [all …]
|
D | aes_ctr.c | 102 unsigned int nbytes = walk->nbytes; in p8_aes_ctr_final() local 112 crypto_xor(keystream, src, nbytes); in p8_aes_ctr_final() 113 memcpy(dst, keystream, nbytes); in p8_aes_ctr_final() 119 struct scatterlist *src, unsigned int nbytes) in p8_aes_ctr_crypt() argument 134 nbytes); in p8_aes_ctr_crypt() 136 blkcipher_walk_init(&walk, dst, src, nbytes); in p8_aes_ctr_crypt() 138 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { in p8_aes_ctr_crypt() 144 (nbytes & in p8_aes_ctr_crypt() 154 inc = (nbytes & AES_BLOCK_MASK) / AES_BLOCK_SIZE; in p8_aes_ctr_crypt() 159 nbytes &= AES_BLOCK_SIZE - 1; in p8_aes_ctr_crypt() [all …]
|
D | aes_xts.c | 108 unsigned int nbytes, int enc) in p8_aes_xts_crypt() argument 123 ret = enc ? crypto_blkcipher_encrypt(&fallback_desc, dst, src, nbytes) : in p8_aes_xts_crypt() 124 crypto_blkcipher_decrypt(&fallback_desc, dst, src, nbytes); in p8_aes_xts_crypt() 130 blkcipher_walk_init(&walk, dst, src, nbytes); in p8_aes_xts_crypt() 137 while ((nbytes = walk.nbytes)) { in p8_aes_xts_crypt() 140 nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak); in p8_aes_xts_crypt() 143 nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak); in p8_aes_xts_crypt() 145 nbytes &= AES_BLOCK_SIZE - 1; in p8_aes_xts_crypt() 146 ret = blkcipher_walk_done(desc, &walk, nbytes); in p8_aes_xts_crypt() 158 struct scatterlist *src, unsigned int nbytes) in p8_aes_xts_encrypt() argument [all …]
|
/drivers/char/ |
D | random.c | 477 size_t nbytes, int min, int rsvd); 479 size_t nbytes, int fips); 520 int nbytes) in _mix_pool_bytes() argument 538 while (nbytes--) { in _mix_pool_bytes() 567 int nbytes) in __mix_pool_bytes() argument 569 trace_mix_pool_bytes_nolock(r->name, nbytes, _RET_IP_); in __mix_pool_bytes() 570 _mix_pool_bytes(r, in, nbytes); in __mix_pool_bytes() 574 int nbytes) in mix_pool_bytes() argument 578 trace_mix_pool_bytes(r->name, nbytes, _RET_IP_); in mix_pool_bytes() 580 _mix_pool_bytes(r, in, nbytes); in mix_pool_bytes() [all …]
|
/drivers/pci/hotplug/ |
D | rpadlpar_sysfs.c | 33 const char *buf, size_t nbytes) in add_slot_store() argument 39 if (nbytes >= MAX_DRC_NAME_LEN) in add_slot_store() 42 memcpy(drc_name, buf, nbytes); in add_slot_store() 46 end = &drc_name[nbytes]; in add_slot_store() 53 return nbytes; in add_slot_store() 64 const char *buf, size_t nbytes) in remove_slot_store() argument 70 if (nbytes >= MAX_DRC_NAME_LEN) in remove_slot_store() 73 memcpy(drc_name, buf, nbytes); in remove_slot_store() 77 end = &drc_name[nbytes]; in remove_slot_store() 84 return nbytes; in remove_slot_store()
|
/drivers/macintosh/ |
D | via-pmu68k.c | 286 for (i = 0; i < req->nbytes - 1; ++i) in pmu_send_request() 288 --req->nbytes; in pmu_send_request() 299 if (req->nbytes != 2) in pmu_send_request() 302 req->nbytes = 1; in pmu_send_request() 310 if (req->nbytes != 6) in pmu_send_request() 313 req->nbytes = 5; in pmu_send_request() 323 if (req->nbytes != 4) in pmu_send_request() 328 req->nbytes = 3; in pmu_send_request() 336 if (req->nbytes != 5) in pmu_send_request() 342 req->nbytes = 4; in pmu_send_request() [all …]
|
D | adb-iop.c | 177 printk("adb_iop_start %p: sending packet, %d bytes:", req, req->nbytes); in adb_iop_start() 178 for (i = 0 ; i < req->nbytes ; i++) in adb_iop_start() 187 amsg.count = req->nbytes - 2; in adb_iop_start() 191 memcpy(&amsg.cmd, req->data + 1, req->nbytes - 1); in adb_iop_start() 234 if ((req->nbytes < 2) || (req->data[0] != ADB_PACKET)) { in adb_iop_write() 275 .nbytes = 2, in adb_iop_reset_bus()
|
/drivers/crypto/nx/ |
D | nx-aes-gcm.c | 119 unsigned int nbytes = assoclen; in nx_gca() local 123 if (nbytes <= AES_BLOCK_SIZE) { in nx_gca() 125 scatterwalk_copychunks(out, &walk, nbytes, SCATTERWALK_FROM_SG); in nx_gca() 143 to_process = min_t(u64, nbytes - processed, in nx_gca() 151 if ((to_process + processed) < nbytes) in nx_gca() 173 } while (processed < nbytes); in nx_gca() 188 unsigned int nbytes = assoclen; in gmac() local 211 to_process = min_t(u64, nbytes - processed, in gmac() 219 if ((to_process + processed) < nbytes) in gmac() 228 csbcpb->cpb.aes_gcm.bit_length_aad = 8 * nbytes; in gmac() [all …]
|
D | nx-aes-ecb.c | 68 unsigned int nbytes, in ecb_aes_nx_crypt() argument 85 to_process = nbytes - processed; in ecb_aes_nx_crypt() 107 } while (processed < nbytes); in ecb_aes_nx_crypt() 117 unsigned int nbytes) in ecb_aes_nx_encrypt() argument 119 return ecb_aes_nx_crypt(desc, dst, src, nbytes, 1); in ecb_aes_nx_encrypt() 125 unsigned int nbytes) in ecb_aes_nx_decrypt() argument 127 return ecb_aes_nx_crypt(desc, dst, src, nbytes, 0); in ecb_aes_nx_decrypt()
|
D | nx-aes-cbc.c | 68 unsigned int nbytes, in cbc_aes_nx_crypt() argument 85 to_process = nbytes - processed; in cbc_aes_nx_crypt() 108 } while (processed < nbytes); in cbc_aes_nx_crypt() 117 unsigned int nbytes) in cbc_aes_nx_encrypt() argument 119 return cbc_aes_nx_crypt(desc, dst, src, nbytes, 1); in cbc_aes_nx_encrypt() 125 unsigned int nbytes) in cbc_aes_nx_decrypt() argument 127 return cbc_aes_nx_crypt(desc, dst, src, nbytes, 0); in cbc_aes_nx_decrypt()
|
D | nx-aes-ccm.c | 172 unsigned int nbytes, in generate_pat() argument 223 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat() 347 unsigned int nbytes = req->cryptlen; in ccm_nx_decrypt() local 356 nbytes -= authsize; in ccm_nx_decrypt() 360 req->src, nbytes + req->assoclen, authsize, in ccm_nx_decrypt() 363 rc = generate_pat(desc->info, req, nx_ctx, authsize, nbytes, assoclen, in ccm_nx_decrypt() 373 to_process = nbytes - processed; in ccm_nx_decrypt() 375 if ((to_process + processed) < nbytes) in ccm_nx_decrypt() 410 } while (processed < nbytes); in ccm_nx_decrypt() 425 unsigned int nbytes = req->cryptlen; in ccm_nx_encrypt() local [all …]
|
/drivers/pnp/isapnp/ |
D | proc.c | 36 size_t nbytes, loff_t * ppos) in isapnp_proc_bus_read() argument 44 if (nbytes >= size) in isapnp_proc_bus_read() 45 nbytes = size; in isapnp_proc_bus_read() 46 if (pos + nbytes > size) in isapnp_proc_bus_read() 47 nbytes = size - pos; in isapnp_proc_bus_read() 48 cnt = nbytes; in isapnp_proc_bus_read() 62 return nbytes; in isapnp_proc_bus_read()
|
/drivers/zorro/ |
D | proc.c | 30 proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) in proc_bus_zorro_read() argument 38 if (nbytes >= sizeof(struct ConfigDev)) in proc_bus_zorro_read() 39 nbytes = sizeof(struct ConfigDev); in proc_bus_zorro_read() 40 if (pos + nbytes > sizeof(struct ConfigDev)) in proc_bus_zorro_read() 41 nbytes = sizeof(struct ConfigDev) - pos; in proc_bus_zorro_read() 51 if (copy_to_user(buf, (void *)&cd + pos, nbytes)) in proc_bus_zorro_read() 53 *ppos += nbytes; in proc_bus_zorro_read() 55 return nbytes; in proc_bus_zorro_read()
|
/drivers/staging/unisys/visorbus/ |
D | visorchannel.c | 37 ulong nbytes; member 65 release_mem_region(channel->physaddr, channel->nbytes); in visorchannel_destroy() 79 return channel->nbytes; in visorchannel_get_nbytes() 130 void *local, ulong nbytes) in visorchannel_read() argument 132 if (offset + nbytes > channel->nbytes) in visorchannel_read() 135 memcpy(local, channel->mapped + offset, nbytes); in visorchannel_read() 142 void *local, ulong nbytes) in visorchannel_write() argument 147 if (offset + nbytes > channel->nbytes) in visorchannel_write() 151 copy_size = min(chdr_size - offset, nbytes); in visorchannel_write() 156 memcpy(channel->mapped + offset, local, nbytes); in visorchannel_write() [all …]
|
/drivers/pci/ |
D | proc.c | 27 size_t nbytes, loff_t *ppos) in proc_bus_pci_read() argument 48 if (nbytes >= size) in proc_bus_pci_read() 49 nbytes = size; in proc_bus_pci_read() 50 if (pos + nbytes > size) in proc_bus_pci_read() 51 nbytes = size - pos; in proc_bus_pci_read() 52 cnt = nbytes; in proc_bus_pci_read() 107 return nbytes; in proc_bus_pci_read() 111 size_t nbytes, loff_t *ppos) in proc_bus_pci_write() argument 121 if (nbytes >= size) in proc_bus_pci_write() 122 nbytes = size; in proc_bus_pci_write() [all …]
|
/drivers/crypto/sunxi-ss/ |
D | sun4i-ss-hash.c | 204 op->byte_count, areq->nbytes, op->mode, in sun4i_hash() 207 if (unlikely(areq->nbytes == 0) && (op->flags & SS_HASH_FINAL) == 0) in sun4i_hash() 211 if (unlikely(areq->nbytes > UINT_MAX - op->len)) { in sun4i_hash() 216 if (op->len + areq->nbytes < 64 && (op->flags & SS_HASH_FINAL) == 0) { in sun4i_hash() 219 op->buf + op->len, areq->nbytes, 0); in sun4i_hash() 243 end = ((areq->nbytes + op->len) / 64) * 64 - op->len; in sun4i_hash() 245 if (end > areq->nbytes || areq->nbytes - end > 63) { in sun4i_hash() 247 end, areq->nbytes); in sun4i_hash() 253 end = ((areq->nbytes + op->len) / 4) * 4 - op->len; in sun4i_hash() 307 in_r = min3(mi.length - in_i, areq->nbytes - i, in sun4i_hash() [all …]
|
/drivers/crypto/qce/ |
D | sha.c | 69 req->nbytes = rctx->nbytes_orig; in qce_ahash_done() 94 rctx->src_nents = sg_nents_for_len(req->src, req->nbytes); in qce_ahash_async_req_handle() 243 unsigned int nbytes; in qce_ahash_update() local 247 rctx->count += req->nbytes; in qce_ahash_update() 250 total = req->nbytes + rctx->buflen; in qce_ahash_update() 254 0, req->nbytes, 0); in qce_ahash_update() 255 rctx->buflen += req->nbytes; in qce_ahash_update() 261 rctx->nbytes_orig = req->nbytes; in qce_ahash_update() 273 unsigned int src_offset = req->nbytes - hash_later; in qce_ahash_update() 279 nbytes = total - hash_later; in qce_ahash_update() [all …]
|
/drivers/crypto/amcc/ |
D | crypto4xx_core.c | 486 u32 *idx, u32 *offset, u32 *nbytes) in crypto4xx_fill_one_page() argument 497 *nbytes -= dev->scatter_buffer_size; in crypto4xx_fill_one_page() 513 *nbytes -= *length; in crypto4xx_fill_one_page() 516 *nbytes -= *length; in crypto4xx_fill_one_page() 522 len = (*nbytes <= dev->scatter_buffer_size) ? in crypto4xx_fill_one_page() 523 (*nbytes) : dev->scatter_buffer_size; in crypto4xx_fill_one_page() 529 *nbytes -= len; in crypto4xx_fill_one_page() 543 u32 nbytes, in crypto4xx_copy_pkt_to_dst() argument 558 while (nbytes) { in crypto4xx_copy_pkt_to_dst() 565 len = (nbytes <= sg->length) ? nbytes : sg->length; in crypto4xx_copy_pkt_to_dst() [all …]
|
/drivers/staging/wilc1000/ |
D | wilc_spi.c | 520 int nbytes; in spi_cmd_complete() local 523 nbytes = sz; in spi_cmd_complete() 525 nbytes = DATA_PKT_SZ - ix; in spi_cmd_complete() 530 if (wilc_spi_rx(wilc, &b[ix], nbytes)) { in spi_cmd_complete() 547 ix += nbytes; in spi_cmd_complete() 548 sz -= nbytes; in spi_cmd_complete() 553 int nbytes; in spi_cmd_complete() local 556 nbytes = sz; in spi_cmd_complete() 558 nbytes = DATA_PKT_SZ; in spi_cmd_complete() 585 if (wilc_spi_rx(wilc, &b[ix], nbytes)) { in spi_cmd_complete() [all …]
|
/drivers/spi/ |
D | spi-xlp.c | 192 int i, j, nbytes; in xlp_spi_read_rxfifo() local 199 nbytes = min(xspi->rx_len, 4); in xlp_spi_read_rxfifo() 200 for (i = nbytes - 1; i >= 0; i--, j++) in xlp_spi_read_rxfifo() 203 xspi->rx_len -= nbytes; in xlp_spi_read_rxfifo() 204 xspi->rx_buf += nbytes; in xlp_spi_read_rxfifo() 212 int i, j, nbytes; in xlp_spi_fill_txfifo() local 220 nbytes = min(xspi->tx_len, 4); in xlp_spi_fill_txfifo() 221 for (i = nbytes - 1; i >= 0; i--, j++) in xlp_spi_fill_txfifo() 225 xspi->tx_len -= nbytes; in xlp_spi_fill_txfifo() 226 xspi->tx_buf += nbytes; in xlp_spi_fill_txfifo()
|