1
0
Fork 0
alistair23-linux/drivers/net/ethernet/broadcom
Julia Lawall 70591ab96e net: bcmgenet: constify ethtool_ops structures
Check for ethtool_ops structures that are only stored in the ethtool_ops
field of a net_device structure or passed as the second argument to
netdev_set_default_ethtool_ops.  These contexts are declared const, so
ethtool_ops structures that have these properties can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct ethtool_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-31 09:22:30 -07:00
..
bnx2x bnx2x: Don't flush multicast MACs 2016-08-24 09:45:20 -07:00
bnxt bnxt_en: Add new NPAR and dual media device IDs. 2016-07-25 21:43:31 -07:00
genet net: bcmgenet: constify ethtool_ops structures 2016-08-31 09:22:30 -07:00
Kconfig net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
Makefile net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
b44.c phy: Add API for {un}registering an mdio device to a bus. 2016-01-07 14:31:26 -05:00
b44.h b44: Utilize BRCM_PSEUDO_PHY_ADDR 2015-06-10 23:33:58 -07:00
bcm63xx_enet.c net: bcm63xx: avoid possible null pointer dereference 2016-08-01 13:32:51 -07:00
bcm63xx_enet.h bcm63xx_enet: add support Broadcom BCM6345 Ethernet 2013-06-13 17:22:08 -07:00
bcmsysport.c net: systemport: Fix ordering in intrl2_*_mask_clear macro 2016-08-25 16:52:44 -07:00
bcmsysport.h net: ethernet: bcmsysport: use phydev from struct net_device 2016-06-19 16:15:55 -07:00
bgmac-bcma-mdio.c net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
bgmac-bcma.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-30 00:54:02 -04:00
bgmac-platform.c net: ethernet: bgmac: Remove redundant dev_err call in bgmac_probe() 2016-07-13 18:07:56 -07:00
bgmac.c net: bgmac: make it clear when setting interface type to RMII 2016-08-18 23:36:07 -07:00
bgmac.h net: bgmac: support Ethernet core on BCM53573 SoCs 2016-08-18 23:36:07 -07:00
bnx2.c BNX2: free temp_stats_blk on error path 2015-10-12 19:33:46 -07:00
bnx2.h BNX2: fix a Null Pointer for stats_blk 2015-10-11 05:06:21 -07:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
cnic.c cnic: call cp->stop_hw() in cnic_start_hw() on allocation failure 2016-05-06 15:44:54 -04:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
sb1250-mac.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
tg3.c tg3: Report the correct number of RSS queues through tg3_get_rxnfc 2016-08-03 11:56:18 -07:00
tg3.h mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00