From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4FE57A046B for ; Wed, 24 Jul 2019 02:57:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A1141C0D5; Wed, 24 Jul 2019 02:57:08 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id BC9311C0D4 for ; Wed, 24 Jul 2019 02:57:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 17:57:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,300,1559545200"; d="scan'208";a="174718696" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.204]) by orsmga006.jf.intel.com with ESMTP; 23 Jul 2019 17:57:02 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang Date: Wed, 24 Jul 2019 08:52:25 +0800 Message-Id: <1563929545-25010-1-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The memzone's start virtual address pointer (addr) is of type void *, no need to add type cast. Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 3353f23..0282b53 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -664,7 +664,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev, memset(rz->addr, 0, ring_size); rxq->rx_ring_dma = rz->iova; - rxq->rx_ring = (union ice_rx_desc *)rz->addr; + rxq->rx_ring = rz->addr; #ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC len = (uint16_t)(nb_desc + ICE_RX_MAX_BURST); @@ -882,7 +882,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_deferred_start = tx_conf->tx_deferred_start; txq->tx_ring_dma = tz->iova; - txq->tx_ring = (struct ice_tx_desc *)tz->addr; + txq->tx_ring = tz->addr; /* Allocate software ring */ txq->sw_ring = -- 2.7.4