[PATCH 13/38] drivers/staging/brcm80211/brcmfmac/dhd_linux.c: delete double assignment

Greg Kroah-Hartman gregkh at suse.de
Fri Nov 12 21:41:21 UTC 2010


From: Julia Lawall <julia at diku.dk>

Delete successive assignments to the same location.  dhd_ops_virt contains
a subset of the definitions of dhd_ops_pri.

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

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia at diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index bbbe7c5..9335f02 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -2222,8 +2222,6 @@ int dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
 	ASSERT(net);
 
 	ASSERT(!net->netdev_ops);
-	net->netdev_ops = &dhd_ops_virt;
-
 	net->netdev_ops = &dhd_ops_pri;
 
 	/*
-- 
1.7.1




More information about the devel mailing list