diff options
author | Jules Irenge <jbi.octave@gmail.com> | 2022-09-13 00:03:27 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-20 03:33:21 +0200 |
commit | ed48cfedf1e2250c856d0f894310d081adde5040 (patch) | |
tree | ef4924ee21a9fa4d8f4c2ea3fd3b1a420b81a2f0 /drivers | |
parent | openvswitch: Change the return type for vport_ops.send function hook to int (diff) | |
download | linux-ed48cfedf1e2250c856d0f894310d081adde5040.tar.xz linux-ed48cfedf1e2250c856d0f894310d081adde5040.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/octeon_ep/octep_rx.c | 3 |
1 files changed, 1 insertions, 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 d9ae0937d17a..392d9b0da0d7 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); |