All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] octeon_ep: Remove unnecessary cast
@ 2022-04-20  1:47 Haowen Bai
  2022-04-20  2:07 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Haowen Bai @ 2022-04-20  1:47 UTC (permalink / raw)
  To: Veerasenareddy Burru, Abhijit Ayarekar, David S. Miller,
	Jakub Kicinski, Paolo Abeni
  Cc: Haowen Bai, netdev, linux-kernel

Fix the following coccicheck warning:

./drivers/net/ethernet/marvell/octeon_ep/octep_rx.c:161:18-40: WARNING:
casting value returned by memory allocation function to (struct
octep_rx_buffer *) is useless.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/net/ethernet/marvell/octeon_ep/octep_rx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c b/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
index 945947ec7723..96768823cced 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
@@ -158,8 +158,7 @@ static int octep_setup_oq(struct octep_device *oct, int q_no)
 		goto desc_dma_alloc_err;
 	}
 
-	oq->buff_info = (struct octep_rx_buffer *)
-			vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE);
+	oq->buff_info = vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE);
 	if (unlikely(!oq->buff_info)) {
 		dev_err(&oct->pdev->dev,
 			"Failed to allocate buffer info for OQ-%d\n", q_no);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-24  3:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20  1:47 [PATCH] octeon_ep: Remove unnecessary cast Haowen Bai
2022-04-20  2:07 ` Joe Perches
2022-05-24  3:28   ` [PATCH V2] " Haowen Bai
2022-05-24  3:48     ` Joe Perches
2022-05-24  3:51       ` baihaowen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.