Skip to content

Commit ed48cfe

Browse files
irengekuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/Yx+sr9o0uylXVcOl@playground Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8bb7c4f commit ed48cfe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_rx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ static int octep_setup_oq(struct octep_device *oct, int q_no)
158158
goto desc_dma_alloc_err;
159159
}
160160

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);
163162
if (unlikely(!oq->buff_info)) {
164163
dev_err(&oct->pdev->dev,
165164
"Failed to allocate buffer info for OQ-%d\n", q_no);

0 commit comments

Comments
 (0)