Thread (8 messages) flat view 8 messages, 3 authors, 2020-12-12

Re: [PATCH v5 1/2] net: dsa: add optional stats64 support

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-12-12 17:24:06
Also in: linux-mips, lkml

On Fri, 11 Dec 2020 11:53:21 +0100 Oleksij Rempel wrote:
+static void dsa_slave_get_stats64(struct net_device *dev,
+				  struct rtnl_link_stats64 *s)
+{
+	struct dsa_port *dp = dsa_slave_to_port(dev);
+	struct dsa_switch *ds = dp->ds;
+
+	if (!ds->ops->get_stats64)
+		return dev_get_tstats64(dev, s);
+
+	return ds->ops->get_stats64(ds, dp->index, s);
nit: please don't return void, "else" will do just fine here
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help