Thread (21 messages) 21 messages, 5 authors, 2020-10-12

Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

flat view

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: 2020-10-11 20:19:08
Also in: bridge, linux-rdma, linux-usb, linux-wireless

On 11.10.2020 21:54, Stephen Hemminger wrote:
On Sun, 11 Oct 2020 21:36:43 +0200
Heiner Kallweit [off-list ref] wrote:
quoted
+void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s,
+			   struct pcpu_sw_netstats __percpu *netstats)
netstats is unmodified, should it be const?
quoted
+{
+	int cpu;
+
+	if (IS_ERR_OR_NULL(netstats))
+		return;
Any code calling this with a null pointer is broken/buggy, please don't
ignore that.
Thanks, I'll consider both points in a v2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help