drivers: replace dev->trans_start accesses with dev_trans_start
a trans_start struct member exists twice: - in struct net_device (legacy) - in struct netdev_queue Instead of open-coding dev->trans_start usage to obtain the current trans_start value, use dev_trans_start() instead. This is not exactly the same, as dev_trans_start also considers the trans_start values of the netdev queues owned by the device and provides the most recent one. For legacy devices this doesn't matter as dev_trans_start can cope with netdev trans_start values of 0 (they are ignored). This is a prerequisite to eventual removal of dev->trans_start. Cc: linux-rdma@vger.kernel.org Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a6e5472dc3
commit
4d0e965732
@@ -242,7 +242,7 @@ static void e1000e_dump(struct e1000_adapter *adapter)
|
||||
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
||||
pr_info("Device Name state trans_start last_rx\n");
|
||||
pr_info("%-15s %016lX %016lX %016lX\n", netdev->name,
|
||||
netdev->state, netdev->trans_start, netdev->last_rx);
|
||||
netdev->state, dev_trans_start(netdev), netdev->last_rx);
|
||||
}
|
||||
|
||||
/* Print Registers */
|
||||
|
@@ -383,7 +383,7 @@ static void igb_dump(struct igb_adapter *adapter)
|
||||
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
||||
pr_info("Device Name state trans_start last_rx\n");
|
||||
pr_info("%-15s %016lX %016lX %016lX\n", netdev->name,
|
||||
netdev->state, netdev->trans_start, netdev->last_rx);
|
||||
netdev->state, dev_trans_start(netdev), netdev->last_rx);
|
||||
}
|
||||
|
||||
/* Print Registers */
|
||||
|
@@ -608,7 +608,7 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
|
||||
pr_info("%-15s %016lX %016lX %016lX\n",
|
||||
netdev->name,
|
||||
netdev->state,
|
||||
netdev->trans_start,
|
||||
dev_trans_start(netdev),
|
||||
netdev->last_rx);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user