From 327cdedaf6e6334aeb219df5a68da5e6906ee72e Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 15 Feb 2014 08:36:13 +0100 Subject: caif: delete unnecessary field initialization On success, the function netdev_alloc_skb initializes the dev field of its result to its first argument, so this doesn't have to be done in the calling context. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression skb,privn,e; @@ skb = netdev_alloc_skb(privn,...); ... when strict ( -skb->dev = privn; | ?skb = e ) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- drivers/net/caif/caif_spi.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/net/caif/caif_spi.c') diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c index 155db68e13ba..ff54c0eb2052 100644 --- a/drivers/net/caif/caif_spi.c +++ b/drivers/net/caif/caif_spi.c @@ -554,7 +554,6 @@ int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len) skb->protocol = htons(ETH_P_CAIF); skb_reset_mac_header(skb); - skb->dev = cfspi->ndev; /* * Push received packet up the stack. -- cgit v1.2.3