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: Jiri Pirko <jiri@resnulli.us>
Date: 2016-06-17 07:32:52

Fri, Jun 17, 2016 at 02:20:48AM CEST, davem@davemloft.net wrote:
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 16 Jun 2016 10:37:16 +0200
quoted
@@ -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));
+}
...
quoted
+	struct rtnl_link_stats64 *stats64_sp = NULL;
+	struct rtnl_link_stats64 *sp;
...
quoted
+				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.
Will do. 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