Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/net/wan: delete unneeded call to netdev_priv

Netdev_priv is an accessor function, and has no purpose if its result is
not used.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ local idexpression x; @@
-x = netdev_priv(...);
... when != x
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julia Lawall and committed by
David S. Miller
7077f22f dab531b4

-4
-4
drivers/net/wan/sdla.c
··· 1322 1322 1323 1323 static int sdla_change_mtu(struct net_device *dev, int new_mtu) 1324 1324 { 1325 - struct frad_local *flp; 1326 - 1327 - flp = netdev_priv(dev); 1328 - 1329 1325 if (netif_running(dev)) 1330 1326 return -EBUSY; 1331 1327