From: Stephen Hemminger Date: Wed, 29 May 2019 19:14:56 +0000 (-0700) Subject: net/e1000: remove unnecessary cast X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=130d2b77f0e507b4a41372aca94854d2f37cea53;p=dpdk.git net/e1000: remove unnecessary cast 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 Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 29c5500523..4436f9d3cf 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;