Commit 880b005f authored by David S. Miller's avatar David S. Miller

[TIPC]: Fix 64-bit build warnings.

When storing u32 values in a pointer, need to do
some long casts to keep GCC happy.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e86eaa3a
...@@ -114,12 +114,12 @@ static inline u32 buf_seqno(struct sk_buff *buf) ...@@ -114,12 +114,12 @@ static inline u32 buf_seqno(struct sk_buff *buf)
static inline u32 bcbuf_acks(struct sk_buff *buf) static inline u32 bcbuf_acks(struct sk_buff *buf)
{ {
return (u32)TIPC_SKB_CB(buf)->handle; return (u32)(unsigned long)TIPC_SKB_CB(buf)->handle;
} }
static inline void bcbuf_set_acks(struct sk_buff *buf, u32 acks) static inline void bcbuf_set_acks(struct sk_buff *buf, u32 acks)
{ {
TIPC_SKB_CB(buf)->handle = (void *)acks; TIPC_SKB_CB(buf)->handle = (void *)(unsigned long)acks;
} }
static inline void bcbuf_decr_acks(struct sk_buff *buf) static inline void bcbuf_decr_acks(struct sk_buff *buf)
......
...@@ -1234,7 +1234,8 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer) ...@@ -1234,7 +1234,8 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer)
p_ptr->publ.connected = 1; p_ptr->publ.connected = 1;
k_start_timer(&p_ptr->timer, p_ptr->probing_interval); k_start_timer(&p_ptr->timer, p_ptr->probing_interval);
nodesub_subscribe(&p_ptr->subscription,peer->node, (void *)ref, nodesub_subscribe(&p_ptr->subscription,peer->node,
(void *)(unsigned long)ref,
(net_ev_handler)port_handle_node_down); (net_ev_handler)port_handle_node_down);
res = TIPC_OK; res = TIPC_OK;
exit: exit:
......
...@@ -329,9 +329,10 @@ static void subscr_conn_shutdown_event(void *usr_handle, ...@@ -329,9 +329,10 @@ static void subscr_conn_shutdown_event(void *usr_handle,
unsigned int size, unsigned int size,
int reason) int reason)
{ {
struct subscriber *subscriber = ref_lock((u32)usr_handle); struct subscriber *subscriber;
spinlock_t *subscriber_lock; spinlock_t *subscriber_lock;
subscriber = ref_lock((u32)(unsigned long)usr_handle);
if (subscriber == NULL) if (subscriber == NULL)
return; return;
...@@ -350,9 +351,10 @@ static void subscr_conn_msg_event(void *usr_handle, ...@@ -350,9 +351,10 @@ static void subscr_conn_msg_event(void *usr_handle,
const unchar *data, const unchar *data,
u32 size) u32 size)
{ {
struct subscriber *subscriber = ref_lock((u32)usr_handle); struct subscriber *subscriber;
spinlock_t *subscriber_lock; spinlock_t *subscriber_lock;
subscriber = ref_lock((u32)(unsigned long)usr_handle);
if (subscriber == NULL) if (subscriber == NULL)
return; return;
...@@ -409,7 +411,7 @@ static void subscr_named_msg_event(void *usr_handle, ...@@ -409,7 +411,7 @@ static void subscr_named_msg_event(void *usr_handle,
/* Establish a connection to subscriber */ /* Establish a connection to subscriber */
tipc_createport(topsrv.user_ref, tipc_createport(topsrv.user_ref,
(void *)subscriber->ref, (void *)(unsigned long)subscriber->ref,
importance, importance,
0, 0,
0, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment