crypto: cpt - remove casting dma_alloc_coherent
authorXu Wang <vulab@iscas.ac.cn>
Thu, 4 Feb 2021 07:11:33 +0000 (07:11 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 10 Feb 2021 06:55:59 +0000 (17:55 +1100)
Remove casting the values returned by dma_alloc_coherent.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/cpt/cptvf_main.c

index f016448e43bba56fca39755661b4d2ed77fee28c..112b12a32542b50655a0cd76273cbf332e57c2a3 100644 (file)
@@ -233,10 +233,10 @@ static int alloc_command_queues(struct cpt_vf *cptvf,
 
                        c_size = (rem_q_size > qcsize_bytes) ? qcsize_bytes :
                                        rem_q_size;
-                       curr->head = (u8 *)dma_alloc_coherent(&pdev->dev,
-                                                             c_size + CPT_NEXT_CHUNK_PTR_SIZE,
-                                                             &curr->dma_addr,
-                                                             GFP_KERNEL);
+                       curr->head = dma_alloc_coherent(&pdev->dev,
+                                                       c_size + CPT_NEXT_CHUNK_PTR_SIZE,
+                                                       &curr->dma_addr,
+                                                       GFP_KERNEL);
                        if (!curr->head) {
                                dev_err(&pdev->dev, "Command Q (%d) chunk (%d) allocation failed\n",
                                        i, queue->nchunks);