tipc on sparc32
sparc32 allmodconfig:
In file included from net/tipc/link.h:43,
from net/tipc/bcast.c:41:
net/tipc/node.h:71: error: redefinition of 'struct node'
sparc32 likes catching code which uses insufficiently cautiously chosen identifiers. dlm is presently blowing up on sparc32 because it has a to_node() function.
Arguably, sparc32 should be fixed, but I'd suggest that random bits of networking code should not be using identifiers as generic-sounding as "node".
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Tue, 2 Sep 2008 22:40:59 -0700
Quoted 4 lines
sparc32 allmodconfig:
In file included from
net/tipc/link.h:43,from net/tipc/bcast.c:41:
Quoted 8 lines
net/tipc/node.h:71: error: redefinition of 'struct node'sparc32 likes catching code which uses insufficiently cautiously chosen identifiers. dlm is presently blowing up on sparc32 because it has a
to_node()function.Arguably, sparc32 should be fixed, but I'd suggest that random bits of networking code should not be using identifiers as generic-sounding as "node".
I'll fix sparc for the time being, thanks.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Tue, 02 Sep 2008 23:12:01 -0700 (PDT)
Quoted 9 lines
From: Andrew Morton <[email protected]>
Date: Tue, 2 Sep 2008 22:40:59 -0700Quoted 6 lines
sparc32 allmodconfig:
In file included from
net/tipc/link.h:43,from net/tipc/bcast.c:41:
net/tipc/node.h:71: error: redefinition of 'struct node'
Quoted 8 lines
Quoted 6 lines
sparc32 likes catching code which uses insufficiently cautiously chosen identifiers. dlm is presently blowing up on sparc32 because it has a
to_node()function.Arguably, sparc32 should be fixed, but I'd suggest that random bits of networking code should not be using identifiers as generic-sounding as "node".
I'll fix sparc for the time being, thanks.
Actually, the conflict is between the include/linux/node.h which the generic device layer uses, and TIPC.
This isn't a sparc specific problem.
And the DLM issue is the same thing.
It might be triggering on sparc32 because linux/node.h gets included in the tangle of arch and non-arch include files that happen during the build, but that's benign as far as blaming sparc is concerned.
I can take care of TIPC.
Andrew can you take a stab at DLM?
Thanks.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Tue, 02 Sep 2008 23:26:27 -0700 (PDT)
Quoted 1 line
I can take care of TIPC.
Here is what I'll likely use, thanks Andrew.
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.
--- net/tipc/bcast.c | 22 ++++++++-------- net/tipc/bcast.h | 22 ++++++++-------- net/tipc/bearer.c | 2 +- net/tipc/bearer.h | 2 +- net/tipc/cluster.c | 16 ++++++------ net/tipc/cluster.h | 10 ++++---- net/tipc/discover.c | 2 +- net/tipc/link.c | 26 ++++++++++---------- net/tipc/link.h | 2 +- net/tipc/name_table.h | 2 +- net/tipc/net.c | 2 +- net/tipc/net.h | 2 +- net/tipc/node.c | 60 ++++++++++++++++++++++++------------------------ net/tipc/node.h | 42 ++++++++++++++++---------------- net/tipc/node_subscr.c | 4 +- net/tipc/node_subscr.h | 10 ++++---- net/tipc/port.h | 2 +- net/tipc/zone.c | 4 +- net/tipc/zone.h | 2 +- 19 files changed, 117 insertions(+), 117 deletions(-)
net/tipc/bcast.c +11 -11
@@ -96,8 +96,8 @@ struct bcbearer {struct media media;struct bcbearer_pair bpairs[MAX_BEARERS ];struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI +1 ]; -struct node_map remains; -struct node_map remains_new; +struct tipc_node_map remains; +struct tipc_node_map remains_new; };/**
@@ -110,7 +110,7 @@ struct bcbearer {struct bclink {struct link link; -struct node node; +struct tipc_node node; };
@@ -149,7 +149,7 @@ static void bcbuf_decr_acks(struct sk_buff *buf)* Called with 'node' locked, bc_lock unlocked */ -static void bclink_set_gap (struct node *n_ptr) +static void bclink_set_gap (struct tipc_node *n_ptr) {struct sk_buff *buf = n_ptr->bclink.deferred_head;
@@ -202,7 +202,7 @@ static void bclink_retransmit_pkt(u32 after, u32 to)* Node is locked, bc_lock unlocked. */ -void tipc_bclink_acknowledge (struct node *n_ptr,u32 acked) +void tipc_bclink_acknowledge (struct tipc_node *n_ptr,u32 acked) {struct sk_buff *crs;struct sk_buff *next;
@@ -250,7 +250,7 @@ void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked)* tipc_net_lock and node lock set */ -static void bclink_send_ack (struct node *n_ptr) +static void bclink_send_ack (struct tipc_node *n_ptr) {struct link *l_ptr = n_ptr->active_links[n_ptr->addr &1 ];
@@ -264,7 +264,7 @@ static void bclink_send_ack(struct node *n_ptr)* tipc_net_lock and node lock set */ -static void bclink_send_nack (struct node *n_ptr) +static void bclink_send_nack (struct tipc_node *n_ptr) {struct sk_buff *buf;struct tipc_msg *msg;
@@ -308,7 +308,7 @@ static void bclink_send_nack(struct node *n_ptr)* tipc_net_lock and node lock set */ -void tipc_bclink_check_gap (struct node *n_ptr,u32 last_sent) +void tipc_bclink_check_gap (struct tipc_node *n_ptr,u32 last_sent) {if (!n_ptr->bclink.supported ||less_eq (last_sent,mod (n_ptr->bclink.last_in)))
@@ -328,7 +328,7 @@ void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent)static void tipc_bclink_peek_nack (u32 dest,u32 sender_tag,u32 gap_after,u32 gap_to) { -struct node *n_ptr =tipc_node_find (dest); +struct tipc_node *n_ptr =tipc_node_find (dest);u32 my_after, my_to;if (unlikely (!n_ptr || !tipc_node_is_up (n_ptr)))
@@ -418,7 +418,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)static int rx_count =0 ;#endif struct tipc_msg *msg =buf_msg (buf); -struct node * node =tipc_node_find (msg_prevnode (msg)); +struct tipc_node * node =tipc_node_find (msg_prevnode (msg));u32 next_in;u32 seqno;struct sk_buff *deferred;
@@ -538,7 +538,7 @@ u32 tipc_bclink_get_last_sent(void)return last_sent; } -u32 tipc_bclink_acks_missing (struct node *n_ptr) +u32 tipc_bclink_acks_missing (struct tipc_node *n_ptr) {return (n_ptr->bclink.supported && (tipc_bclink_get_last_sent () != n_ptr->bclink.acked));
net/tipc/bcast.h +11 -11
@@ -41,12 +41,12 @@#define WSIZE 32/** -* struct node_map - set of node identifiers +* struct tipc_node_map - set of node identifiers * @count: # of nodes in set * @map: bitmap of node identifiers that are in the set */ -struct node_map { +struct tipc_node_map {u32 count;u32 map[MAX_NODES /WSIZE ]; };
@@ -68,7 +68,7 @@ struct port_list { }; -struct node ; +struct tipc_node ;extern char tipc_bclink_name[];
@@ -77,7 +77,7 @@ extern char tipc_bclink_name[];* nmap_add - add a node to a node map */ -static inline void tipc_nmap_add (struct node_map *nm_ptr,u32 node) +static inline void tipc_nmap_add (struct tipc_node_map *nm_ptr,u32 node) {int n =tipc_node (node);int w = n /WSIZE ;
@@ -93,7 +93,7 @@ static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node)* nmap_remove - remove a node from a node map */ -static inline void tipc_nmap_remove (struct node_map *nm_ptr,u32 node) +static inline void tipc_nmap_remove (struct tipc_node_map *nm_ptr,u32 node) {int n =tipc_node (node);int w = n /WSIZE ;
@@ -109,7 +109,7 @@ static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node)* nmap_equal - test for equality of node maps */ -static inline int tipc_nmap_equal (struct node_map *nm_a,struct node_map *nm_b) +static inline int tipc_nmap_equal (struct tipc_node_map *nm_a,struct tipc_node_map *nm_b) {return !memcmp (nm_a, nm_b,sizeof (*nm_a)); }
@@ -121,8 +121,8 @@ static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b)* @nm_diff: output node map A-B (i.e. nodes of A that are not in B) */ -static inline void tipc_nmap_diff (struct node_map *nm_a,struct node_map *nm_b, -struct node_map *nm_diff) +static inline void tipc_nmap_diff (struct tipc_node_map *nm_a,struct tipc_node_map *nm_b, +struct tipc_node_map *nm_diff) {int stop =sizeof (nm_a->map) /sizeof (u32);int w;
@@ -195,12 +195,12 @@ static inline void tipc_port_list_free(struct port_list *pl_ptr)int tipc_bclink_init (void );void tipc_bclink_stop (void ); -void tipc_bclink_acknowledge (struct node *n_ptr,u32 acked); +void tipc_bclink_acknowledge (struct tipc_node *n_ptr,u32 acked);int tipc_bclink_send_msg (struct sk_buff *buf);void tipc_bclink_recv_pkt (struct sk_buff *buf);u32 tipc_bclink_get_last_sent (void ); -u32 tipc_bclink_acks_missing (struct node *n_ptr); -void tipc_bclink_check_gap (struct node *n_ptr,u32 seqno); +u32 tipc_bclink_acks_missing (struct tipc_node *n_ptr); +void tipc_bclink_check_gap (struct tipc_node *n_ptr,u32 seqno);int tipc_bclink_stats (char *stats_buf,const u32 buf_size);int tipc_bclink_reset_stats (void );int tipc_bclink_set_queue_limits (u32 limit);
net/tipc/bearer.c +1 -1
@@ -599,7 +599,7 @@ int tipc_block_bearer(const char *name)spin_lock_bh (&b_ptr->publ.lock); b_ptr->publ.blocked =1 ;list_for_each_entry_safe (l_ptr, temp_l_ptr, &b_ptr->links, link_list) { -struct node *n_ptr = l_ptr->owner; +struct tipc_node *n_ptr = l_ptr->owner;spin_lock_bh (&n_ptr->lock);tipc_link_reset (l_ptr);
net/tipc/bearer.h +1 -1
@@ -104,7 +104,7 @@ struct bearer {u32 continue_count;int active;char net_plane; -struct node_map nodes; +struct tipc_node_map nodes; };struct bearer_name {
net/tipc/cluster.c +8 -8
@@ -48,8 +48,8 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, u32 lower, u32 upper);static struct sk_buff *tipc_cltr_prepare_routing_msg (u32 data_size,u32 dest); -struct node **tipc_local_nodes =NULL ; -struct node_map tipc_cltr_bcast_nodes = {0 ,{0 ,}}; +struct tipc_node **tipc_local_nodes =NULL ; +struct tipc_node_map tipc_cltr_bcast_nodes = {0 ,{0 ,}};u32 tipc_highest_allowed_slave =0 ;struct cluster *tipc_cltr_create (u32 addr)
@@ -115,7 +115,7 @@ void tipc_cltr_delete(struct cluster *c_ptr)u32 tipc_cltr_next_node (struct cluster *c_ptr,u32 addr) { -struct node *n_ptr; +struct tipc_node *n_ptr;u32 n_num =tipc_node (addr) +1 ;if (!c_ptr)
@@ -133,7 +133,7 @@ u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr)return 0 ; } -void tipc_cltr_attach_node (struct cluster *c_ptr,struct node *n_ptr) +void tipc_cltr_attach_node (struct cluster *c_ptr,struct tipc_node *n_ptr) {u32 n_num =tipc_node (n_ptr->addr);u32 max_n_num = tipc_max_nodes;
@@ -196,7 +196,7 @@ u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref)* Uses deterministic and fair algorithm. */ -struct node *tipc_cltr_select_node (struct cluster *c_ptr,u32 selector) +struct tipc_node *tipc_cltr_select_node (struct cluster *c_ptr,u32 selector) {u32 n_num;u32 mask = tipc_max_nodes;
@@ -379,7 +379,7 @@ void tipc_cltr_recv_routing_table(struct sk_buff *buf) {struct tipc_msg *msg =buf_msg (buf);struct cluster *c_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;unchar *node_table;u32 table_size;u32 router;
@@ -499,7 +499,7 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, u32 lower, u32 upper) {struct sk_buff *buf_copy; -struct node *n_ptr; +struct tipc_node *n_ptr;u32 n_num;u32 tstop;
@@ -534,7 +534,7 @@ void tipc_cltr_broadcast(struct sk_buff *buf) {struct sk_buff *buf_copy;struct cluster *c_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;u32 n_num;u32 tstart;u32 tstop;
net/tipc/cluster.h +5 -5
@@ -54,24 +54,24 @@struct cluster {u32 addr;struct _zone *owner; -struct node **nodes; +struct tipc_node **nodes;u32 highest_node;u32 highest_slave; }; -extern struct node **tipc_local_nodes; +extern struct tipc_node **tipc_local_nodes;extern u32 tipc_highest_allowed_slave; -extern struct node_map tipc_cltr_bcast_nodes; +extern struct tipc_node_map tipc_cltr_bcast_nodes;void tipc_cltr_remove_as_router (struct cluster *c_ptr,u32 router);void tipc_cltr_send_ext_routes (struct cluster *c_ptr,u32 dest); -struct node *tipc_cltr_select_node (struct cluster *c_ptr,u32 selector); +struct tipc_node *tipc_cltr_select_node (struct cluster *c_ptr,u32 selector);u32 tipc_cltr_select_router (struct cluster *c_ptr,u32 ref);void tipc_cltr_recv_routing_table (struct sk_buff *buf);struct cluster *tipc_cltr_create (u32 addr);void tipc_cltr_delete (struct cluster *c_ptr); -void tipc_cltr_attach_node (struct cluster *c_ptr,struct node *n_ptr); +void tipc_cltr_attach_node (struct cluster *c_ptr,struct tipc_node *n_ptr);void tipc_cltr_send_slave_routes (struct cluster *c_ptr,u32 dest);void tipc_cltr_broadcast (struct sk_buff *buf);int tipc_cltr_init (void );
net/tipc/discover.c +1 -1
@@ -193,7 +193,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)/* Always accept link here */ struct sk_buff *rbuf;struct tipc_media_addr *addr; -struct node *n_ptr =tipc_node_find (orig); +struct tipc_node *n_ptr =tipc_node_find (orig);int link_fully_up;dbg (" in own cluster\n" );
net/tipc/link.c +13 -13
@@ -1155,7 +1155,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf)int tipc_link_send (struct sk_buff *buf,u32 dest,u32 selector) {struct link *l_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;int res = -ELINKCONG ;read_lock_bh (&tipc_net_lock);
@@ -1226,7 +1226,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,int tipc_send_buf_fast (struct sk_buff *buf,u32 destnode) {struct link *l_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;int res;u32 selector =msg_origport (buf_msg (buf)) &1 ;u32 dummy;
@@ -1270,7 +1270,7 @@ int tipc_link_send_sections_fast(struct port *sender,struct tipc_msg *hdr = &sender->publ.phdr;struct link *l_ptr;struct sk_buff *buf; -struct node *node; +struct tipc_node *node;int res;u32 selector =msg_origport (hdr) &1 ;
@@ -1364,7 +1364,7 @@ static int link_send_sections_long(struct port *sender, u32 destaddr) {struct link *l_ptr; -struct node *node; +struct tipc_node *node;struct tipc_msg *hdr = &sender->publ.phdr;u32 dsz =msg_data_sz (hdr);u32 max_pkt,fragm_sz,rest;
@@ -1636,7 +1636,7 @@ void tipc_link_push_queue(struct link *l_ptr)static void link_reset_all (unsigned long addr) { -struct node *n_ptr; +struct tipc_node *n_ptr;char addr_string[16 ];u32 i;
@@ -1682,7 +1682,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf)/* Handle failure on broadcast link */ -struct node *n_ptr; +struct tipc_node *n_ptr;char addr_string[16 ];tipc_printf (TIPC_OUTPUT ,"Msg seq number: %u, " ,msg_seqno (msg));
@@ -1843,7 +1843,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)read_lock_bh (&tipc_net_lock);while (head) {struct bearer *b_ptr = (struct bearer *)tb_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;struct link *l_ptr;struct sk_buff *crs;struct sk_buff *buf = head;
@@ -2935,7 +2935,7 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window)* Returns pointer to link (or 0 if invalid link name). */ -static struct link *link_find_link (const char *name,struct node **node) +static struct link *link_find_link (const char *name,struct tipc_node **node) {struct link_name link_name_parts;struct bearer *b_ptr;
@@ -2965,7 +2965,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_spacestruct tipc_link_config *args;u32 new_value;struct link *l_ptr; -struct node *node; +struct tipc_node *node;int res;if (!TLV_CHECK (req_tlv_area, req_tlv_space,TIPC_TLV_LINK_CONFIG ))
@@ -3043,7 +3043,7 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_ {char *link_name;struct link *l_ptr; -struct node *node; +struct tipc_node *node;if (!TLV_CHECK (req_tlv_area, req_tlv_space,TIPC_TLV_LINK_NAME ))return tipc_cfg_reply_error_string (TIPC_CFG_TLV_ERROR );
@@ -3091,7 +3091,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) {struct print_buf pb;struct link *l_ptr; -struct node *node; +struct tipc_node *node;char *status;u32 profile_total =0 ;
@@ -3207,7 +3207,7 @@ int link_control(const char *name, u32 op, u32 val)int res = -EINVAL ;struct link *l_ptr;u32 bearer_id; -struct node * node; +struct tipc_node * node;u32 a; a =link_name2addr (name, &bearer_id);
@@ -3249,7 +3249,7 @@ int link_control(const char *name, u32 op, u32 val)u32 tipc_link_get_max_pkt (u32 dest,u32 selector) { -struct node *n_ptr; +struct tipc_node *n_ptr;struct link *l_ptr;u32 res =MAX_PKT_DEFAULT ;
net/tipc/link.h +1 -1
@@ -116,7 +116,7 @@ struct link {char name[TIPC_MAX_LINK_NAME ];struct tipc_media_addr media_addr;struct timer_list timer; -struct node *owner; +struct tipc_node *owner;struct list_head link_list;/* Management and link supervision data */
net/tipc/name_table.h +1 -1
@@ -76,7 +76,7 @@ struct publication {u32 node;u32 ref;u32 key; -struct node_subscr subscr; +struct tipc_node_subscr subscr;struct list_head local_list;struct list_head pport_list;struct publication *node_list_next;
net/tipc/net.c +1 -1
@@ -118,7 +118,7 @@DEFINE_RWLOCK (tipc_net_lock);struct network tipc_net = {NULL }; -struct node *tipc_net_select_remote_node (u32 addr,u32 ref) +struct tipc_node *tipc_net_select_remote_node (u32 addr,u32 ref) {return tipc_zone_select_remote_node (tipc_net.zones[tipc_zone (addr)], addr, ref); }
net/tipc/net.h +1 -1
@@ -55,7 +55,7 @@ extern rwlock_t tipc_net_lock;void tipc_net_remove_as_router (u32 router);void tipc_net_send_external_routes (u32 dest);void tipc_net_route_msg (struct sk_buff *buf); -struct node *tipc_net_select_remote_node (u32 addr,u32 ref); +struct tipc_node *tipc_net_select_remote_node (u32 addr,u32 ref);u32 tipc_net_select_router (u32 addr,u32 ref);int tipc_net_start (u32 addr);
net/tipc/node.c +30 -30
192 lines not on this page · raw message
net/tipc/node.h +21 -21
84 lines not on this page · raw message
net/tipc/node_subscr.c +2 -2
@@ -44,7 +44,7 @@* tipc_nodesub_subscribe - create "node down" subscription for specified node */ -void tipc_nodesub_subscribe (struct node_subscr *node_sub,u32 addr, +void tipc_nodesub_subscribe (struct tipc_node_subscr *node_sub,u32 addr,void *usr_handle,net_ev_handler handle_down) {if (addr == tipc_own_addr) {
@@ -69,7 +69,7 @@ void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr,* tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) */ -void tipc_nodesub_unsubscribe (struct node_subscr *node_sub) +void tipc_nodesub_unsubscribe (struct tipc_node_subscr *node_sub) {if (!node_sub->node)return ;
net/tipc/node_subscr.h +5 -5
@@ -42,22 +42,22 @@typedef void (*net_ev_handler ) (void *usr_handle);/** -* struct node_subscr - "node down" subscription entry +* struct tipc_node_subscr - "node down" subscription entry * @node: ptr to node structure of interest (or NULL, if none) * @handle_node_down: routine to invoke when node fails * @usr_handle: argument to pass to routine when node fails * @nodesub_list: adjacent entries in list of subscriptions for the node */ -struct node_subscr { -struct node *node; +struct tipc_node_subscr { +struct tipc_node *node;net_ev_handler handle_node_down;void *usr_handle;struct list_head nodesub_list; }; -void tipc_nodesub_subscribe (struct node_subscr *node_sub,u32 addr, +void tipc_nodesub_subscribe (struct tipc_node_subscr *node_sub,u32 addr,void *usr_handle,net_ev_handler handle_down); -void tipc_nodesub_unsubscribe (struct node_subscr *node_sub); +void tipc_nodesub_unsubscribe (struct tipc_node_subscr *node_sub);#endif
net/tipc/port.h +1 -1
@@ -105,7 +105,7 @@ struct port {u32 probing_interval;u32 last_in_seqno;struct timer_list timer; -struct node_subscr subscription; +struct tipc_node_subscr subscription; };extern spinlock_t tipc_port_list_lock;
net/tipc/zone.c +2 -2
@@ -111,10 +111,10 @@ void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest) } } -struct node *tipc_zone_select_remote_node (struct _zone *z_ptr,u32 addr,u32 ref) +struct tipc_node *tipc_zone_select_remote_node (struct _zone *z_ptr,u32 addr,u32 ref) {struct cluster *c_ptr; -struct node *n_ptr; +struct tipc_node *n_ptr;u32 c_num;if (!z_ptr)
net/tipc/zone.h +1 -1
@@ -54,7 +54,7 @@ struct _zone {u32 links; }; -struct node *tipc_zone_select_remote_node (struct _zone *z_ptr,u32 addr,u32 ref); +struct tipc_node *tipc_zone_select_remote_node (struct _zone *z_ptr,u32 addr,u32 ref);u32 tipc_zone_select_router (struct _zone *z_ptr,u32 addr,u32 ref);void tipc_zone_remove_as_router (struct _zone *z_ptr,u32 router);void tipc_zone_send_external_routes (struct _zone *z_ptr,u32 dest);
Signature · 8 lines
1.5.6.5.GIT ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
Quoted 26 lines · On Tue, 02 Sep 2008 23:26:27 -0700 (PDT) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Tue, 02 Sep 2008 23:12:01 -0700 (PDT)Quoted 9 lines
From: Andrew Morton <[email protected]>
Date: Tue, 2 Sep 2008 22:40:59 -0700Quoted 6 lines
sparc32 allmodconfig:
In file included from
net/tipc/link.h:43,from net/tipc/bcast.c:41:
net/tipc/node.h:71: error: redefinition of 'struct node'Quoted 8 lines
Quoted 6 lines
sparc32 likes catching code which uses insufficiently cautiously chosen identifiers. dlm is presently blowing up on sparc32 because it has a
to_node()function.Arguably, sparc32 should be fixed, but I'd suggest that random bits of networking code should not be using identifiers as generic-sounding as "node".
I'll fix sparc for the time being, thanks.
Actually, the conflict is between the
include/linux/node.hwhich the generic device layer uses, and TIPC.This isn't a sparc specific problem.
Quoted 7 lines
And the DLM issue is the same thing.
It might be triggering on sparc32 because
linux/node.hgets included in the tangle of arch and non-arch include files that happen during the build, but that's benign as far as blaming sparc is concerned.I can take care of TIPC.
OK.
Quoted 1 line
Andrew can you take a stab at DLM?
dlm had a `node' a few weeks ago, that got fixed.
I fixed the new `to_node' build problem today like this:
From: Andrew Morton <[email protected]>
sparc32:
fs/dlm/config.c:397: error: expected identifier or '(' before '{' token fs/dlm/config.c: In function 'drop_node':fs/dlm/config.c:589: warning: initialization from incompatible pointer type fs/dlm/config.c:589: warning: initialization from incompatible pointer type fs/dlm/config.c: In function 'release_node':fs/dlm/config.c:601: warning: initialization from incompatible pointer type fs/dlm/config.c:601: warning: initialization from incompatible pointer type fs/dlm/config.c: In function 'show_node':fs/dlm/config.c:717: warning: initialization from incompatible pointer type fs/dlm/config.c:717: warning: initialization from incompatible pointer type fs/dlm/config.c: In function 'store_node':fs/dlm/config.c:726: warning: initialization from incompatible pointer type fs/dlm/config.c:726: warning: initialization from incompatible pointer type
---
fs/dlm/config.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-)
fs/dlm/config.c renamed from fs/dlm/config.c~fs-dlm-configc-choose-better-identifiers +22 -22
@@ -377,24 +377,24 @@ static struct config_item_type node_type .ct_owner = THIS_MODULE, }; -static struct dlm_cluster *to_cluster (struct config_item *i) +static struct dlm_cluster *config_item_to_cluster (struct config_item *i) { return i ? container_of(to_config_group(i), struct dlm_cluster, group) :NULL ; } -static struct dlm_space *to_space (struct config_item *i) +static struct dlm_space *config_item_to_space (struct config_item *i) { return i ? container_of(to_config_group(i), struct dlm_space, group) :NULL ; } -static struct dlm_comm *to_comm (struct config_item *i) +static struct dlm_comm *config_item_to_comm (struct config_item *i) { return i ? container_of(i, struct dlm_comm, item) : NULL; } -static struct dlm_node *to_node (struct config_item *i) +static struct dlm_node *config_item_to_node (struct config_item *i) { return i ? container_of(i, struct dlm_node, item) : NULL; }
@@ -450,7 +450,7 @@ static struct config_group *make_clusterstatic void drop_cluster (struct config_group *g,struct config_item *i) { -struct dlm_cluster *cl =to_cluster (i); +struct dlm_cluster *cl =config_item_to_cluster (i);struct config_item *tmp;int j;
@@ -468,7 +468,7 @@ static void drop_cluster(struct config_gstatic void release_cluster (struct config_item *i) { -struct dlm_cluster *cl =to_cluster (i); +struct dlm_cluster *cl =config_item_to_cluster (i);kfree (cl->group.default_groups);kfree (cl); }
@@ -507,7 +507,7 @@ static struct config_group *make_space(sstatic void drop_space (struct config_group *g,struct config_item *i) { -struct dlm_space *sp =to_space (i); +struct dlm_space *sp =config_item_to_space (i);struct config_item *tmp;int j;
@@ -524,7 +524,7 @@ static void drop_space(struct config_grostatic void release_space (struct config_item *i) { -struct dlm_space *sp =to_space (i); +struct dlm_space *sp =config_item_to_space (i);kfree (sp->group.default_groups);kfree (sp); }
@@ -546,7 +546,7 @@ static struct config_item *make_comm(strstatic void drop_comm (struct config_group *g,struct config_item *i) { -struct dlm_comm *cm =to_comm (i); +struct dlm_comm *cm =config_item_to_comm (i);if (local_comm == cm) local_comm =NULL ;dlm_lowcomms_close (cm->nodeid);
@@ -557,13 +557,13 @@ static void drop_comm(struct config_groustatic void release_comm (struct config_item *i) { -struct dlm_comm *cm =to_comm (i); +struct dlm_comm *cm =config_item_to_comm (i);kfree (cm); }static struct config_item *make_node (struct config_group *g,const char *name) { -struct dlm_space *sp =to_space (g->cg_item.ci_parent); +struct dlm_space *sp =config_item_to_space (g->cg_item.ci_parent);struct dlm_node *nd; nd =kzalloc (sizeof (struct dlm_node ),GFP_KERNEL );
@@ -585,8 +585,8 @@ static struct config_item *make_node(strstatic void drop_node (struct config_group *g,struct config_item *i) { -struct dlm_space *sp =to_space (g->cg_item.ci_parent); -struct dlm_node *nd =to_node (i); +struct dlm_space *sp =config_item_to_space (g->cg_item.ci_parent); +struct dlm_node *nd =config_item_to_node (i);mutex_lock (&sp->members_lock);list_del (&nd->list);
@@ -598,7 +598,7 @@ static void drop_node(struct config_groustatic void release_node (struct config_item *i) { -struct dlm_node *nd =to_node (i); +struct dlm_node *nd =config_item_to_node (i);kfree (nd); }
@@ -632,7 +632,7 @@ void dlm_config_exit(void)static ssize_t show_cluster (struct config_item *i,struct configfs_attribute *a,char *buf) { -struct dlm_cluster *cl =to_cluster (i); +struct dlm_cluster *cl =config_item_to_cluster (i);struct cluster_attribute *cla = container_of(a, struct cluster_attribute, attr);return cla->show ? cla->show (cl, buf) :0 ;
@@ -642,7 +642,7 @@ static ssize_t store_cluster(struct confstruct configfs_attribute *a, const char *buf, size_t len) { - struct dlm_cluster *cl = to_cluster(i); + struct dlm_cluster *cl = config_item_to_cluster(i);struct cluster_attribute *cla = container_of(a, struct cluster_attribute, attr);return cla->store ? cla->store (cl, buf, len) : -EINVAL ;
@@ -651,7 +651,7 @@ static ssize_t store_cluster(struct confstatic ssize_t show_comm (struct config_item *i,struct configfs_attribute *a,char *buf) { -struct dlm_comm *cm =to_comm (i); +struct dlm_comm *cm =config_item_to_comm (i);struct comm_attribute *cma = container_of(a, struct comm_attribute, attr);return cma->show ? cma->show (cm, buf) :0 ;
@@ -660,7 +660,7 @@ static ssize_t show_comm(struct config_istatic ssize_t store_comm (struct config_item *i,struct configfs_attribute *a,const char *buf,size_t len) { -struct dlm_comm *cm =to_comm (i); +struct dlm_comm *cm =config_item_to_comm (i);struct comm_attribute *cma = container_of(a, struct comm_attribute, attr);return cma->store ? cma->store (cm, buf, len) : -EINVAL ;
@@ -714,7 +714,7 @@ static ssize_t comm_addr_write(struct dlstatic ssize_t show_node (struct config_item *i,struct configfs_attribute *a,char *buf) { -struct dlm_node *nd =to_node (i); +struct dlm_node *nd =config_item_to_node (i);struct node_attribute *nda = container_of(a, struct node_attribute, attr);return nda->show ? nda->show (nd, buf) :0 ;
@@ -723,7 +723,7 @@ static ssize_t show_node(struct config_istatic ssize_t store_node (struct config_item *i,struct configfs_attribute *a,const char *buf,size_t len) { -struct dlm_node *nd =to_node (i); +struct dlm_node *nd =config_item_to_node (i);struct node_attribute *nda = container_of(a, struct node_attribute, attr);return nda->store ? nda->store (nd, buf, len) : -EINVAL ;
@@ -768,7 +768,7 @@ static struct dlm_space *get_space(char i =config_group_find_item (space_list, name);mutex_unlock (&space_list->cg_subsys->su_mutex); -return to_space (i); +return config_item_to_space (i); }static void put_space (struct dlm_space *sp)
@@ -788,7 +788,7 @@ static struct dlm_comm *get_comm(int nodmutex_lock (&clusters_root.subsys.su_mutex);list_for_each_entry (i, &comm_list->cg_children, ci_entry) { - cm =to_comm (i); + cm =config_item_to_comm (i);if (nodeid) {if (cm->nodeid != nodeid)
_
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Tue, 2 Sep 2008 23:46:45 -0700
Quoted 5 lines
Quoted 1 line
Andrew can you take a stab at DLM?
dlm had a `node' a few weeks ago, that got fixed.
I fixed the new `to_node' build problem today like this:
Thanks.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Quoted 2 lines · On Tue, 02 Sep 2008 23:40:20 -0700 (PDT) David Miller <[email protected]>…
This just regexp replaces "struct node*" to "struct tipc_node*" to avoid this and any future similar problems.
Looks good, thanks. The end result is (IMO) better-looking code. Successful compilation is a side-benefit ;)