IB: Use DEFINE_SPINLOCK() for static spinlocks
authorRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:24:23 +0000 (20:24 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:24:23 +0000 (20:24 -0700)
commit6276e08a9bdf645b71a092fb4530baf4f6c4c6eb
treed9132ced4e91d02230df2ee4d0cef5a89ec2c477
parente07cccf4046978df10f2e13fe2b99b2f9b3a65db
IB: Use DEFINE_SPINLOCK() for static spinlocks

Rather than just defining static spinlock_t variables and then
initializing them later in init functions, simply define them with
DEFINE_SPINLOCK() and remove the calls to spin_lock_init().  This cleans
up the source a tad and also shrinks the compiled code; eg on x86-64:

add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-40 (-40)
function                                     old     new   delta
ib_uverbs_init                               336     326     -10
ib_mad_init_module                           147     137     -10
ib_sa_init                                   123     103     -20

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/mad.c
drivers/infiniband/core/sa_query.c
drivers/infiniband/core/uverbs_main.c