Skip to content
  • Roland Dreier's avatar
    IB: Use DEFINE_SPINLOCK() for static spinlocks · 6276e08a
    Roland Dreier authored
    
    
    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: default avatarRoland Dreier <rolandd@cisco.com>
    6276e08a