Thread (9 messages) 9 messages, 4 authors, 2017-08-22

Re: [PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

flat view

From: Subash Abhinov Kasiviswanathan <hidden>
Date: 2017-08-22 05:34:08

quoted
+	priv = netdev_priv(rmnet_dev);
+	memset(priv, 0, sizeof(struct rmnet_priv));
Netdev private area is always zero on creation. See alloc_netdev().
quoted
+	if (!rmnet_dev)
+		return 0;
Do not confuse 0 with NULL. Did you run sparse?
quoted
+
+	priv = netdev_priv(rmnet_dev);
+	if (!priv)
+		return 0;

netdev_priv() always returns a non-NULL value.  The private area is just
a constant offset below the original network_device structure.
Hi Stephen

I havent used sparse till now. I'll fix the errors reported by it as well
your other comments and post again.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help