linux/net/tipc
Jon Paul Maloy 5702dbab68 tipc: initiate media type array at compile time
Communication media types are abstracted through the struct 'tipc_media',
one per media type. These structs are allocated statically inside their
respective media file.

Furthermore, in order to be able to reach all instances from a central
location, we keep a static array with pointers to these structs. This
array is currently initialized at runtime, under protection of
tipc_net_lock. However, since the contents of the array itself never
changes after initialization, we can just as well initialize it at
compile time and make it 'const', at the same time making it obvious
that no lock protection is needed here.

This commit makes the array constant and removes the redundant lock
protection.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-11 00:17:42 -05:00
..
addr.c
addr.h
bcast.c tipc: remove interface state mirroring in bearer 2013-12-09 20:30:29 -05:00
bcast.h
bearer.c tipc: initiate media type array at compile time 2013-12-11 00:17:42 -05:00
bearer.h tipc: initiate media type array at compile time 2013-12-11 00:17:42 -05:00
config.c
config.h
core.c
core.h net: misc: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
discover.c tipc: remove interface state mirroring in bearer 2013-12-09 20:30:29 -05:00
discover.h
eth_media.c tipc: initiate media type array at compile time 2013-12-11 00:17:42 -05:00
handler.c
ib_media.c tipc: initiate media type array at compile time 2013-12-11 00:17:42 -05:00
Kconfig
link.c tipc: eliminate redundant code with kfree_skb_list routine 2013-12-11 00:17:42 -05:00
link.h tipc: message reassembly using fragment chain 2013-11-07 18:30:11 -05:00
log.c
Makefile
msg.c tipc: remove iovec length parameter from all sending functions 2013-10-18 13:20:42 -04:00
msg.h tipc: message reassembly using fragment chain 2013-11-07 18:30:11 -05:00
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink.c genetlink: only pass array to genl_register_family_with_ops() 2013-11-19 16:39:05 -05:00
node.c tipc: eliminate redundant code with kfree_skb_list routine 2013-12-11 00:17:42 -05:00
node.h tipc: message reassembly using fragment chain 2013-11-07 18:30:11 -05:00
node_subscr.c
node_subscr.h
port.c tipc: remove iovec length parameter from all sending functions 2013-10-18 13:20:42 -04:00
port.h tipc: remove iovec length parameter from all sending functions 2013-10-18 13:20:42 -04:00
ref.c
ref.h
server.c
server.h
socket.c net: rework recvmsg handler msg_name and msg_namelen logic 2013-11-20 21:52:30 -05:00
subscr.c
subscr.h
sysctl.c