aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorBhumika Goyal <[email protected]>2016-11-21 20:30:14 +0000
committerDavid S. Miller <[email protected]>2016-11-21 20:46:12 +0000
commite796f49d826aadb856981c751efc086c6ce11a77 (patch)
treee89c6a2726865acaa28130f1fc62f864da472760 /net/tipc/socket.c
parentMerge branch 'geneve-lwt-efficiency' (diff)
downloadkernel-e796f49d826aadb856981c751efc086c6ce11a77.tar.gz
kernel-e796f49d826aadb856981c751efc086c6ce11a77.zip
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 <[email protected]> Acked-by: Stefan Schmidt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tipc/socket.c')
0 files changed, 0 insertions, 0 deletions