Browse Source

crypto: cavium/nitrox - use dma_pool_zalloc()

use dma_pool_zalloc() instead of dma_pool_alloc with __GFP_ZERO flag.
crypto dma pool renamed to "nitrox-context".

Signed-off-by: Srikanth Jampala <Jampala.Srikanth@cavium.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Srikanth Jampala 7 years ago
parent
commit
718f608c38
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/crypto/cavium/nitrox/nitrox_lib.c

+ 2 - 2
drivers/crypto/cavium/nitrox/nitrox_lib.c

@@ -122,7 +122,7 @@ static int create_crypto_dma_pool(struct nitrox_device *ndev)
 
 
 	/* Crypto context pool, 16 byte aligned */
 	/* Crypto context pool, 16 byte aligned */
 	size = CRYPTO_CTX_SIZE + sizeof(struct ctx_hdr);
 	size = CRYPTO_CTX_SIZE + sizeof(struct ctx_hdr);
-	ndev->ctx_pool = dma_pool_create("crypto-context",
+	ndev->ctx_pool = dma_pool_create("nitrox-context",
 					 DEV(ndev), size, 16, 0);
 					 DEV(ndev), size, 16, 0);
 	if (!ndev->ctx_pool)
 	if (!ndev->ctx_pool)
 		return -ENOMEM;
 		return -ENOMEM;
@@ -149,7 +149,7 @@ void *crypto_alloc_context(struct nitrox_device *ndev)
 	void *vaddr;
 	void *vaddr;
 	dma_addr_t dma;
 	dma_addr_t dma;
 
 
-	vaddr = dma_pool_alloc(ndev->ctx_pool, (GFP_KERNEL | __GFP_ZERO), &dma);
+	vaddr = dma_pool_zalloc(ndev->ctx_pool, GFP_KERNEL, &dma);
 	if (!vaddr)
 	if (!vaddr)
 		return NULL;
 		return NULL;