Skip to content

Commit

Permalink
tipc: rename struct link* to struct tipc_link*
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Gortmaker committed Dec 30, 2011
1 parent 7f9ab6a commit a18c4bc
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 146 deletions.
6 changes: 3 additions & 3 deletions net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct tipc_bcbearer {
*/

struct tipc_bclink {
struct link link;
struct tipc_link link;
struct tipc_node node;
struct tipc_node_map bcast_nodes;
struct tipc_node *retransmit_to;
Expand All @@ -105,7 +105,7 @@ static struct tipc_bclink bcast_link;

static struct tipc_bcbearer *bcbearer = &bcast_bearer;
static struct tipc_bclink *bclink = &bcast_link;
static struct link *bcl = &bcast_link.link;
static struct tipc_link *bcl = &bcast_link.link;

static DEFINE_SPINLOCK(bc_lock);

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

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

if (l_ptr != NULL)
tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);
Expand Down
20 changes: 11 additions & 9 deletions net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest)
static int bearer_push(struct tipc_bearer *b_ptr)
{
u32 res = 0;
struct link *ln, *tln;
struct tipc_link *ln, *tln;

if (b_ptr->blocked)
return 0;
Expand Down Expand Up @@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr)
* bearer.lock is busy
*/

static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link *l_ptr)
static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr,
struct tipc_link *l_ptr)
{
list_move_tail(&l_ptr->link_list, &b_ptr->cong_links);
}
Expand All @@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link
* bearer.lock is free
*/

void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
{
spin_lock_bh(&b_ptr->lock);
tipc_bearer_schedule_unlocked(b_ptr, l_ptr);
Expand All @@ -390,7 +391,8 @@ void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
* and if there is, try to resolve it before returning.
* 'tipc_net_lock' is read_locked when this function is called
*/
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr)
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
struct tipc_link *l_ptr)
{
int res = 1;

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

int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr)
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
{
if (unlikely(b_ptr->blocked))
return 1;
Expand Down Expand Up @@ -544,8 +546,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
int tipc_block_bearer(const char *name)
{
struct tipc_bearer *b_ptr = NULL;
struct link *l_ptr;
struct link *temp_l_ptr;
struct tipc_link *l_ptr;
struct tipc_link *temp_l_ptr;

read_lock_bh(&tipc_net_lock);
b_ptr = tipc_bearer_find(name);
Expand Down Expand Up @@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name)

static void bearer_disable(struct tipc_bearer *b_ptr)
{
struct link *l_ptr;
struct link *temp_l_ptr;
struct tipc_link *l_ptr;
struct tipc_link *temp_l_ptr;

info("Disabling bearer <%s>\n", b_ptr->name);
spin_lock_bh(&b_ptr->lock);
Expand Down
11 changes: 6 additions & 5 deletions net/tipc/bearer.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct tipc_bearer {
u32 window;
u32 tolerance;
u32 identity;
struct link_req *link_req;
struct tipc_link_req *link_req;
struct list_head links;
struct list_head cong_links;
int active;
Expand All @@ -157,7 +157,7 @@ struct bearer_name {
char if_name[TIPC_MAX_IF_NAME];
};

struct link;
struct tipc_link;

extern struct tipc_bearer tipc_bearers[];

Expand Down Expand Up @@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void);
struct sk_buff *tipc_bearer_get_names(void);
void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest);
void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest);
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr);
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
struct tipc_bearer *tipc_bearer_find(const char *name);
struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
struct tipc_media *tipc_media_find(const char *name);
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr);
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr);
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
struct tipc_link *l_ptr);
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
void tipc_bearer_stop(void);
void tipc_bearer_lock_push(struct tipc_bearer *b_ptr);

Expand Down
20 changes: 10 additions & 10 deletions net/tipc/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@


/**
* struct link_req - information about an ongoing link setup request
* struct tipc_link_req - information about an ongoing link setup request
* @bearer: bearer issuing requests
* @dest: destination address for request messages
* @domain: network domain to which links can be established
Expand All @@ -54,7 +54,7 @@
* @timer: timer governing period between requests
* @timer_intv: current interval between requests (in ms)
*/
struct link_req {
struct tipc_link_req {
struct tipc_bearer *bearer;
struct tipc_media_addr dest;
u32 domain;
Expand Down Expand Up @@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr,
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
{
struct tipc_node *n_ptr;
struct link *link;
struct tipc_link *link;
struct tipc_media_addr media_addr, *addr;
struct sk_buff *rbuf;
struct tipc_msg *msg = buf_msg(buf);
Expand Down Expand Up @@ -218,7 +218,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
* and is either not currently searching or is searching at a slow rate
*/

static void disc_update(struct link_req *req)
static void disc_update(struct tipc_link_req *req)
{
if (!req->num_nodes) {
if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) ||
Expand All @@ -234,7 +234,7 @@ static void disc_update(struct link_req *req)
* @req: ptr to link request structure
*/

void tipc_disc_add_dest(struct link_req *req)
void tipc_disc_add_dest(struct tipc_link_req *req)
{
req->num_nodes++;
}
Expand All @@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req)
* @req: ptr to link request structure
*/

void tipc_disc_remove_dest(struct link_req *req)
void tipc_disc_remove_dest(struct tipc_link_req *req)
{
req->num_nodes--;
disc_update(req);
Expand All @@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req)
* @req: ptr to link request structure
*/

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

static void disc_timeout(struct link_req *req)
static void disc_timeout(struct tipc_link_req *req)
{
int max_delay;

Expand Down Expand Up @@ -316,7 +316,7 @@ static void disc_timeout(struct link_req *req)
int tipc_disc_create(struct tipc_bearer *b_ptr,
struct tipc_media_addr *dest, u32 dest_domain)
{
struct link_req *req;
struct tipc_link_req *req;

req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req)
Expand Down Expand Up @@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr,
* @req: ptr to link request structure
*/

void tipc_disc_delete(struct link_req *req)
void tipc_disc_delete(struct tipc_link_req *req)
{
k_cancel_timer(&req->timer);
k_term_timer(&req->timer);
Expand Down
8 changes: 4 additions & 4 deletions net/tipc/discover.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
#ifndef _TIPC_DISCOVER_H
#define _TIPC_DISCOVER_H

struct link_req;
struct tipc_link_req;

int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest,
u32 dest_domain);
void tipc_disc_delete(struct link_req *req);
void tipc_disc_add_dest(struct link_req *req);
void tipc_disc_remove_dest(struct link_req *req);
void tipc_disc_delete(struct tipc_link_req *req);
void tipc_disc_add_dest(struct tipc_link_req *req);
void tipc_disc_remove_dest(struct tipc_link_req *req);
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr);

#endif
Loading

0 comments on commit a18c4bc

Please sign in to comment.