Commit 34af946a22724c4e2b204957f2b24b22a0fb121c
Committed by
Linus Torvalds
1 parent
b6cd0b772d
Exists in
master
and in
4 other branches
[PATCH] spin/rwlock init cleanups
locking init cleanups: - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK() - convert rwlocks in a similar manner this patch was generated automatically. Motivation: - cleanliness - lockdep needs control of lock initialization, which the open-coded variants do not give - it's also useful for -rt and for lock debugging in general Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 51 changed files with 59 additions and 59 deletions Side-by-side Diff
- arch/ia64/sn/kernel/irq.c
- arch/mips/kernel/smtc.c
- arch/powerpc/platforms/cell/spufs/switch.c
- arch/powerpc/platforms/powermac/pfunc_core.c
- arch/powerpc/platforms/pseries/eeh_event.c
- arch/powerpc/sysdev/mmio_nvram.c
- arch/xtensa/kernel/time.c
- arch/xtensa/kernel/traps.c
- drivers/char/drm/drm_memory_debug.h
- drivers/char/drm/via_dmablit.c
- drivers/char/epca.c
- drivers/char/moxa.c
- drivers/char/specialix.c
- drivers/char/sx.c
- drivers/isdn/gigaset/common.c
- drivers/leds/led-core.c
- drivers/leds/led-triggers.c
- drivers/misc/ibmasm/module.c
- drivers/pcmcia/m8xx_pcmcia.c
- drivers/rapidio/rio-access.c
- drivers/rtc/rtc-sa1100.c
- drivers/rtc/rtc-vr41xx.c
- drivers/s390/block/dasd_eer.c
- drivers/scsi/libata-core.c
- drivers/sn/ioc3.c
- drivers/video/backlight/hp680_bl.c
- fs/nfsd/nfs4state.c
- fs/ocfs2/cluster/heartbeat.c
- fs/ocfs2/cluster/tcp.c
- fs/ocfs2/dlm/dlmdomain.c
- fs/ocfs2/dlm/dlmlock.c
- fs/ocfs2/dlm/dlmrecovery.c
- fs/ocfs2/dlmglue.c
- fs/ocfs2/journal.c
- include/asm-alpha/core_t2.h
- kernel/audit.c
- mm/sparse.c
- net/ipv6/route.c
- net/sunrpc/auth_gss/gss_krb5_seal.c
- net/tipc/bcast.c
- net/tipc/bearer.c
- net/tipc/config.c
- net/tipc/dbg.c
- net/tipc/handler.c
- net/tipc/name_table.c
- net/tipc/net.c
- net/tipc/node.c
- net/tipc/port.c
- net/tipc/ref.c
- net/tipc/subscr.c
- net/tipc/user_reg.c
arch/ia64/sn/kernel/irq.c
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | int sn_force_interrupt_flag = 1; |
28 | 28 | extern int sn_ioif_inited; |
29 | 29 | struct list_head **sn_irq_lh; |
30 | -static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */ | |
30 | +static DEFINE_SPINLOCK(sn_irq_info_lock); /* non-IRQ lock */ | |
31 | 31 | |
32 | 32 | u64 sn_intr_alloc(nasid_t local_nasid, int local_widget, |
33 | 33 | struct sn_irq_info *sn_irq_info, |
arch/mips/kernel/smtc.c
... | ... | @@ -367,7 +367,7 @@ |
367 | 367 | dvpe(); |
368 | 368 | dmt(); |
369 | 369 | |
370 | - freeIPIq.lock = SPIN_LOCK_UNLOCKED; | |
370 | + spin_lock_init(&freeIPIq.lock); | |
371 | 371 | |
372 | 372 | /* |
373 | 373 | * We probably don't have as many VPEs as we do SMP "CPUs", |
... | ... | @@ -375,7 +375,7 @@ |
375 | 375 | */ |
376 | 376 | for (i=0; i<NR_CPUS; i++) { |
377 | 377 | IPIQ[i].head = IPIQ[i].tail = NULL; |
378 | - IPIQ[i].lock = SPIN_LOCK_UNLOCKED; | |
378 | + spin_lock_init(&IPIQ[i].lock); | |
379 | 379 | IPIQ[i].depth = 0; |
380 | 380 | ipi_timer_latch[i] = 0; |
381 | 381 | } |
arch/powerpc/platforms/cell/spufs/switch.c
... | ... | @@ -2203,7 +2203,7 @@ |
2203 | 2203 | |
2204 | 2204 | memset(lscsa, 0, sizeof(struct spu_lscsa)); |
2205 | 2205 | csa->lscsa = lscsa; |
2206 | - csa->register_lock = SPIN_LOCK_UNLOCKED; | |
2206 | + spin_lock_init(&csa->register_lock); | |
2207 | 2207 | |
2208 | 2208 | /* Set LS pages reserved to allow for user-space mapping. */ |
2209 | 2209 | for (p = lscsa->ls; p < lscsa->ls + LS_SIZE; p += PAGE_SIZE) |
arch/powerpc/platforms/powermac/pfunc_core.c
arch/powerpc/platforms/pseries/eeh_event.c
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | */ |
36 | 36 | |
37 | 37 | /* EEH event workqueue setup. */ |
38 | -static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED; | |
38 | +static DEFINE_SPINLOCK(eeh_eventlist_lock); | |
39 | 39 | LIST_HEAD(eeh_eventlist); |
40 | 40 | static void eeh_thread_launcher(void *); |
41 | 41 | DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL); |
arch/powerpc/sysdev/mmio_nvram.c
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | |
33 | 33 | static void __iomem *mmio_nvram_start; |
34 | 34 | static long mmio_nvram_len; |
35 | -static spinlock_t mmio_nvram_lock = SPIN_LOCK_UNLOCKED; | |
35 | +static DEFINE_SPINLOCK(mmio_nvram_lock); | |
36 | 36 | |
37 | 37 | static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) |
38 | 38 | { |
arch/xtensa/kernel/time.c
arch/xtensa/kernel/traps.c
drivers/char/drm/drm_memory_debug.h
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | unsigned long bytes_freed; |
44 | 44 | } drm_mem_stats_t; |
45 | 45 | |
46 | -static spinlock_t drm_mem_lock = SPIN_LOCK_UNLOCKED; | |
46 | +static DEFINE_SPINLOCK(drm_mem_lock); | |
47 | 47 | static unsigned long drm_ram_available = 0; /* In pages */ |
48 | 48 | static unsigned long drm_ram_used = 0; |
49 | 49 | static drm_mem_stats_t drm_mem_stats[] = |
drivers/char/drm/via_dmablit.c
... | ... | @@ -557,7 +557,7 @@ |
557 | 557 | blitq->num_outstanding = 0; |
558 | 558 | blitq->is_active = 0; |
559 | 559 | blitq->aborting = 0; |
560 | - blitq->blit_lock = SPIN_LOCK_UNLOCKED; | |
560 | + spin_lock_init(&blitq->blit_lock); | |
561 | 561 | for (j=0; j<VIA_NUM_BLIT_SLOTS; ++j) { |
562 | 562 | DRM_INIT_WAITQUEUE(blitq->blit_queue + j); |
563 | 563 | } |
drivers/char/epca.c
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | /* The ISA boards do window flipping into the same spaces so its only sane |
81 | 81 | with a single lock. It's still pretty efficient */ |
82 | 82 | |
83 | -static spinlock_t epca_lock = SPIN_LOCK_UNLOCKED; | |
83 | +static DEFINE_SPINLOCK(epca_lock); | |
84 | 84 | |
85 | 85 | /* ----------------------------------------------------------------------- |
86 | 86 | MAXBOARDS is typically 12, but ISA and EISA cards are restricted to |
drivers/char/moxa.c
... | ... | @@ -301,7 +301,7 @@ |
301 | 301 | .tiocmset = moxa_tiocmset, |
302 | 302 | }; |
303 | 303 | |
304 | -static spinlock_t moxa_lock = SPIN_LOCK_UNLOCKED; | |
304 | +static DEFINE_SPINLOCK(moxa_lock); | |
305 | 305 | |
306 | 306 | #ifdef CONFIG_PCI |
307 | 307 | static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board) |
drivers/char/specialix.c
drivers/char/sx.c
drivers/isdn/gigaset/common.c
drivers/leds/led-core.c
drivers/leds/led-triggers.c
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | /* |
27 | 27 | * Nests outside led_cdev->trigger_lock |
28 | 28 | */ |
29 | -static rwlock_t triggers_list_lock = RW_LOCK_UNLOCKED; | |
29 | +static DEFINE_RWLOCK(triggers_list_lock); | |
30 | 30 | static LIST_HEAD(trigger_list); |
31 | 31 | |
32 | 32 | ssize_t led_trigger_store(struct class_device *dev, const char *buf, |
drivers/misc/ibmasm/module.c
drivers/pcmcia/m8xx_pcmcia.c
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 | |
158 | 158 | static int pcmcia_schlvl = PCMCIA_SCHLVL; |
159 | 159 | |
160 | -static spinlock_t events_lock = SPIN_LOCK_UNLOCKED; | |
160 | +static DEFINE_SPINLOCK(events_lock); | |
161 | 161 | |
162 | 162 | |
163 | 163 | #define PCMCIA_SOCKET_KEY_5V 1 |
... | ... | @@ -644,7 +644,7 @@ |
644 | 644 | }; |
645 | 645 | |
646 | 646 | static u32 pending_events[PCMCIA_SOCKETS_NO]; |
647 | -static spinlock_t pending_event_lock = SPIN_LOCK_UNLOCKED; | |
647 | +static DEFINE_SPINLOCK(pending_event_lock); | |
648 | 648 | |
649 | 649 | static irqreturn_t m8xx_interrupt(int irq, void *dev, struct pt_regs *regs) |
650 | 650 | { |
drivers/rapidio/rio-access.c
... | ... | @@ -17,8 +17,8 @@ |
17 | 17 | * These interrupt-safe spinlocks protect all accesses to RIO |
18 | 18 | * configuration space and doorbell access. |
19 | 19 | */ |
20 | -static spinlock_t rio_config_lock = SPIN_LOCK_UNLOCKED; | |
21 | -static spinlock_t rio_doorbell_lock = SPIN_LOCK_UNLOCKED; | |
20 | +static DEFINE_SPINLOCK(rio_config_lock); | |
21 | +static DEFINE_SPINLOCK(rio_doorbell_lock); | |
22 | 22 | |
23 | 23 | /* |
24 | 24 | * Wrappers for all RIO configuration access functions. They just check |
drivers/rtc/rtc-sa1100.c
drivers/rtc/rtc-vr41xx.c
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | |
94 | 94 | static unsigned long epoch = 1970; /* Jan 1 1970 00:00:00 */ |
95 | 95 | |
96 | -static spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; | |
96 | +static DEFINE_SPINLOCK(rtc_lock); | |
97 | 97 | static char rtc_name[] = "RTC"; |
98 | 98 | static unsigned long periodic_frequency; |
99 | 99 | static unsigned long periodic_count; |
drivers/s390/block/dasd_eer.c
drivers/scsi/libata-core.c
drivers/sn/ioc3.c
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | |
27 | 27 | static struct ioc3_submodule *ioc3_submodules[IOC3_MAX_SUBMODULES]; |
28 | 28 | static struct ioc3_submodule *ioc3_ethernet; |
29 | -static rwlock_t ioc3_submodules_lock = RW_LOCK_UNLOCKED; | |
29 | +static DEFINE_RWLOCK(ioc3_submodules_lock); | |
30 | 30 | |
31 | 31 | /* NIC probing code */ |
32 | 32 |
drivers/video/backlight/hp680_bl.c
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | |
28 | 28 | static int hp680bl_suspended; |
29 | 29 | static int current_intensity = 0; |
30 | -static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; | |
30 | +static DEFINE_SPINLOCK(bl_lock); | |
31 | 31 | static struct backlight_device *hp680_backlight_device; |
32 | 32 | |
33 | 33 | static void hp680bl_send_intensity(struct backlight_device *bd) |
fs/nfsd/nfs4state.c
fs/ocfs2/cluster/heartbeat.c
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | * multiple hb threads are watching multiple regions. A node is live |
55 | 55 | * whenever any of the threads sees activity from the node in its region. |
56 | 56 | */ |
57 | -static spinlock_t o2hb_live_lock = SPIN_LOCK_UNLOCKED; | |
57 | +static DEFINE_SPINLOCK(o2hb_live_lock); | |
58 | 58 | static struct list_head o2hb_live_slots[O2NM_MAX_NODES]; |
59 | 59 | static unsigned long o2hb_live_node_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; |
60 | 60 | static LIST_HEAD(o2hb_node_events); |
fs/ocfs2/cluster/tcp.c
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | ##args); \ |
109 | 109 | } while (0) |
110 | 110 | |
111 | -static rwlock_t o2net_handler_lock = RW_LOCK_UNLOCKED; | |
111 | +static DEFINE_RWLOCK(o2net_handler_lock); | |
112 | 112 | static struct rb_root o2net_handler_tree = RB_ROOT; |
113 | 113 | |
114 | 114 | static struct o2net_node o2net_nodes[O2NM_MAX_NODES]; |
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlm/dlmlock.c
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | #define MLOG_MASK_PREFIX ML_DLM |
54 | 54 | #include "cluster/masklog.h" |
55 | 55 | |
56 | -static spinlock_t dlm_cookie_lock = SPIN_LOCK_UNLOCKED; | |
56 | +static DEFINE_SPINLOCK(dlm_cookie_lock); | |
57 | 57 | static u64 dlm_next_cookie = 1; |
58 | 58 | |
59 | 59 | static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, |
fs/ocfs2/dlm/dlmrecovery.c
... | ... | @@ -98,8 +98,8 @@ |
98 | 98 | |
99 | 99 | static u64 dlm_get_next_mig_cookie(void); |
100 | 100 | |
101 | -static spinlock_t dlm_reco_state_lock = SPIN_LOCK_UNLOCKED; | |
102 | -static spinlock_t dlm_mig_cookie_lock = SPIN_LOCK_UNLOCKED; | |
101 | +static DEFINE_SPINLOCK(dlm_reco_state_lock); | |
102 | +static DEFINE_SPINLOCK(dlm_mig_cookie_lock); | |
103 | 103 | static u64 dlm_mig_cookie = 1; |
104 | 104 | |
105 | 105 | static u64 dlm_get_next_mig_cookie(void) |
fs/ocfs2/dlmglue.c
... | ... | @@ -242,7 +242,7 @@ |
242 | 242 | mlog_exit_void(); |
243 | 243 | } |
244 | 244 | |
245 | -static spinlock_t ocfs2_dlm_tracking_lock = SPIN_LOCK_UNLOCKED; | |
245 | +static DEFINE_SPINLOCK(ocfs2_dlm_tracking_lock); | |
246 | 246 | |
247 | 247 | static void ocfs2_add_lockres_tracking(struct ocfs2_lock_res *res, |
248 | 248 | struct ocfs2_dlm_debug *dlm_debug) |
fs/ocfs2/journal.c
include/asm-alpha/core_t2.h
kernel/audit.c
mm/sparse.c
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | |
46 | 46 | static int sparse_index_init(unsigned long section_nr, int nid) |
47 | 47 | { |
48 | - static spinlock_t index_init_lock = SPIN_LOCK_UNLOCKED; | |
48 | + static DEFINE_SPINLOCK(index_init_lock); | |
49 | 49 | unsigned long root = SECTION_NR_TO_ROOT(section_nr); |
50 | 50 | struct mem_section *section; |
51 | 51 | int ret = 0; |
net/ipv6/route.c
... | ... | @@ -349,7 +349,7 @@ |
349 | 349 | (strict & RT6_SELECT_F_REACHABLE) && |
350 | 350 | last && last != rt0) { |
351 | 351 | /* no entries matched; do round-robin */ |
352 | - static spinlock_t lock = SPIN_LOCK_UNLOCKED; | |
352 | + static DEFINE_SPINLOCK(lock); | |
353 | 353 | spin_lock(&lock); |
354 | 354 | *head = rt0->u.next; |
355 | 355 | rt0->u.next = last->u.next; |
net/sunrpc/auth_gss/gss_krb5_seal.c
net/tipc/bcast.c
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | static struct bcbearer *bcbearer = NULL; |
118 | 118 | static struct bclink *bclink = NULL; |
119 | 119 | static struct link *bcl = NULL; |
120 | -static spinlock_t bc_lock = SPIN_LOCK_UNLOCKED; | |
120 | +static DEFINE_SPINLOCK(bc_lock); | |
121 | 121 | |
122 | 122 | char tipc_bclink_name[] = "multicast-link"; |
123 | 123 | |
... | ... | @@ -796,7 +796,7 @@ |
796 | 796 | memset(bclink, 0, sizeof(struct bclink)); |
797 | 797 | INIT_LIST_HEAD(&bcl->waiting_ports); |
798 | 798 | bcl->next_out_no = 1; |
799 | - bclink->node.lock = SPIN_LOCK_UNLOCKED; | |
799 | + spin_lock_init(&bclink->node.lock); | |
800 | 800 | bcl->owner = &bclink->node; |
801 | 801 | bcl->max_pkt = MAX_PKT_DEFAULT_MCAST; |
802 | 802 | tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT); |
net/tipc/bearer.c
... | ... | @@ -566,7 +566,7 @@ |
566 | 566 | b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, |
567 | 567 | bcast_scope, 2); |
568 | 568 | } |
569 | - b_ptr->publ.lock = SPIN_LOCK_UNLOCKED; | |
569 | + spin_lock_init(&b_ptr->publ.lock); | |
570 | 570 | write_unlock_bh(&tipc_net_lock); |
571 | 571 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", |
572 | 572 | name, addr_string_fill(addr_string, bcast_scope), priority); |
net/tipc/config.c
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | |
64 | 64 | static struct manager mng = { 0}; |
65 | 65 | |
66 | -static spinlock_t config_lock = SPIN_LOCK_UNLOCKED; | |
66 | +static DEFINE_SPINLOCK(config_lock); | |
67 | 67 | |
68 | 68 | static const void *req_tlv_area; /* request message TLV area */ |
69 | 69 | static int req_tlv_space; /* request message TLV area size */ |
net/tipc/dbg.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | #define MAX_STRING 512 |
42 | 42 | |
43 | 43 | static char print_string[MAX_STRING]; |
44 | -static spinlock_t print_lock = SPIN_LOCK_UNLOCKED; | |
44 | +static DEFINE_SPINLOCK(print_lock); | |
45 | 45 | |
46 | 46 | static struct print_buf cons_buf = { NULL, 0, NULL, NULL }; |
47 | 47 | struct print_buf *TIPC_CONS = &cons_buf; |
net/tipc/handler.c
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | |
45 | 45 | static kmem_cache_t *tipc_queue_item_cache; |
46 | 46 | static struct list_head signal_queue_head; |
47 | -static spinlock_t qitem_lock = SPIN_LOCK_UNLOCKED; | |
47 | +static DEFINE_SPINLOCK(qitem_lock); | |
48 | 48 | static int handler_enabled = 0; |
49 | 49 | |
50 | 50 | static void process_signal_queue(unsigned long dummy); |
net/tipc/name_table.c
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | |
102 | 102 | static struct name_table table = { NULL } ; |
103 | 103 | static atomic_t rsv_publ_ok = ATOMIC_INIT(0); |
104 | -rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED; | |
104 | +DEFINE_RWLOCK(tipc_nametbl_lock); | |
105 | 105 | |
106 | 106 | |
107 | 107 | static int hash(int x) |
... | ... | @@ -172,7 +172,7 @@ |
172 | 172 | } |
173 | 173 | |
174 | 174 | memset(nseq, 0, sizeof(*nseq)); |
175 | - nseq->lock = SPIN_LOCK_UNLOCKED; | |
175 | + spin_lock_init(&nseq->lock); | |
176 | 176 | nseq->type = type; |
177 | 177 | nseq->sseqs = sseq; |
178 | 178 | dbg("tipc_nameseq_create(): nseq = %p, type %u, ssseqs %p, ff: %u\n", |
net/tipc/net.c
... | ... | @@ -115,7 +115,7 @@ |
115 | 115 | * - A local spin_lock protecting the queue of subscriber events. |
116 | 116 | */ |
117 | 117 | |
118 | -rwlock_t tipc_net_lock = RW_LOCK_UNLOCKED; | |
118 | +DEFINE_RWLOCK(tipc_net_lock); | |
119 | 119 | struct network tipc_net = { NULL }; |
120 | 120 | |
121 | 121 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref) |
net/tipc/node.c
net/tipc/port.c
... | ... | @@ -57,8 +57,8 @@ |
57 | 57 | static struct sk_buff *msg_queue_head = NULL; |
58 | 58 | static struct sk_buff *msg_queue_tail = NULL; |
59 | 59 | |
60 | -spinlock_t tipc_port_list_lock = SPIN_LOCK_UNLOCKED; | |
61 | -static spinlock_t queue_lock = SPIN_LOCK_UNLOCKED; | |
60 | +DEFINE_SPINLOCK(tipc_port_list_lock); | |
61 | +static DEFINE_SPINLOCK(queue_lock); | |
62 | 62 | |
63 | 63 | static LIST_HEAD(ports); |
64 | 64 | static void port_handle_node_down(unsigned long ref); |
net/tipc/ref.c
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | |
64 | 64 | struct ref_table tipc_ref_table = { NULL }; |
65 | 65 | |
66 | -static rwlock_t ref_table_lock = RW_LOCK_UNLOCKED; | |
66 | +static DEFINE_RWLOCK(ref_table_lock); | |
67 | 67 | |
68 | 68 | /** |
69 | 69 | * tipc_ref_table_init - create reference table for objects |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | index_mask = sz - 1; |
88 | 88 | for (i = sz - 1; i >= 0; i--) { |
89 | 89 | table[i].object = NULL; |
90 | - table[i].lock = SPIN_LOCK_UNLOCKED; | |
90 | + spin_lock_init(&table[i].lock); | |
91 | 91 | table[i].data.next_plus_upper = (start & ~index_mask) + i - 1; |
92 | 92 | } |
93 | 93 | tipc_ref_table.entries = table; |
net/tipc/subscr.c
net/tipc/user_reg.c
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | |
68 | 68 | static struct tipc_user *users = NULL; |
69 | 69 | static u32 next_free_user = MAX_USERID + 1; |
70 | -static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED; | |
70 | +static DEFINE_SPINLOCK(reg_lock); | |
71 | 71 | |
72 | 72 | /** |
73 | 73 | * reg_init - create TIPC user registry (but don't activate it) |