diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-01-21 12:27:26 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-23 15:58:49 -0500 |
commit | 30bd2f52e56ea35028cf1d13c21484918b6ff22d (patch) | |
tree | 8b5a7360e8002c704014601afff0c37eeab0c4fb /include/uapi/xen | |
parent | 4404323c6ac256c2a11d86fda65fbdb7d198ff8c (diff) |
net: moxa: constify net_device_ops structures
Declare net_device_ops structure as const as it is only stored in
the netdev_ops field of a net_device structure. This field is of type
const, so net_device_ops structures having same properties can be made
const too.
Done using Coccinelle:
@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct net_device_ops i@p={...};
@ok1@
identifier r1.i;
position p;
struct net_device ndev;
@@
ndev.netdev_ops=&i@p
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct net_device_ops i;
File size before:
text data bss dec hex filename
4821 744 0 5565 15bd ethernet/moxa/moxart_ether.o
File size after:
text data bss dec hex filename
5373 192 0 5565 15bd ethernet/moxa/moxart_ether.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/xen')
0 files changed, 0 insertions, 0 deletions