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)
 {
-       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)
 
        p_ptr->publ.connected = 1;
        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);
        res = TIPC_OK;
 exit:
 
                                       unsigned int size,
                                       int reason)
 {
-       struct subscriber *subscriber = ref_lock((u32)usr_handle);
+       struct subscriber *subscriber;
        spinlock_t *subscriber_lock;
 
+       subscriber = ref_lock((u32)(unsigned long)usr_handle);
        if (subscriber == NULL)
                return;
 
                                  const unchar *data,
                                  u32 size)
 {
-       struct subscriber *subscriber = ref_lock((u32)usr_handle);
+       struct subscriber *subscriber;
        spinlock_t *subscriber_lock;
 
+       subscriber = ref_lock((u32)(unsigned long)usr_handle);
        if (subscriber == NULL)
                return;
 
        /* Establish a connection to subscriber */
 
        tipc_createport(topsrv.user_ref,
-                       (void *)subscriber->ref,
+                       (void *)(unsigned long)subscriber->ref,
                        importance,
                        0,
                        0,