From: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx> all needed parameters are located in session. Signed-off-by: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx> --- net/can/j1939/transport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index bb7ac8db5643..67510f671d0e 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -104,9 +104,10 @@ static inline void j1939_session_list_unlock(struct j1939_priv *priv) spin_unlock_bh(&priv->tp_session_list_lock); } -static void j1939_session_list_add(struct j1939_session *session, - struct list_head *list) +static void j1939_session_list_add(struct j1939_session *session) { + struct list_head *list = j1939_sessionq(session->priv, session->extd); + list_add_tail(&session->list, list); } @@ -936,8 +937,7 @@ static int j1939_session_insert(struct j1939_session *session) ret = -EAGAIN; } else { j1939_session_list_lock(priv); - j1939_session_list_add(session, - j1939_sessionq(priv, session->extd)); + j1939_session_list_add(session); j1939_session_list_unlock(priv); } -- 2.19.1