baseband/fpga_5gnr_fec: remove useless cast
PATCH 1/1 baseband/fpga_5gnr_fec: remove useless cast
The rte_pktmbuf_mtod_offset macro already includes a type cast so casting the result just adds extra cast.
Found by cocci/mtod-offset.cocci
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +2 -2
@@ -2042,7 +2042,7 @@ fpga_5gnr_harq_write_loopback(struct fpga_5gnr_queue *q, } } - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_input, uint8_t *, in_offset); + input = rte_pktmbuf_mtod_offset(harq_input, uint64_t *, in_offset);while (left_length >0 ) {if (fpga_5gnr_reg_read_8 (q->d->mmio_base,FPGA_5GNR_FEC_DDR4_ADDR_RDY_REGS ) ==1 ) {
@@ -2125,7 +2125,7 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q, } left_length = harq_in_length; - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_output, uint8_t *, harq_out_offset); + input = rte_pktmbuf_mtod_offset(harq_output, uint64_t *, harq_out_offset);while (left_length >0 ) {if (d->fpga_variant ==AGX100_FPGA_VARIANT ) {
Signature · 1 line
2.43.0
Quoted 23 lines · Stephen Hemminger
The
rte_pktmbuf_mtod_offsetmacro already includes a type cast so casting the result just adds extra cast.
Found bycocci/mtod-offset.cocciSigned-off-by Stephen Hemminger <[email protected]>--- drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +1
-1@@ -2042,7 +2042,7 @@ fpga_5gnr_harq_write_loopback(struct fpga_5gnr_queue *q, } } - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_input, uint8_t *, in_offset); + input = rte_pktmbuf_mtod_offset(harq_input, uint64_t *, in_offset);while (left_length >0 ) {if (fpga_5gnr_reg_read_8 (q->d->mmio_base,FPGA_5GNR_FEC_DDR4_ADDR_RDY_REGS ) ==1 ) {
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q, · line 2131
Quoted 8 lines
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +1
-1@@ -2125,7 +2125,7 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q, } left_length = harq_in_length; - input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_output, uint8_t *, harq_out_offset); + input = rte_pktmbuf_mtod_offset(harq_output, uint64_t *, harq_out_offset);while (left_length >0 ) {if (d->fpga_variant ==AGX100_FPGA_VARIANT ) {
Reviewed-by Maxime Coquelin <[email protected]>
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 8 lines · Stephen Hemminger
The
rte_pktmbuf_mtod_offsetmacro already includes a type cast so casting the result just adds extra cast.
Found bycocci/mtod-offset.cocciSigned-off-by Stephen Hemminger <[email protected]>--- drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to dpdk-next-baseband/for-main
Thanks,
Maxime