aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunvnet.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-09-19 05:48:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-22 17:00:09 -0400
commit5ee2124524aa65cc48fcf0b498d4ef036d2c9ee5 (patch)
tree3f993b2d0e1c79221695cf4e8ea3633442be329a /drivers/net/sunvnet.c
parent051b982bcc620695de629d29c333c95b66e9b95e (diff)
drivers/net: remove duplicate structure field initialization
The definitions of vnet_ops and ehea_netdev_ops have initializations of a local function and eth_change_mtu for their respective ndo_change_mtu fields. This change uses only the local function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier I, s, fld; position p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @s@ identifier I, s, r.fld; position r.p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @script:python@ p0 << r.p0; fld << r.fld; ps << s.p; pr << r.p; @@ if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column): cocci.print_main(fld,p0) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sunvnet.c')
-rw-r--r--drivers/net/sunvnet.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
index f1e5e4542c2a..bc74db0d12f3 100644
--- a/drivers/net/sunvnet.c
+++ b/drivers/net/sunvnet.c
@@ -1016,7 +1016,6 @@ static const struct net_device_ops vnet_ops = {
1016 .ndo_open = vnet_open, 1016 .ndo_open = vnet_open,
1017 .ndo_stop = vnet_close, 1017 .ndo_stop = vnet_close,
1018 .ndo_set_multicast_list = vnet_set_rx_mode, 1018 .ndo_set_multicast_list = vnet_set_rx_mode,
1019 .ndo_change_mtu = eth_change_mtu,
1020 .ndo_set_mac_address = vnet_set_mac_addr, 1019 .ndo_set_mac_address = vnet_set_mac_addr,
1021 .ndo_validate_addr = eth_validate_addr, 1020 .ndo_validate_addr = eth_validate_addr,
1022 .ndo_tx_timeout = vnet_tx_timeout, 1021 .ndo_tx_timeout = vnet_tx_timeout,