* [PATCH] baseband/fpga_5gnr_fec: remove useless cast
@ 2024-07-25 17:17 Stephen Hemminger
2024-09-10 15:13 ` Maxime Coquelin
2024-09-13 13:50 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2024-07-25 17:17 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Nicolas Chautru
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 <stephen@networkplumber.org>
---
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 ++--
1 file changed, 2 insertions(+), 2 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 9b253cde28..e2ed047836 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -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) {
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] baseband/fpga_5gnr_fec: remove useless cast
2024-07-25 17:17 [PATCH] baseband/fpga_5gnr_fec: remove useless cast Stephen Hemminger
@ 2024-09-10 15:13 ` Maxime Coquelin
2024-09-13 13:50 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2024-09-10 15:13 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: Nicolas Chautru
On 7/25/24 19:17, Stephen Hemminger wrote:
> 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 <stephen@networkplumber.org>
> ---
> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 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 9b253cde28..e2ed047836 100644
> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> @@ -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) {
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] baseband/fpga_5gnr_fec: remove useless cast
2024-07-25 17:17 [PATCH] baseband/fpga_5gnr_fec: remove useless cast Stephen Hemminger
2024-09-10 15:13 ` Maxime Coquelin
@ 2024-09-13 13:50 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2024-09-13 13:50 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: Nicolas Chautru
On 7/25/24 19:17, Stephen Hemminger wrote:
> 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 <stephen@networkplumber.org>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-13 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-25 17:17 [PATCH] baseband/fpga_5gnr_fec: remove useless cast Stephen Hemminger
2024-09-10 15:13 ` Maxime Coquelin
2024-09-13 13:50 ` Maxime Coquelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).