linux_dsm_epyc7002/drivers/net/ieee802154
Bhumika Goyal e796f49d82 net: ieee802154: constify ieee802154_ops structures
Declare the structure ieee802154_ops as const as it is only passed as an
argument to the function  ieee802154_alloc_hw. This argument is of type
const struct ieee802154_ops *, so ieee80254_ops structures having this
property can be declared as const.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct ieee802154_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
ieee802154_alloc_hw(e1,&i@p)

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

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct ieee802154_ops  i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct ieee802154_ops  i;

The before and after size details of the affected files are:

   text	   data	    bss	    dec	    hex	filename
   8669	   1176	     16	   9861	   2685	drivers/net/ieee802154/adf7242.o
   8805	   1048	     16	   9869	   268d	drivers/net/ieee802154/adf7242.o

   text	   data	    bss	    dec	    hex	filename
   7211	   2296	     32	   9539	   2543	drivers/net/ieee802154/atusb.o
   7339	   2160	     32	   9531	   253b	drivers/net/ieee802154/atusb.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-21 15:46:12 -05:00
..
adf7242.c net: ieee802154: constify ieee802154_ops structures 2016-11-21 15:46:12 -05:00
at86rf230.c at86rf230: increase sleep to off timings 2016-04-20 16:17:13 +02:00
at86rf230.h at86rf230: add debugfs support 2015-09-17 13:20:05 +02:00
atusb.c net: ieee802154: constify ieee802154_ops structures 2016-11-21 15:46:12 -05:00
atusb.h ieee802154: add support for atusb transceiver 2015-05-19 11:44:45 +02:00
cc2520.c ieee802154: cc2520: Check CRC & add promiscuous 2016-01-03 09:17:42 +01:00
fakelb.c fakelb: fix schedule while atomic 2016-09-19 20:19:34 +02:00
Kconfig ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 2015-12-11 11:27:22 +01:00
Makefile ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 2015-12-11 11:27:22 +01:00
mrf24j40.c mrf24j40: avoid uninitialized byte in SPI transfer to radio. 2016-07-12 11:54:53 +02:00