]> git.baikalelectronics.ru Git - kernel.git/commitdiff
liquidio: Remove unneeded cast from memory allocation
authorYueHaibing <yuehaibing@huawei.com>
Tue, 1 Sep 2020 14:11:15 +0000 (22:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2020 18:48:51 +0000 (11:48 -0700)
Remove unneeded return value cast.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/octeon_droq.c

index 017169023cca399d13007f13765a71b9b3f6373c..cf4fe5b17f8a2e6b5c141abc265e9bd5e8fb8316 100644 (file)
@@ -280,13 +280,10 @@ int octeon_init_droq(struct octeon_device *oct,
        dev_dbg(&oct->pci_dev->dev, "droq[%d]: num_desc: %d\n", q_no,
                droq->max_count);
 
-       droq->recv_buf_list = (struct octeon_recv_buffer *)
-             vzalloc_node(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE),
-                          numa_node);
+       droq->recv_buf_list = vzalloc_node(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE),
+                                          numa_node);
        if (!droq->recv_buf_list)
-               droq->recv_buf_list = (struct octeon_recv_buffer *)
-                     vzalloc(array_size(droq->max_count,
-                                        OCT_DROQ_RECVBUF_SIZE));
+               droq->recv_buf_list = vzalloc(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE));
        if (!droq->recv_buf_list) {
                dev_err(&oct->pci_dev->dev, "Output queue recv buf list alloc failed\n");
                goto init_droq_fail;