Skip to content

Commit a18c4bc

Browse files
author
Paul Gortmaker
committed
tipc: rename struct link* to struct tipc_link*
This converts the following: struct link -> struct tipc_link struct link_req -> struct tipc_link_req struct link_name -> struct tipc_link_name Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent 7f9ab6a commit a18c4bc

File tree

10 files changed

+156
-146
lines changed

10 files changed

+156
-146
lines changed

net/tipc/bcast.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct tipc_bcbearer {
9494
*/
9595

9696
struct tipc_bclink {
97-
struct link link;
97+
struct tipc_link link;
9898
struct tipc_node node;
9999
struct tipc_node_map bcast_nodes;
100100
struct tipc_node *retransmit_to;
@@ -105,7 +105,7 @@ static struct tipc_bclink bcast_link;
105105

106106
static struct tipc_bcbearer *bcbearer = &bcast_bearer;
107107
static struct tipc_bclink *bclink = &bcast_link;
108-
static struct link *bcl = &bcast_link.link;
108+
static struct tipc_link *bcl = &bcast_link.link;
109109

110110
static DEFINE_SPINLOCK(bc_lock);
111111

@@ -308,7 +308,7 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
308308

309309
static void bclink_send_ack(struct tipc_node *n_ptr)
310310
{
311-
struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1];
311+
struct tipc_link *l_ptr = n_ptr->active_links[n_ptr->addr & 1];
312312

313313
if (l_ptr != NULL)
314314
tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);

net/tipc/bearer.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest)
318318
static int bearer_push(struct tipc_bearer *b_ptr)
319319
{
320320
u32 res = 0;
321-
struct link *ln, *tln;
321+
struct tipc_link *ln, *tln;
322322

323323
if (b_ptr->blocked)
324324
return 0;
@@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr)
364364
* bearer.lock is busy
365365
*/
366366

367-
static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link *l_ptr)
367+
static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr,
368+
struct tipc_link *l_ptr)
368369
{
369370
list_move_tail(&l_ptr->link_list, &b_ptr->cong_links);
370371
}
@@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link
377378
* bearer.lock is free
378379
*/
379380

380-
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
381+
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
381382
{
382383
spin_lock_bh(&b_ptr->lock);
383384
tipc_bearer_schedule_unlocked(b_ptr, l_ptr);
@@ -390,7 +391,8 @@ void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
390391
* and if there is, try to resolve it before returning.
391392
* 'tipc_net_lock' is read_locked when this function is called
392393
*/
393-
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr)
394+
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
395+
struct tipc_link *l_ptr)
394396
{
395397
int res = 1;
396398

@@ -409,7 +411,7 @@ int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr
409411
* tipc_bearer_congested - determines if bearer is currently congested
410412
*/
411413

412-
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr)
414+
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
413415
{
414416
if (unlikely(b_ptr->blocked))
415417
return 1;
@@ -544,8 +546,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
544546
int tipc_block_bearer(const char *name)
545547
{
546548
struct tipc_bearer *b_ptr = NULL;
547-
struct link *l_ptr;
548-
struct link *temp_l_ptr;
549+
struct tipc_link *l_ptr;
550+
struct tipc_link *temp_l_ptr;
549551

550552
read_lock_bh(&tipc_net_lock);
551553
b_ptr = tipc_bearer_find(name);
@@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name)
579581

580582
static void bearer_disable(struct tipc_bearer *b_ptr)
581583
{
582-
struct link *l_ptr;
583-
struct link *temp_l_ptr;
584+
struct tipc_link *l_ptr;
585+
struct tipc_link *temp_l_ptr;
584586

585587
info("Disabling bearer <%s>\n", b_ptr->name);
586588
spin_lock_bh(&b_ptr->lock);

net/tipc/bearer.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct tipc_bearer {
144144
u32 window;
145145
u32 tolerance;
146146
u32 identity;
147-
struct link_req *link_req;
147+
struct tipc_link_req *link_req;
148148
struct list_head links;
149149
struct list_head cong_links;
150150
int active;
@@ -157,7 +157,7 @@ struct bearer_name {
157157
char if_name[TIPC_MAX_IF_NAME];
158158
};
159159

160-
struct link;
160+
struct tipc_link;
161161

162162
extern struct tipc_bearer tipc_bearers[];
163163

@@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void);
188188
struct sk_buff *tipc_bearer_get_names(void);
189189
void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest);
190190
void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest);
191-
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr);
191+
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
192192
struct tipc_bearer *tipc_bearer_find(const char *name);
193193
struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
194194
struct tipc_media *tipc_media_find(const char *name);
195-
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr);
196-
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr);
195+
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
196+
struct tipc_link *l_ptr);
197+
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
197198
void tipc_bearer_stop(void);
198199
void tipc_bearer_lock_push(struct tipc_bearer *b_ptr);
199200

