DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 07/12] net/e1000: remove unnecessary cast of void *
Date: Wed, 29 May 2019 12:14:56 -0700	[thread overview]
Message-ID: <20190529191501.19053-8-stephen@networkplumber.org> (raw)
In-Reply-To: <20190529191501.19053-1-stephen@networkplumber.org>

dev_private is void * so cast is unnecessary in C.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/e1000/igb_ethdev.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index bd1c64c0367d..2e9fee6a3674 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5029,8 +5029,7 @@ static void
 igb_start_timecounters(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct e1000_adapter *adapter =
-		(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 	uint32_t incval = 1;
 	uint32_t shift = 0;
 	uint64_t mask = E1000_CYCLECOUNTER_MASK;
@@ -5081,8 +5080,7 @@ igb_start_timecounters(struct rte_eth_dev *dev)
 static int
 igb_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
 {
-	struct e1000_adapter *adapter =
-			(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 
 	adapter->systime_tc.nsec += delta;
 	adapter->rx_tstamp_tc.nsec += delta;
@@ -5095,8 +5093,7 @@ static int
 igb_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 {
 	uint64_t ns;
-	struct e1000_adapter *adapter =
-			(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 
 	ns = rte_timespec_to_ns(ts);
 
@@ -5112,8 +5109,7 @@ static int
 igb_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
 {
 	uint64_t ns, systime_cycles;
-	struct e1000_adapter *adapter =
-			(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 
 	systime_cycles = igb_read_systime_cyclecounter(dev);
 	ns = rte_timecounter_update(&adapter->systime_tc, systime_cycles);
@@ -5206,8 +5202,7 @@ igb_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
 			       uint32_t flags __rte_unused)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct e1000_adapter *adapter =
-			(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 	uint32_t tsync_rxctl;
 	uint64_t rx_tstamp_cycles;
 	uint64_t ns;
@@ -5228,8 +5223,7 @@ igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
 			       struct timespec *timestamp)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct e1000_adapter *adapter =
-			(struct e1000_adapter *)dev->data->dev_private;
+	struct e1000_adapter *adapter = dev->data->dev_private;
 	uint32_t tsync_txctl;
 	uint64_t tx_tstamp_cycles;
 	uint64_t ns;
-- 
2.20.1


  parent reply	other threads:[~2019-05-29 19:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 19:14 [dpdk-dev] [PATCH 00/12] cleanup useless casts " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 01/12] net/atlantic: remove unnecessary cast Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 02/12] net/ark: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 03/12] net/axgbe: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 04/12] net/bnxt: " Stephen Hemminger
2019-06-04 13:27   ` Lance Richardson
2019-05-29 19:14 ` [dpdk-dev] [PATCH 05/12] net/bonding: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 06/12] net/cxgbe: " Stephen Hemminger
2019-05-29 19:14 ` Stephen Hemminger [this message]
2019-05-29 19:14 ` [dpdk-dev] [PATCH 08/12] net/ena: " Stephen Hemminger
2019-06-05 14:28   ` Ferruh Yigit
2019-05-29 19:14 ` [dpdk-dev] [PATCH 09/12] net/enic: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 10/12] net/i40e: " Stephen Hemminger
2019-05-29 19:15 ` [dpdk-dev] [PATCH 11/12] net/ixgbe: " Stephen Hemminger
2019-06-05 14:28   ` Ferruh Yigit
2019-05-29 19:15 ` [dpdk-dev] [PATCH 12/12] net/mlx5: " Stephen Hemminger
2019-06-05 14:28 ` [dpdk-dev] [PATCH 00/12] cleanup useless casts of void * Ferruh Yigit

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=20190529191501.19053-8-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.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).