net/e1000: remove unnecessary cast
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 29 May 2019 19:14:56 +0000 (12:14 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:29 +0000 (23:54 +0900)
The device private pointer (dev_private) is of type void *
therefore no cast is necessary in C.

Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/e1000/igb_ethdev.c

index 29c5500..4436f9d 100644 (file)
@@ -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;