Thread (25 messages) flat view 25 messages, 6 authors, 2016-06-22

Re: [patch net-next v4 3/4] net: core: add SW stats to if_stats_msg

From: David Miller <davem@davemloft.net>
Date: 2016-06-17 00:20:50

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 16 Jun 2016 10:37:16 +0200
quoted hunk ↗ jump to hunk
@@ -1068,6 +1068,11 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
 	return 0;
 }
 
+static void copy_rtnl_link_stats64(void *v, const struct rtnl_link_stats64 *b)
+{
+	memcpy(v, b, sizeof(*b));
+}
 ...
+	struct rtnl_link_stats64 *stats64_sp = NULL;
+	struct rtnl_link_stats64 *sp;
 ...
+				copy_rtnl_link_stats64(sp, stats64_sp);
I don't see any reason why copy_rtnl_link_stats64's first argument should be
"void *".  Please make it "struct rtnl_link_stats64 *".

In fact just doing a straight memcpy() inline is probably the best, there are
no special typing nor casting requirements here.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help