tipc: save sock structure pointer instead of void pointer to tipc_port
Directly save sock structure pointer instead of void pointer to avoid unnecessary cast conversions. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
28e5297281
commit
c0fee8aca7
@@ -206,7 +206,7 @@ exit:
|
||||
*
|
||||
* Returns pointer to (locked) TIPC port, or NULL if unable to create it
|
||||
*/
|
||||
struct tipc_port *tipc_createport(void *usr_handle,
|
||||
struct tipc_port *tipc_createport(struct sock *sk,
|
||||
u32 (*dispatcher)(struct tipc_port *, struct sk_buff *),
|
||||
void (*wakeup)(struct tipc_port *),
|
||||
const u32 importance)
|
||||
@@ -227,7 +227,7 @@ struct tipc_port *tipc_createport(void *usr_handle,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_ptr->usr_handle = usr_handle;
|
||||
p_ptr->sk = sk;
|
||||
p_ptr->max_pkt = MAX_PKT_DEFAULT;
|
||||
p_ptr->ref = ref;
|
||||
INIT_LIST_HEAD(&p_ptr->wait_list);
|
||||
|
Reference in New Issue
Block a user