octeon_ep: Remove useless casting value returned by vzalloc to structure
Subsystems (3)
PATCH 1/1 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]>
--- drivers/net/ethernet/marvell/octeon_ep/octep_rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/marvell/octeon_ep/octep_rx.c +1 -2
@@ -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);
Signature · 1 line
2.35.1
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 12 Sep 2022 23:03:27 +0100 you wrote:
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.
[...]
Here is the summary with links:
- octeon_ep: Remove useless casting value returned by vzalloc to structure
https://git.kernel.org/netdev/net-next/c/ed48cfedf1e2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html