Skip to content

Commit

Permalink
tipc: rename struct media to struct tipc_media
Browse files Browse the repository at this point in the history
Give it a meaningful prefix, as suggested by DaveM, so that it
is consistent with things like struct tipc_bearer, and so it isn't
confused with anything else.  This has no impact on the actual
runtime code behaviour.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
  • Loading branch information
Paul Gortmaker committed Dec 30, 2011
1 parent d191854 commit 358a0d1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct bcbearer_pair {

struct bcbearer {
struct tipc_bearer bearer;
struct media media;
struct tipc_media media;
struct bcbearer_pair bpairs[MAX_BEARERS];
struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1];
struct tipc_node_map remains;
Expand Down
12 changes: 6 additions & 6 deletions net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#define MAX_ADDR_STR 32

static struct media *media_list[MAX_MEDIA];
static struct tipc_media *media_list[MAX_MEDIA];
static u32 media_count;

struct tipc_bearer tipc_bearers[MAX_BEARERS];
Expand All @@ -68,7 +68,7 @@ static int media_name_valid(const char *name)
* tipc_media_find - locates specified media object by name
*/

struct media *tipc_media_find(const char *name)
struct tipc_media *tipc_media_find(const char *name)
{
u32 i;

Expand All @@ -83,7 +83,7 @@ struct media *tipc_media_find(const char *name)
* media_find_id - locates specified media object by type identifier
*/

static struct media *media_find_id(u8 type)
static struct tipc_media *media_find_id(u8 type)
{
u32 i;

Expand All @@ -100,7 +100,7 @@ static struct media *media_find_id(u8 type)
* Bearers for this media type must be activated separately at a later stage.
*/

int tipc_register_media(struct media *m_ptr)
int tipc_register_media(struct tipc_media *m_ptr)
{
int res = -EINVAL;

Expand Down Expand Up @@ -138,7 +138,7 @@ int tipc_register_media(struct media *m_ptr)
void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a)
{
char addr_str[MAX_ADDR_STR];
struct media *m_ptr;
struct tipc_media *m_ptr;

m_ptr = media_find_id(a->media_id);

Expand Down Expand Up @@ -425,7 +425,7 @@ int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr)
int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
{
struct tipc_bearer *b_ptr;
struct media *m_ptr;
struct tipc_media *m_ptr;
struct bearer_name b_name;
char addr_string[16];
u32 bearer_id;
Expand Down
10 changes: 5 additions & 5 deletions net/tipc/bearer.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct tipc_media_addr {
struct tipc_bearer;

/**
* struct media - TIPC media information available to internal users
* struct tipc_media - TIPC media information available to internal users
* @send_msg: routine which handles buffer transmission
* @enable_bearer: routine which enables a bearer
* @disable_bearer: routine which disables a bearer
Expand All @@ -90,7 +90,7 @@ struct tipc_bearer;
* @name: media name
*/

struct media {
struct tipc_media {
int (*send_msg)(struct sk_buff *buf,
struct tipc_bearer *b_ptr,
struct tipc_media_addr *dest);
Expand Down Expand Up @@ -139,7 +139,7 @@ struct tipc_bearer {
struct tipc_media_addr addr; /* initalized by media */
char name[TIPC_MAX_BEARER_NAME];
spinlock_t lock;
struct media *media;
struct tipc_media *media;
u32 priority;
u32 window;
u32 tolerance;
Expand All @@ -164,7 +164,7 @@ extern struct tipc_bearer tipc_bearers[];
/*
* TIPC routines available to supported media types
*/
int tipc_register_media(struct media *m_ptr);
int tipc_register_media(struct tipc_media *m_ptr);

void tipc_recv_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr);

Expand All @@ -191,7 +191,7 @@ 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);
struct tipc_bearer *tipc_bearer_find(const char *name);
struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
struct media *tipc_media_find(const char *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);
void tipc_bearer_stop(void);
Expand Down
4 changes: 2 additions & 2 deletions net/tipc/eth_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct eth_bearer {
struct work_struct cleanup;
};

static struct media eth_media_info;
static struct tipc_media eth_media_info;
static struct eth_bearer eth_bearers[MAX_ETH_BEARERS];
static int eth_started;
static struct notifier_block notifier;
Expand Down Expand Up @@ -340,7 +340,7 @@ static int eth_msg2addr(struct tipc_media_addr *a, char *msg_area)
* Ethernet media registration info
*/

static struct media eth_media_info = {
static struct tipc_media eth_media_info = {
.send_msg = send_msg,
.enable_bearer = enable_bearer,
.disable_bearer = disable_bearer,
Expand Down
2 changes: 1 addition & 1 deletion net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -2793,7 +2793,7 @@ static int link_cmd_set_value(const char *name, u32 new_value, u16 cmd)
struct tipc_node *node;
struct link *l_ptr;
struct tipc_bearer *b_ptr;
struct media *m_ptr;
struct tipc_media *m_ptr;

l_ptr = link_find_link(name, &node);
if (l_ptr) {
Expand Down

0 comments on commit 358a0d1

Please sign in to comment.