DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
Cc: Nicolas Chautru <nicolas.chautru@intel.com>
Subject: Re: [PATCH] baseband/fpga_5gnr_fec: remove useless cast
Date: Tue, 10 Sep 2024 17:13:52 +0200	[thread overview]
Message-ID: <0b0901c9-b8f3-44f6-af20-1c6404e4f91e@redhat.com> (raw)
In-Reply-To: <20240725171727.142525-1-stephen@networkplumber.org>



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


  reply	other threads:[~2024-09-10 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 17:17 Stephen Hemminger
2024-09-10 15:13 ` Maxime Coquelin [this message]
2024-09-13 13:50 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b0901c9-b8f3-44f6-af20-1c6404e4f91e@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=nicolas.chautru@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).