summaryrefslogtreecommitdiff
path: root/net/tipc/node_subscr.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2013-12-11 04:45:39 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-12-11 05:17:42 (GMT)
commit5702dbab687e19792102200b085108f00ab820c9 (patch)
treea3f19fccfbaf4043d0de34a76fd476efe9219920 /net/tipc/node_subscr.h
parentd77b3831f7d59d69aa49d5d1df10bbe56671dc5d (diff)
downloadlinux-5702dbab687e19792102200b085108f00ab820c9.tar.xz
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>
Diffstat (limited to 'net/tipc/node_subscr.h')
0 files changed, 0 insertions, 0 deletions