summaryrefslogtreecommitdiffstats
path: root/net/dsa/master.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/master.c')
-rw-r--r--net/dsa/master.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dsa/master.c b/net/dsa/master.c
index 90e6df0351eb..9ec16b39ed15 100644
--- a/net/dsa/master.c
+++ b/net/dsa/master.c
@@ -22,7 +22,7 @@ static void dsa_master_get_ethtool_stats(struct net_device *dev,
22 int port = cpu_dp->index; 22 int port = cpu_dp->index;
23 int count = 0; 23 int count = 0;
24 24
25 if (ops && ops->get_sset_count && ops->get_ethtool_stats) { 25 if (ops->get_sset_count && ops->get_ethtool_stats) {
26 count = ops->get_sset_count(dev, ETH_SS_STATS); 26 count = ops->get_sset_count(dev, ETH_SS_STATS);
27 ops->get_ethtool_stats(dev, stats, data); 27 ops->get_ethtool_stats(dev, stats, data);
28 } 28 }
@@ -38,7 +38,7 @@ static int dsa_master_get_sset_count(struct net_device *dev, int sset)
38 struct dsa_switch *ds = cpu_dp->ds; 38 struct dsa_switch *ds = cpu_dp->ds;
39 int count = 0; 39 int count = 0;
40 40
41 if (ops && ops->get_sset_count) 41 if (ops->get_sset_count)
42 count += ops->get_sset_count(dev, sset); 42 count += ops->get_sset_count(dev, sset);
43 43
44 if (sset == ETH_SS_STATS && ds->ops->get_sset_count) 44 if (sset == ETH_SS_STATS && ds->ops->get_sset_count)
@@ -64,7 +64,7 @@ static void dsa_master_get_strings(struct net_device *dev, uint32_t stringset,
64 /* We do not want to be NULL-terminated, since this is a prefix */ 64 /* We do not want to be NULL-terminated, since this is a prefix */
65 pfx[sizeof(pfx) - 1] = '_'; 65 pfx[sizeof(pfx) - 1] = '_';
66 66
67 if (ops && ops->get_sset_count && ops->get_strings) { 67 if (ops->get_sset_count && ops->get_strings) {
68 mcount = ops->get_sset_count(dev, ETH_SS_STATS); 68 mcount = ops->get_sset_count(dev, ETH_SS_STATS);
69 ops->get_strings(dev, stringset, data); 69 ops->get_strings(dev, stringset, data);
70 } 70 }