Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

octeon_ep: Remove useless casting value returned by vzalloc to structure

coccinelle reports a warning

WARNING: casting value returned by memory allocation
function to (struct octep_rx_buffer *) is useless.

To fix this the useless cast is removed.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/Yx+sr9o0uylXVcOl@playground
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jules Irenge and committed by
Jakub Kicinski
ed48cfed 8bb7c4f8

+1 -2
+1 -2
drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
··· 158 158 goto desc_dma_alloc_err; 159 159 } 160 160 161 - oq->buff_info = (struct octep_rx_buffer *) 162 - vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE); 161 + oq->buff_info = vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE); 163 162 if (unlikely(!oq->buff_info)) { 164 163 dev_err(&oct->pdev->dev, 165 164 "Failed to allocate buffer info for OQ-%d\n", q_no);