From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4828242DFC;
	Sat,  8 Jul 2023 03:58:04 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 43FAA42D16;
	Sat,  8 Jul 2023 03:57:32 +0200 (CEST)
Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com
 [209.85.160.49]) by mails.dpdk.org (Postfix) with ESMTP id 2485A42D2C
 for <dev@dpdk.org>; Sat,  8 Jul 2023 03:57:29 +0200 (CEST)
Received: by mail-oa1-f49.google.com with SMTP id
 586e51a60fabf-1b3c503af99so2335771fac.0
 for <dev@dpdk.org>; Fri, 07 Jul 2023 18:57:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688781448;
 x=1691373448; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=OGSayFJofy8bhnDuu5frzEHVLNUTbgllxcszb5VKc10=;
 b=Z/cTid9fLOcguvPhS70j2jRlScukIk6/DY9hcbF4aTwtmlXXiDjHSFNBKqG2cXiVKD
 1hHYxR697IQNxEE5tzXzxfsU5pxEI9EGl8KEEI2rSlx6+NAkfgjBUwZpDELKQ/6UNtIB
 6n5zKtjeiJc6J49FyVQaPMW1IUR3UVDSDU+khr2dzo/zep74PmYOONWyy2dc0cXVa102
 +CRD4jqvhDYK/awdFrpIvKayKFNoxUFSKyrwwNi+zocVAHumG0uTrE3Qez03wi6tU18q
 wSCfjqrQpRnAVTIvRquqJI2vdbBDdQ2onP1tg+uIQaMRobKDvoRs6i47kS2SatfPmSEr
 Ohmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1688781448; x=1691373448;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=OGSayFJofy8bhnDuu5frzEHVLNUTbgllxcszb5VKc10=;
 b=kHMzkH7kLWxDven2AupvdgRgGSwsb/MMIrjtCTvVSVwQHgwLr1Emx7kH8fkSZb0gTN
 D0JFa30S+JVx1Cklflzl9p60Dq5H7zYJmlbSvyUbQyGDohHOUu/QOEJeSI7pd/iEwjzN
 awqj5wJRtIDgEreA7kBxdK1A+oAYwBQF6QK9WjOhmYblFUgbgQLMs6fm04jTY/fMJHvz
 GKyamD6Xo8zTaXiQx5KDM0eH9MHPInEYt0lywvBzYY8LKZxDNdA+EnYRNoxBlxCFPYuL
 5MIq/pwXnCrO/ZACTBAyjTErpQ2uEpPlo7bg0ckstZVCiDoi77/qoNnKVboMMZsKz3B2
 yGWw==
X-Gm-Message-State: ABy/qLZG+UO16RVpcH9lnrZc9oMh9sXELXO+Em6AzgTM6x59YTcsxPKc
 Aao9x+zkC3AgQJjrtXvN5TuY28lvRJ2IEHsIjwwc6pQF
X-Google-Smtp-Source: APBJJlEJexG8MG13pg5Eecx3YSuxRCpfJ4LZz26R7oFr7aP62lB/KnMEekViHiCLurufIYmAio119w==
X-Received: by 2002:a05:6870:20b:b0:1b4:7411:df6e with SMTP id
 j11-20020a056870020b00b001b47411df6emr113251oad.15.1688781448275; 
 Fri, 07 Jul 2023 18:57:28 -0700 (PDT)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 24-20020a17090a035800b00263f5ac814esm2260269pjf.38.2023.07.07.18.57.27
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 07 Jul 2023 18:57:27 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [PATCH v5 07/11] baseband/fpga: use rte_pktmbuf_offset
Date: Fri,  7 Jul 2023 18:57:14 -0700
Message-Id: <20230708015718.75565-8-stephen@networkplumber.org>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230708015718.75565-1-stephen@networkplumber.org>
References: <20230505174813.133894-1-stephen@networkplumber.org>
 <20230708015718.75565-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Replace explicit packet offset computations with rte_pktmbuf_mtod_offset().

Signed-off-by: Stephen Hemminger <stephen@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