In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). v2: - constify argument netstats - don't ignore netstats being NULL or an ERRPTR - switch to EXPORT_SYMBOL_GPL Heiner Kallweit (12): net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats IB/hfi1: use new function dev_fetch_sw_netstats net: macsec: use new function dev_fetch_sw_netstats net: usb: qmi_wwan: use new function dev_fetch_sw_netstats net: usbnet: use new function dev_fetch_sw_netstats qtnfmac: use new function dev_fetch_sw_netstats net: bridge: use new function dev_fetch_sw_netstats net: dsa: use new function dev_fetch_sw_netstats iptunnel: use new function dev_fetch_sw_netstats mac80211: use new function dev_fetch_sw_netstats net: openvswitch: use new function dev_fetch_sw_netstats xfrm: use new function dev_fetch_sw_netstats drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +------------------ drivers/net/macsec.c | 22 +----------- drivers/net/usb/qmi_wwan.c | 24 +------------ drivers/net/usb/usbnet.c | 24 +------------ drivers/net/wireless/quantenna/qtnfmac/core.c | 27 +-------------- include/linux/netdevice.h | 2 ++ net/bridge/br_device.c | 21 +----------- net/core/dev.c | 34 +++++++++++++++++++ net/dsa/slave.c | 21 +----------- net/ipv4/ip_tunnel_core.c | 23 +------------ net/mac80211/iface.c | 23 +------------ net/openvswitch/vport-internal_dev.c | 20 +---------- net/xfrm/xfrm_interface.c | 22 +----------- 13 files changed, 47 insertions(+), 250 deletions(-) -- 2.28.0