Replace explicit packet offset computations with rte_pktmbuf_mtod_offset().

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c 
b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index f29565af8cca..465a65f3dca2 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -1543,8 +1543,7 @@ fpga_harq_write_loopback(struct fpga_queue *q,
                rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
        }
 
-       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_reg_read_8(q->d->mmio_base,
@@ -1621,8 +1620,8 @@ fpga_harq_read_loopback(struct fpga_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) {
                fpga_reg_write_32(q->d->mmio_base,
-- 
2.39.2

Reply via email to