* [PATCH net-next] e1000: Omit private ndo_get_stats function
@ 2017-02-15 11:08 Tobias Klauser
2017-03-23 0:11 ` Brown, Aaron F
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2017-02-15 11:08 UTC (permalink / raw)
To: netdev; +Cc: Jeff Kirsher, intel-wired-lan, Joe Perches
e1000_get_stats() just returns dev->stats so we can leave it
out altogether and let dev_get_stats() do the job.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 93fc6c67306b..bd8b05fe8258 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -131,7 +131,6 @@ static void e1000_watchdog(struct work_struct *work);
static void e1000_82547_tx_fifo_stall_task(struct work_struct *work);
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
struct net_device *netdev);
-static struct net_device_stats *e1000_get_stats(struct net_device *netdev);
static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
static int e1000_set_mac(struct net_device *netdev, void *p);
static irqreturn_t e1000_intr(int irq, void *data);
@@ -846,7 +845,6 @@ static const struct net_device_ops e1000_netdev_ops = {
.ndo_open = e1000_open,
.ndo_stop = e1000_close,
.ndo_start_xmit = e1000_xmit_frame,
- .ndo_get_stats = e1000_get_stats,
.ndo_set_rx_mode = e1000_set_rx_mode,
.ndo_set_mac_address = e1000_set_mac,
.ndo_tx_timeout = e1000_tx_timeout,
@@ -3530,19 +3528,6 @@ static void e1000_reset_task(struct work_struct *work)
}
/**
- * e1000_get_stats - Get System Network Statistics
- * @netdev: network interface device structure
- *
- * Returns the address of the device statistics structure.
- * The statistics are actually updated from the watchdog.
- **/
-static struct net_device_stats *e1000_get_stats(struct net_device *netdev)
-{
- /* only return the current stats */
- return &netdev->stats;
-}
-
-/**
* e1000_change_mtu - Change the Maximum Transfer Unit
* @netdev: network interface device structure
* @new_mtu: new value for maximum frame size
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH net-next] e1000: Omit private ndo_get_stats function
2017-02-15 11:08 [PATCH net-next] e1000: Omit private ndo_get_stats function Tobias Klauser
@ 2017-03-23 0:11 ` Brown, Aaron F
0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2017-03-23 0:11 UTC (permalink / raw)
To: Tobias Klauser, netdev; +Cc: Kirsher, Jeffrey T, intel-wired-lan, Joe Perches
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Tobias Klauser
> Sent: Wednesday, February 15, 2017 3:08 AM
> To: netdev@vger.kernel.org
> Cc: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; intel-wired-
> lan@lists.osuosl.org; Joe Perches <joe@perches.com>
> Subject: [PATCH net-next] e1000: Omit private ndo_get_stats function
>
> e1000_get_stats() just returns dev->stats so we can leave it
> out altogether and let dev_get_stats() do the job.
>
> Suggested-by: Joe Perches <joe@perches.com>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> drivers/net/ethernet/intel/e1000/e1000_main.c | 15 ---------------
> 1 file changed, 15 deletions(-)
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-23 0:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 11:08 [PATCH net-next] e1000: Omit private ndo_get_stats function Tobias Klauser
2017-03-23 0:11 ` Brown, Aaron F
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).