[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200901141115.19792-1-yuehaibing@huawei.com>
Date: Tue, 1 Sep 2020 22:11:15 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <dchickles@...vell.com>, <sburla@...vell.com>,
<fmanlunas@...vell.com>, <davem@...emloft.net>, <kuba@...nel.org>,
<yuehaibing@...wei.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation
Remove unneeded return value cast.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
index 017169023cca..cf4fe5b17f8a 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
@@ -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;
--
2.17.1
Powered by blists - more mailing lists