aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index bbdca3beaaf9..f638863b0d74 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -157,13 +157,13 @@ static void link_print(struct link *l_ptr, struct print_buf *buf,
157 } \ 157 } \
158} while (0) 158} while (0)
159 159
160static inline void dbg_print_link(struct link *l_ptr, const char *str) 160static void dbg_print_link(struct link *l_ptr, const char *str)
161{ 161{
162 if (DBG_OUTPUT) 162 if (DBG_OUTPUT)
163 link_print(l_ptr, DBG_OUTPUT, str); 163 link_print(l_ptr, DBG_OUTPUT, str);
164} 164}
165 165
166static inline void dbg_print_buf_chain(struct sk_buff *root_buf) 166static void dbg_print_buf_chain(struct sk_buff *root_buf)
167{ 167{
168 if (DBG_OUTPUT) { 168 if (DBG_OUTPUT) {
169 struct sk_buff *buf = root_buf; 169 struct sk_buff *buf = root_buf;
@@ -176,50 +176,50 @@ static inline void dbg_print_buf_chain(struct sk_buff *root_buf)
176} 176}
177 177
178/* 178/*
179 * Simple inlined link routines 179 * Simple link routines
180 */ 180 */
181 181
182static inline unsigned int align(unsigned int i) 182static unsigned int align(unsigned int i)
183{ 183{
184 return (i + 3) & ~3u; 184 return (i + 3) & ~3u;
185} 185}
186 186
187static inline int link_working_working(struct link *l_ptr) 187static int link_working_working(struct link *l_ptr)
188{ 188{
189 return (l_ptr->state == WORKING_WORKING); 189 return (l_ptr->state == WORKING_WORKING);
190} 190}
191 191
192static inline int link_working_unknown(struct link *l_ptr) 192static int link_working_unknown(struct link *l_ptr)
193{ 193{
194 return (l_ptr->state == WORKING_UNKNOWN); 194 return (l_ptr->state == WORKING_UNKNOWN);
195} 195}
196 196
197static inline int link_reset_unknown(struct link *l_ptr) 197static int link_reset_unknown(struct link *l_ptr)
198{ 198{
199 return (l_ptr->state == RESET_UNKNOWN); 199 return (l_ptr->state == RESET_UNKNOWN);
200} 200}
201 201
202static inline int link_reset_reset(struct link *l_ptr) 202static int link_reset_reset(struct link *l_ptr)
203{ 203{
204 return (l_ptr->state == RESET_RESET); 204 return (l_ptr->state == RESET_RESET);
205} 205}
206 206
207static inline int link_blocked(struct link *l_ptr) 207static int link_blocked(struct link *l_ptr)
208{ 208{
209 return (l_ptr->exp_msg_count || l_ptr->blocked); 209 return (l_ptr->exp_msg_count || l_ptr->blocked);
210} 210}
211 211
212static inline int link_congested(struct link *l_ptr) 212static int link_congested(struct link *l_ptr)
213{ 213{
214 return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]); 214 return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]);
215} 215}
216 216
217static inline u32 link_max_pkt(struct link *l_ptr) 217static u32 link_max_pkt(struct link *l_ptr)
218{ 218{
219 return l_ptr->max_pkt; 219 return l_ptr->max_pkt;
220} 220}
221 221
222static inline void link_init_max_pkt(struct link *l_ptr) 222static void link_init_max_pkt(struct link *l_ptr)
223{ 223{
224 u32 max_pkt; 224 u32 max_pkt;
225 225
@@ -236,20 +236,20 @@ static inline void link_init_max_pkt(struct link *l_ptr)
236 l_ptr->max_pkt_probes = 0; 236 l_ptr->max_pkt_probes = 0;
237} 237}
238 238
239static inline u32 link_next_sent(struct link *l_ptr) 239static u32 link_next_sent(struct link *l_ptr)
240{ 240{
241 if (l_ptr->next_out) 241 if (l_ptr->next_out)
242 return msg_seqno(buf_msg(l_ptr->next_out)); 242 return msg_seqno(buf_msg(l_ptr->next_out));
243 return mod(l_ptr->next_out_no); 243 return mod(l_ptr->next_out_no);
244} 244}
245 245
246static inline u32 link_last_sent(struct link *l_ptr) 246static u32 link_last_sent(struct link *l_ptr)
247{ 247{
248 return mod(link_next_sent(l_ptr) - 1); 248 return mod(link_next_sent(l_ptr) - 1);
249} 249}
250 250
251/* 251/*
252 * Simple non-inlined link routines (i.e. referenced outside this file) 252 * Simple non-static link routines (i.e. referenced outside this file)
253 */ 253 */
254 254
255int tipc_link_is_up(struct link *l_ptr) 255int tipc_link_is_up(struct link *l_ptr)
@@ -396,7 +396,7 @@ static void link_timeout(struct link *l_ptr)
396 tipc_node_unlock(l_ptr->owner); 396 tipc_node_unlock(l_ptr->owner);
397} 397}
398 398
399static inline void link_set_timer(struct link *l_ptr, u32 time) 399static void link_set_timer(struct link *l_ptr, u32 time)
400{ 400{
401 k_start_timer(&l_ptr->timer, time); 401 k_start_timer(&l_ptr->timer, time);
402} 402}
@@ -1004,9 +1004,9 @@ static int link_bundle_buf(struct link *l_ptr,
1004 return 1; 1004 return 1;
1005} 1005}
1006 1006
1007static inline void link_add_to_outqueue(struct link *l_ptr, 1007static void link_add_to_outqueue(struct link *l_ptr,
1008 struct sk_buff *buf, 1008 struct sk_buff *buf,
1009 struct tipc_msg *msg) 1009 struct tipc_msg *msg)
1010{ 1010{
1011 u32 ack = mod(l_ptr->next_in_no - 1); 1011 u32 ack = mod(l_ptr->next_in_no - 1);
1012 u32 seqno = mod(l_ptr->next_out_no++); 1012 u32 seqno = mod(l_ptr->next_out_no++);
@@ -1156,8 +1156,8 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
1156 * Link is locked. Returns user data length. 1156 * Link is locked. Returns user data length.
1157 */ 1157 */
1158 1158
1159static inline int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, 1159static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,
1160 u32 *used_max_pkt) 1160 u32 *used_max_pkt)
1161{ 1161{
1162 struct tipc_msg *msg = buf_msg(buf); 1162 struct tipc_msg *msg = buf_msg(buf);
1163 int res = msg_data_sz(msg); 1163 int res = msg_data_sz(msg);
@@ -2539,42 +2539,42 @@ exit:
2539 * pending message. This makes dynamic memory allocation unecessary. 2539 * pending message. This makes dynamic memory allocation unecessary.
2540 */ 2540 */
2541 2541
2542static inline u32 get_long_msg_seqno(struct sk_buff *buf) 2542static u32 get_long_msg_seqno(struct sk_buff *buf)
2543{ 2543{
2544 return msg_seqno(buf_msg(buf)); 2544 return msg_seqno(buf_msg(buf));
2545} 2545}
2546 2546
2547static inline void set_long_msg_seqno(struct sk_buff *buf, u32 seqno) 2547static void set_long_msg_seqno(struct sk_buff *buf, u32 seqno)
2548{ 2548{
2549 msg_set_seqno(buf_msg(buf), seqno); 2549 msg_set_seqno(buf_msg(buf), seqno);
2550} 2550}
2551 2551
2552static inline u32 get_fragm_size(struct sk_buff *buf) 2552static u32 get_fragm_size(struct sk_buff *buf)
2553{ 2553{
2554 return msg_ack(buf_msg(buf)); 2554 return msg_ack(buf_msg(buf));
2555} 2555}
2556 2556
2557static inline void set_fragm_size(struct sk_buff *buf, u32 sz) 2557static void set_fragm_size(struct sk_buff *buf, u32 sz)
2558{ 2558{
2559 msg_set_ack(buf_msg(buf), sz); 2559 msg_set_ack(buf_msg(buf), sz);
2560} 2560}
2561 2561
2562static inline u32 get_expected_frags(struct sk_buff *buf) 2562static u32 get_expected_frags(struct sk_buff *buf)
2563{ 2563{
2564 return msg_bcast_ack(buf_msg(buf)); 2564 return msg_bcast_ack(buf_msg(buf));
2565} 2565}
2566 2566
2567static inline void set_expected_frags(struct sk_buff *buf, u32 exp) 2567static void set_expected_frags(struct sk_buff *buf, u32 exp)
2568{ 2568{
2569 msg_set_bcast_ack(buf_msg(buf), exp); 2569 msg_set_bcast_ack(buf_msg(buf), exp);
2570} 2570}
2571 2571
2572static inline u32 get_timer_cnt(struct sk_buff *buf) 2572static u32 get_timer_cnt(struct sk_buff *buf)
2573{ 2573{
2574 return msg_reroute_cnt(buf_msg(buf)); 2574 return msg_reroute_cnt(buf_msg(buf));
2575} 2575}
2576 2576
2577static inline void incr_timer_cnt(struct sk_buff *buf) 2577static void incr_timer_cnt(struct sk_buff *buf)
2578{ 2578{
2579 msg_incr_reroute_cnt(buf_msg(buf)); 2579 msg_incr_reroute_cnt(buf_msg(buf));
2580} 2580}