public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: hip04: Omit private ndo_get_stats function
@ 2017-02-14 14:10 Tobias Klauser
  2017-02-14 20:03 ` David Miller
  2017-02-15 10:28 ` Joe Perches
  0 siblings, 2 replies; 5+ messages in thread
From: Tobias Klauser @ 2017-02-14 14:10 UTC (permalink / raw)
  To: netdev; +Cc: yisen.zhuang, salil.mehta

hip04_get_stats() just returns dev->stats so we can leave it
out altogether and let dev_get_stats() do the job.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/ethernet/hisilicon/hip04_eth.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index 6e50ec82b3d8..0cec06bec63e 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -701,11 +701,6 @@ static void hip04_tx_timeout_task(struct work_struct *work)
 	hip04_mac_open(priv->ndev);
 }
 
-static struct net_device_stats *hip04_get_stats(struct net_device *ndev)
-{
-	return &ndev->stats;
-}
-
 static int hip04_get_coalesce(struct net_device *netdev,
 			      struct ethtool_coalesce *ec)
 {
@@ -764,7 +759,6 @@ static const struct ethtool_ops hip04_ethtool_ops = {
 static const struct net_device_ops hip04_netdev_ops = {
 	.ndo_open		= hip04_mac_open,
 	.ndo_stop		= hip04_mac_stop,
-	.ndo_get_stats		= hip04_get_stats,
 	.ndo_start_xmit		= hip04_mac_start_xmit,
 	.ndo_set_mac_address	= hip04_set_mac_address,
 	.ndo_tx_timeout         = hip04_timeout,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-15 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 14:10 [PATCH] net: hip04: Omit private ndo_get_stats function Tobias Klauser
2017-02-14 20:03 ` David Miller
2017-02-15 10:28 ` Joe Perches
2017-02-15 10:38   ` Tobias Klauser
2017-02-15 10:51     ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox