diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:25:21 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:20:15 -0500 |
commit | c43072852649d8382b81237ce51195bcec36f24a (patch) | |
tree | 5e55d65bd4d1db35418d2990310bd2c765d60405 /net/tipc/subscr.c | |
parent | cca5172a7ec10dfdb0b787cd8e9d5b0b8f179793 (diff) |
[NET] TIPC: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r-- | net/tipc/subscr.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index ddade7388aa0..8c01ccd3626c 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * net/tipc/subscr.c: TIPC subscription service | 2 | * net/tipc/subscr.c: TIPC subscription service |
3 | * | 3 | * |
4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, Ericsson AB |
5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
@@ -49,10 +49,10 @@ | |||
49 | * @port_ref: object reference to port used to communicate with subscriber | 49 | * @port_ref: object reference to port used to communicate with subscriber |
50 | * @swap: indicates if subscriber uses opposite endianness in its messages | 50 | * @swap: indicates if subscriber uses opposite endianness in its messages |
51 | */ | 51 | */ |
52 | 52 | ||
53 | struct subscriber { | 53 | struct subscriber { |
54 | u32 ref; | 54 | u32 ref; |
55 | spinlock_t *lock; | 55 | spinlock_t *lock; |
56 | struct list_head subscriber_list; | 56 | struct list_head subscriber_list; |
57 | struct list_head subscription_list; | 57 | struct list_head subscription_list; |
58 | u32 port_ref; | 58 | u32 port_ref; |
@@ -82,7 +82,7 @@ static struct top_srv topsrv = { 0 }; | |||
82 | * htohl - convert value to endianness used by destination | 82 | * htohl - convert value to endianness used by destination |
83 | * @in: value to convert | 83 | * @in: value to convert |
84 | * @swap: non-zero if endianness must be reversed | 84 | * @swap: non-zero if endianness must be reversed |
85 | * | 85 | * |
86 | * Returns converted value | 86 | * Returns converted value |
87 | */ | 87 | */ |
88 | 88 | ||
@@ -97,11 +97,11 @@ static u32 htohl(u32 in, int swap) | |||
97 | * subscr_send_event - send a message containing a tipc_event to the subscriber | 97 | * subscr_send_event - send a message containing a tipc_event to the subscriber |
98 | */ | 98 | */ |
99 | 99 | ||
100 | static void subscr_send_event(struct subscription *sub, | 100 | static void subscr_send_event(struct subscription *sub, |
101 | u32 found_lower, | 101 | u32 found_lower, |
102 | u32 found_upper, | 102 | u32 found_upper, |
103 | u32 event, | 103 | u32 event, |
104 | u32 port_ref, | 104 | u32 port_ref, |
105 | u32 node) | 105 | u32 node) |
106 | { | 106 | { |
107 | struct iovec msg_sect; | 107 | struct iovec msg_sect; |
@@ -123,8 +123,8 @@ static void subscr_send_event(struct subscription *sub, | |||
123 | * Returns 1 if there is overlap, otherwise 0. | 123 | * Returns 1 if there is overlap, otherwise 0. |
124 | */ | 124 | */ |
125 | 125 | ||
126 | int tipc_subscr_overlap(struct subscription *sub, | 126 | int tipc_subscr_overlap(struct subscription *sub, |
127 | u32 found_lower, | 127 | u32 found_lower, |
128 | u32 found_upper) | 128 | u32 found_upper) |
129 | 129 | ||
130 | { | 130 | { |
@@ -139,15 +139,15 @@ int tipc_subscr_overlap(struct subscription *sub, | |||
139 | 139 | ||
140 | /** | 140 | /** |
141 | * tipc_subscr_report_overlap - issue event if there is subscription overlap | 141 | * tipc_subscr_report_overlap - issue event if there is subscription overlap |
142 | * | 142 | * |
143 | * Protected by nameseq.lock in name_table.c | 143 | * Protected by nameseq.lock in name_table.c |
144 | */ | 144 | */ |
145 | 145 | ||
146 | void tipc_subscr_report_overlap(struct subscription *sub, | 146 | void tipc_subscr_report_overlap(struct subscription *sub, |
147 | u32 found_lower, | 147 | u32 found_lower, |
148 | u32 found_upper, | 148 | u32 found_upper, |
149 | u32 event, | 149 | u32 event, |
150 | u32 port_ref, | 150 | u32 port_ref, |
151 | u32 node, | 151 | u32 node, |
152 | int must) | 152 | int must) |
153 | { | 153 | { |
@@ -189,11 +189,11 @@ static void subscr_timeout(struct subscription *sub) | |||
189 | 189 | ||
190 | /* Notify subscriber of timeout, then unlink subscription */ | 190 | /* Notify subscriber of timeout, then unlink subscription */ |
191 | 191 | ||
192 | subscr_send_event(sub, | 192 | subscr_send_event(sub, |
193 | sub->evt.s.seq.lower, | 193 | sub->evt.s.seq.lower, |
194 | sub->evt.s.seq.upper, | 194 | sub->evt.s.seq.upper, |
195 | TIPC_SUBSCR_TIMEOUT, | 195 | TIPC_SUBSCR_TIMEOUT, |
196 | 0, | 196 | 0, |
197 | 0); | 197 | 0); |
198 | list_del(&sub->subscription_list); | 198 | list_del(&sub->subscription_list); |
199 | 199 | ||
@@ -221,11 +221,11 @@ static void subscr_del(struct subscription *sub) | |||
221 | 221 | ||
222 | /** | 222 | /** |
223 | * subscr_terminate - terminate communication with a subscriber | 223 | * subscr_terminate - terminate communication with a subscriber |
224 | * | 224 | * |
225 | * Called with subscriber locked. Routine must temporarily release this lock | 225 | * Called with subscriber locked. Routine must temporarily release this lock |
226 | * to enable subscription timeout routine(s) to finish without deadlocking; | 226 | * to enable subscription timeout routine(s) to finish without deadlocking; |
227 | * the lock is then reclaimed to allow caller to release it upon return. | 227 | * the lock is then reclaimed to allow caller to release it upon return. |
228 | * (This should work even in the unlikely event some other thread creates | 228 | * (This should work even in the unlikely event some other thread creates |
229 | * a new object reference in the interim that uses this lock; this routine will | 229 | * a new object reference in the interim that uses this lock; this routine will |
230 | * simply wait for it to be released, then claim it.) | 230 | * simply wait for it to be released, then claim it.) |
231 | */ | 231 | */ |
@@ -241,7 +241,7 @@ static void subscr_terminate(struct subscriber *subscriber) | |||
241 | spin_unlock_bh(subscriber->lock); | 241 | spin_unlock_bh(subscriber->lock); |
242 | 242 | ||
243 | /* Destroy any existing subscriptions for subscriber */ | 243 | /* Destroy any existing subscriptions for subscriber */ |
244 | 244 | ||
245 | list_for_each_entry_safe(sub, sub_temp, &subscriber->subscription_list, | 245 | list_for_each_entry_safe(sub, sub_temp, &subscriber->subscription_list, |
246 | subscription_list) { | 246 | subscription_list) { |
247 | if (sub->timeout != TIPC_WAIT_FOREVER) { | 247 | if (sub->timeout != TIPC_WAIT_FOREVER) { |
@@ -315,7 +315,7 @@ static void subscr_cancel(struct tipc_subscr *s, | |||
315 | 315 | ||
316 | /** | 316 | /** |
317 | * subscr_subscribe - create subscription for subscriber | 317 | * subscr_subscribe - create subscription for subscriber |
318 | * | 318 | * |
319 | * Called with subscriber locked | 319 | * Called with subscriber locked |
320 | */ | 320 | */ |
321 | 321 | ||
@@ -431,7 +431,7 @@ static void subscr_conn_msg_event(void *usr_handle, | |||
431 | subscr_terminate(subscriber); | 431 | subscr_terminate(subscriber); |
432 | else | 432 | else |
433 | subscr_subscribe((struct tipc_subscr *)data, subscriber); | 433 | subscr_subscribe((struct tipc_subscr *)data, subscriber); |
434 | 434 | ||
435 | spin_unlock_bh(subscriber_lock); | 435 | spin_unlock_bh(subscriber_lock); |
436 | } | 436 | } |
437 | 437 | ||
@@ -444,7 +444,7 @@ static void subscr_named_msg_event(void *usr_handle, | |||
444 | struct sk_buff **buf, | 444 | struct sk_buff **buf, |
445 | const unchar *data, | 445 | const unchar *data, |
446 | u32 size, | 446 | u32 size, |
447 | u32 importance, | 447 | u32 importance, |
448 | struct tipc_portid const *orig, | 448 | struct tipc_portid const *orig, |
449 | struct tipc_name_seq const *dest) | 449 | struct tipc_name_seq const *dest) |
450 | { | 450 | { |
@@ -534,22 +534,22 @@ int tipc_subscr_start(void) | |||
534 | return res; | 534 | return res; |
535 | } | 535 | } |
536 | 536 | ||
537 | res = tipc_createport(topsrv.user_ref, | 537 | res = tipc_createport(topsrv.user_ref, |
538 | NULL, | 538 | NULL, |
539 | TIPC_CRITICAL_IMPORTANCE, | 539 | TIPC_CRITICAL_IMPORTANCE, |
540 | NULL, | 540 | NULL, |
541 | NULL, | 541 | NULL, |
542 | NULL, | 542 | NULL, |
543 | NULL, | 543 | NULL, |
544 | subscr_named_msg_event, | 544 | subscr_named_msg_event, |
545 | NULL, | 545 | NULL, |
546 | NULL, | 546 | NULL, |
547 | &topsrv.setup_port); | 547 | &topsrv.setup_port); |
548 | if (res) | 548 | if (res) |
549 | goto failed; | 549 | goto failed; |
550 | 550 | ||
551 | res = tipc_nametbl_publish_rsv(topsrv.setup_port, TIPC_NODE_SCOPE, &seq); | 551 | res = tipc_nametbl_publish_rsv(topsrv.setup_port, TIPC_NODE_SCOPE, &seq); |
552 | if (res) | 552 | if (res) |
553 | goto failed; | 553 | goto failed; |
554 | 554 | ||
555 | spin_unlock_bh(&topsrv.lock); | 555 | spin_unlock_bh(&topsrv.lock); |
@@ -571,7 +571,7 @@ void tipc_subscr_stop(void) | |||
571 | 571 | ||
572 | if (topsrv.user_ref) { | 572 | if (topsrv.user_ref) { |
573 | tipc_deleteport(topsrv.setup_port); | 573 | tipc_deleteport(topsrv.setup_port); |
574 | list_for_each_entry_safe(subscriber, subscriber_temp, | 574 | list_for_each_entry_safe(subscriber, subscriber_temp, |
575 | &topsrv.subscriber_list, | 575 | &topsrv.subscriber_list, |
576 | subscriber_list) { | 576 | subscriber_list) { |
577 | tipc_ref_lock(subscriber->ref); | 577 | tipc_ref_lock(subscriber->ref); |