net/tipc/discover.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646

4747
/**
48-
* struct link_req - information about an ongoing link setup request
48+
* struct tipc_link_req - information about an ongoing link setup request
4949
* @bearer: bearer issuing requests
5050
* @dest: destination address for request messages
5151
* @domain: network domain to which links can be established
@@ -54,7 +54,7 @@
5454
* @timer: timer governing period between requests
5555
* @timer_intv: current interval between requests (in ms)
5656
*/
57-
struct link_req {
57+
struct tipc_link_req {
5858
struct tipc_bearer *bearer;
5959
struct tipc_media_addr dest;
6060
u32 domain;
@@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr,
120120
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
121121
{
122122
struct tipc_node *n_ptr;
123-
struct link *link;
123+
struct tipc_link *link;
124124
struct tipc_media_addr media_addr, *addr;
125125
struct sk_buff *rbuf;
126126
struct tipc_msg *msg = buf_msg(buf);
@@ -218,7 +218,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
218218
* and is either not currently searching or is searching at a slow rate
219219
*/
220220

221-
static void disc_update(struct link_req *req)
221+
static void disc_update(struct tipc_link_req *req)
222222
{
223223
if (!req->num_nodes) {
224224
if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) ||
@@ -234,7 +234,7 @@ static void disc_update(struct link_req *req)
234234
* @req: ptr to link request structure
235235
*/
236236

237-
void tipc_disc_add_dest(struct link_req *req)
237+
void tipc_disc_add_dest(struct tipc_link_req *req)
238238
{
239239
req->num_nodes++;
240240
}
@@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req)
244244
* @req: ptr to link request structure
245245
*/
246246

247-
void tipc_disc_remove_dest(struct link_req *req)
247+
void tipc_disc_remove_dest(struct tipc_link_req *req)
248248
{
249249
req->num_nodes--;
250250
disc_update(req);
@@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req)
255255
* @req: ptr to link request structure
256256
*/
257257

258-
static void disc_send_msg(struct link_req *req)
258+
static void disc_send_msg(struct tipc_link_req *req)
259259
{
260260
if (!req->bearer->blocked)
261261
tipc_bearer_send(req->bearer, req->buf, &req->dest);
@@ -268,7 +268,7 @@ static void disc_send_msg(struct link_req *req)
268268
* Called whenever a link setup request timer associated with a bearer expires.
269269
*/
270270

271-
static void disc_timeout(struct link_req *req)
271+
static void disc_timeout(struct tipc_link_req *req)
272272
{
273273
int max_delay;
274274

@@ -316,7 +316,7 @@ static void disc_timeout(struct link_req *req)
316316
int tipc_disc_create(struct tipc_bearer *b_ptr,
317317
struct tipc_media_addr *dest, u32 dest_domain)
318318
{
319-
struct link_req *req;
319+
struct tipc_link_req *req;
320320

321321
req = kmalloc(sizeof(*req), GFP_ATOMIC);
322322
if (!req)
@@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr,
345345
* @req: ptr to link request structure
346346
*/
347347

348-
void tipc_disc_delete(struct link_req *req)
348+
void tipc_disc_delete(struct tipc_link_req *req)
349349
{
350350
k_cancel_timer(&req->timer);
351351
k_term_timer(&req->timer);

net/tipc/discover.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
#ifndef _TIPC_DISCOVER_H
3838
#define _TIPC_DISCOVER_H
3939

40-
struct link_req;
40+
struct tipc_link_req;
4141

4242
int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest,
4343
u32 dest_domain);
44-
void tipc_disc_delete(struct link_req *req);
45-
void tipc_disc_add_dest(struct link_req *req);
46-
void tipc_disc_remove_dest(struct link_req *req);
44+
void tipc_disc_delete(struct tipc_link_req *req);
45+
void tipc_disc_add_dest(struct tipc_link_req *req);
46+
void tipc_disc_remove_dest(struct tipc_link_req *req);
4747
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr);
4848

4949
#endif

0 commit comments

Comments
 (0)