* [PATCH] crypto: ixp4xxx: Use dma_pool_zalloc()
@ 2018-02-17 10:11 Souptick Joarder
0 siblings, 0 replies; only message in thread
From: Souptick Joarder @ 2018-02-17 10:11 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto
Use dma_pool_zalloc() instead of dma_pool_alloc + memset
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/crypto/ixp4xx_crypto.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 717a266..42e1403 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -537,14 +537,13 @@ static void release_ixp_crypto(struct device *dev)
static void reset_sa_dir(struct ix_sa_dir *dir)
{
- memset(dir->npe_ctx, 0, NPE_CTX_LEN);
dir->npe_ctx_idx = 0;
dir->npe_mode = 0;
}
static int init_sa_dir(struct ix_sa_dir *dir)
{
- dir->npe_ctx = dma_pool_alloc(ctx_pool, GFP_KERNEL, &dir->npe_ctx_phys);
+ dir->npe_ctx = dma_pool_zalloc(ctx_pool, GFP_KERNEL, &dir->npe_ctx_phys);
if (!dir->npe_ctx) {
return -ENOMEM;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-17 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-17 10:11 [PATCH] crypto: ixp4xxx: Use dma_pool_zalloc() Souptick Joarder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox