diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-03 02:38:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-03 02:38:32 -0400 |
commit | 6c00055a819ce8a6e2c3af2f65d4ea1a8559c491 (patch) | |
tree | 10a99e61740723be45ba056b2edd623d237c0207 /net/tipc/node.h | |
parent | 37b08e34a98c664bea86e3fae718ac45a46b7276 (diff) |
tipc: Don't use structure names which easily globally conflict.
Andrew Morton reported a build failure on sparc32, because TIPC
uses names like "struct node" and there is a like named data
structure defined in linux/node.h
This just regexp replaces "struct node*" to "struct tipc_node*"
to avoid this and any future similar problems.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.h')
-rw-r--r-- | net/tipc/node.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index cd1882654bbb..6f990da5d143 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "bearer.h" | 43 | #include "bearer.h" |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * struct node - TIPC node structure | 46 | * struct tipc_node - TIPC node structure |
47 | * @addr: network address of node | 47 | * @addr: network address of node |
48 | * @lock: spinlock governing access to structure | 48 | * @lock: spinlock governing access to structure |
49 | * @owner: pointer to cluster that node belongs to | 49 | * @owner: pointer to cluster that node belongs to |
@@ -68,11 +68,11 @@ | |||
68 | * @defragm: list of partially reassembled b'cast message fragments from node | 68 | * @defragm: list of partially reassembled b'cast message fragments from node |
69 | */ | 69 | */ |
70 | 70 | ||
71 | struct node { | 71 | struct tipc_node { |
72 | u32 addr; | 72 | u32 addr; |
73 | spinlock_t lock; | 73 | spinlock_t lock; |
74 | struct cluster *owner; | 74 | struct cluster *owner; |
75 | struct node *next; | 75 | struct tipc_node *next; |
76 | struct list_head nsub; | 76 | struct list_head nsub; |
77 | struct link *active_links[2]; | 77 | struct link *active_links[2]; |
78 | struct link *links[MAX_BEARERS]; | 78 | struct link *links[MAX_BEARERS]; |
@@ -94,26 +94,26 @@ struct node { | |||
94 | } bclink; | 94 | } bclink; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | extern struct node *tipc_nodes; | 97 | extern struct tipc_node *tipc_nodes; |
98 | extern u32 tipc_own_tag; | 98 | extern u32 tipc_own_tag; |
99 | 99 | ||
100 | struct node *tipc_node_create(u32 addr); | 100 | struct tipc_node *tipc_node_create(u32 addr); |
101 | void tipc_node_delete(struct node *n_ptr); | 101 | void tipc_node_delete(struct tipc_node *n_ptr); |
102 | struct node *tipc_node_attach_link(struct link *l_ptr); | 102 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr); |
103 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr); | 103 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); |
104 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr); | 104 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); |
105 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr); | 105 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); |
106 | int tipc_node_has_active_links(struct node *n_ptr); | 106 | int tipc_node_has_active_links(struct tipc_node *n_ptr); |
107 | int tipc_node_has_redundant_links(struct node *n_ptr); | 107 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); |
108 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref); | 108 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref); |
109 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector); | 109 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector); |
110 | int tipc_node_is_up(struct node *n_ptr); | 110 | int tipc_node_is_up(struct tipc_node *n_ptr); |
111 | void tipc_node_add_router(struct node *n_ptr, u32 router); | 111 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router); |
112 | void tipc_node_remove_router(struct node *n_ptr, u32 router); | 112 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router); |
113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); | 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); |
114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); | 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); |
115 | 115 | ||
116 | static inline struct node *tipc_node_find(u32 addr) | 116 | static inline struct tipc_node *tipc_node_find(u32 addr) |
117 | { | 117 | { |
118 | if (likely(in_own_cluster(addr))) | 118 | if (likely(in_own_cluster(addr))) |
119 | return tipc_local_nodes[tipc_node(addr)]; | 119 | return tipc_local_nodes[tipc_node(addr)]; |
@@ -126,19 +126,19 @@ static inline struct node *tipc_node_find(u32 addr) | |||
126 | return NULL; | 126 | return NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline struct node *tipc_node_select(u32 addr, u32 selector) | 129 | static inline struct tipc_node *tipc_node_select(u32 addr, u32 selector) |
130 | { | 130 | { |
131 | if (likely(in_own_cluster(addr))) | 131 | if (likely(in_own_cluster(addr))) |
132 | return tipc_local_nodes[tipc_node(addr)]; | 132 | return tipc_local_nodes[tipc_node(addr)]; |
133 | return tipc_node_select_next_hop(addr, selector); | 133 | return tipc_node_select_next_hop(addr, selector); |
134 | } | 134 | } |
135 | 135 | ||
136 | static inline void tipc_node_lock(struct node *n_ptr) | 136 | static inline void tipc_node_lock(struct tipc_node *n_ptr) |
137 | { | 137 | { |
138 | spin_lock_bh(&n_ptr->lock); | 138 | spin_lock_bh(&n_ptr->lock); |
139 | } | 139 | } |
140 | 140 | ||
141 | static inline void tipc_node_unlock(struct node *n_ptr) | 141 | static inline void tipc_node_unlock(struct tipc_node *n_ptr) |
142 | { | 142 | { |
143 | spin_unlock_bh(&n_ptr->lock); | 143 | spin_unlock_bh(&n_ptr->lock); |
144 | } | 144 | } |