From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A838EA045E for ; Wed, 29 May 2019 21:16:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2667B1B9CE; Wed, 29 May 2019 21:15:38 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 39AF61B998 for ; Wed, 29 May 2019 21:15:15 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id n19so2268340pfa.1 for ; Wed, 29 May 2019 12:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=475ENe+WPnkhXRdtsY6ckeEEVkkJo4N2L3u7Y4IwC+Q=; b=KrudJho6/WiYZL/Ve77e/kfxB5mi//5hC05t3bVgyfYPnJQSpx8eysPj5j5CsFBfoz Tt3t4ieDnUEHkte+Z7NMk2xAcBa5pt3YxAY6FbEj7CNrKlenDfnYXEsaUL1B0IdyCKzi mcVfg9NmIo7RWYDVr5wcox8qkbbKfLPm92ZniBH8/6xRWGlrZ+yoKbBzR0uwQd53aK2i mC+jQ0mAfmL+CB91+ZaAoByEyIPD7gO+WNELHDCJzCCoWZvMjk+roIJjnlBCGL09FcDx eIeifA4WCfU0tutkj0ipRwlAEW5qcqRVaFfyJdgD8S+a8uXd4gGIee5dc0axX1alId8U N5wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=475ENe+WPnkhXRdtsY6ckeEEVkkJo4N2L3u7Y4IwC+Q=; b=ssxOU3V3XLG6Vf5vfDE1D5T6w8tmXDxhyosI0RBNHIA8FWxqrDpt6q57dvvA9OZTVd KWqMoD9GK67WvChC0M0Q7o67dIBfP7qWrgyy4aYgbxmNVdhQI8L2EjoBhPKJdDfLHsCk 5kQRoqU8BxVPqUivScuHE2pLpAwu40bJPx8HxU/ztvW7ulXYTbT01XBPBL/KbLiBM9PR AlNQkQtqmOsvkVlvlV0Xng7stG8s7k++wW32vRhhy4JRHqblbX57OUiD+15wRdTDhW10 l2QbtDdoA/XZJ2Ex6YtU3iIDoVUCztGu+6QbsKL5pkzOwuL30yhkwdKH5nP9f0ES6RO/ MMCQ== X-Gm-Message-State: APjAAAXaVGJ1Lur3ceaM8oN5ARyvIYMVx65gyIgXm1mEO8HXOiO2t8md pBobmh76I4QrGgZTZiAZFDse4Sf+oaI= X-Google-Smtp-Source: APXvYqywZ5tB3bMRwTcOx/CN3fz7CvwPUaGln6w2COI/wod5lxYJTOX+M/4iD6YCg0O7ow1OY+w3cg== X-Received: by 2002:a63:1212:: with SMTP id h18mr51910329pgl.266.1559157314054; Wed, 29 May 2019 12:15:14 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id t18sm142943pgm.69.2019.05.29.12.15.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 May 2019 12:15:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 29 May 2019 12:15:00 -0700 Message-Id: <20190529191501.19053-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190529191501.19053-1-stephen@networkplumber.org> References: <20190529191501.19053-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 11/12] net/ixgbe: remove unnecessary cast 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 device private pointer (dev_private) is of type void * therefore no cast is necessary in C. Signed-off-by: Stephen Hemminger --- drivers/net/ixgbe/ixgbe_ethdev.c | 33 +++++++++++--------------------- drivers/net/ixgbe/ixgbe_rxtx.c | 14 +++++--------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index fae93bb29ffd..1d78085a9159 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2408,8 +2408,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev) { struct ixgbe_interrupt *intr = IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private); - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; int ret; PMD_INIT_FUNC_TRACE(); @@ -2817,8 +2816,7 @@ static void ixgbe_dev_stop(struct rte_eth_dev *dev) { struct rte_eth_link link; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct ixgbe_vf_info *vfinfo = @@ -4815,8 +4813,7 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev, uint8_t j, mask; uint32_t reta, r; uint16_t idx, shift; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t reta_reg; @@ -5049,8 +5046,7 @@ static int ixgbevf_dev_configure(struct rte_eth_dev *dev) { struct rte_eth_conf *conf = &dev->data->dev_conf; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d", dev->data->port_id); @@ -5182,8 +5178,7 @@ static void ixgbevf_dev_stop(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; @@ -6945,8 +6940,7 @@ static void ixgbe_start_timecounters(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; struct rte_eth_link link; uint32_t incval = 0; uint32_t shift = 0; @@ -7014,8 +7008,7 @@ ixgbe_start_timecounters(struct rte_eth_dev *dev) static int ixgbe_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta) { - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; adapter->systime_tc.nsec += delta; adapter->rx_tstamp_tc.nsec += delta; @@ -7028,8 +7021,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts) { uint64_t ns; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; ns = rte_timespec_to_ns(ts); /* Set the timecounters to a new value. */ @@ -7044,8 +7036,7 @@ static int ixgbe_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) { uint64_t ns, systime_cycles; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; systime_cycles = ixgbe_read_systime_cyclecounter(dev); ns = rte_timecounter_update(&adapter->systime_tc, systime_cycles); @@ -7126,8 +7117,7 @@ ixgbe_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags __rte_unused) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; uint32_t tsync_rxctl; uint64_t rx_tstamp_cycles; uint64_t ns; @@ -7148,8 +7138,7 @@ ixgbe_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter =dev->data->dev_private; uint32_t tsync_txctl; uint64_t tx_tstamp_cycles; uint64_t ns; diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 4be7f72ab838..a8ce561e239a 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2919,8 +2919,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, struct ixgbe_rx_queue *rxq; struct ixgbe_hw *hw; uint16_t len; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; uint64_t offloads; PMD_INIT_FUNC_TRACE(); @@ -3221,8 +3220,7 @@ void __attribute__((cold)) ixgbe_dev_clear_queues(struct rte_eth_dev *dev) { unsigned i; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); PMD_INIT_FUNC_TRACE(); @@ -3485,7 +3483,7 @@ ixgbe_rss_configure(struct rte_eth_dev *dev) uint32_t reta_reg; PMD_INIT_FUNC_TRACE(); - adapter = (struct ixgbe_adapter *)dev->data->dev_private; + adapter = dev->data->dev_private; hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); sp_reta_size = ixgbe_reta_size_get(hw->mac.type); @@ -4630,8 +4628,7 @@ void __attribute__((cold)) ixgbe_set_rx_function(struct rte_eth_dev *dev) { uint16_t i, rx_using_sse; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; /* * In order to allow Vector Rx there are a few configuration @@ -5309,8 +5306,7 @@ int __attribute__((cold)) ixgbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { struct ixgbe_hw *hw; - struct ixgbe_adapter *adapter = - (struct ixgbe_adapter *)dev->data->dev_private; + struct ixgbe_adapter *adapter = dev->data->dev_private; struct ixgbe_rx_queue *rxq; uint32_t rxdctl; int poll_ms; -- 2.20.1