From patchwork Tue Nov 3 07:09:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876015 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C93AC2D0A3 for ; Tue, 3 Nov 2020 07:10:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D83F22277 for ; Tue, 3 Nov 2020 07:10:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jjU2X5BG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727686AbgKCHKO (ORCPT ); Tue, 3 Nov 2020 02:10:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKN (ORCPT ); Tue, 3 Nov 2020 02:10:13 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88628C0617A6 for ; Mon, 2 Nov 2020 23:10:13 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id w11so8133679pll.8 for ; Mon, 02 Nov 2020 23:10:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gkuxstg5R+uheA6phR4fMLuBUdOEwyAXqM6AKai276Q=; b=jjU2X5BGCjSufVsF6Vf8JaiE09CcuHw3gz+rGFfmWoMig1rsOkioAke1Xip+ZMlSDm MM70okCmAygdERvD9/zV/dxOLyLjclm8xILCiMhHS0Hrigh/ygk37FmaXzxW2D30jFvF B8UpL0AqNbyERTB0X/6yOmdFmACnoSlEp3Ue+E1kr8+mFf85r2GqUoMIWoVLAVS1VLwW U0JkJFtIMICgrM28G5yyDpCrSlFgkVZCDDO/KdzRHZc2bU9MX+EaoRT43V9Oi3vCVR9N doAuC5o0W41G4V+DkO4hMIPlODwJkYVJ90znRWrXgbv47bB3tnN+9S0k2Uh07RDPhznu GOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gkuxstg5R+uheA6phR4fMLuBUdOEwyAXqM6AKai276Q=; b=pjRfOhMeRlAiqZkzKvPTeaZgpM1IOTPNdh6QNZm+0dq9YGsKuSwnFcCtIaYRjWgFua wmf64UfG7514fbt0kOeWOWnB7pLiko4mYT/DCL2byD0btN5t+A2L5kuZL4AHqDfcdweC K0UOWKpZhJijkgbKg0Zh0iR72rxiGAPsNAcNXpujY3zjzCpqyu93g7GSQVmYZya9OhkH KNrVEK8bjyvNXArTddFWM1F9Y0zltGKCqjbb0IIs+kIHfs2jNtEyUcLRUde3IX91+ScA IotpJ3ut9/mu0tWUqsuJjrDha/r4q06go4qkSe2rUqqgddRfL8CzuEBvnuJj9IBIqAbr h1vA== X-Gm-Message-State: AOAM532pk+3Xclit+0DVXSfni8zIjLa6dsSB9vMH/deRuhJlG9bFyOsp V2URJWPlD7kAgpAPmhFzHkc= X-Google-Smtp-Source: ABdhPJzB6IjXJmRrcSNmQNZzK5NuQIFihx9hozJBewl6TEL6CxenPnvnR6YueGhc+x5CTbaQFRykhg== X-Received: by 2002:a17:902:a584:b029:d6:4a70:3241 with SMTP id az4-20020a170902a584b02900d64a703241mr25151304plb.81.1604387413110; Mon, 02 Nov 2020 23:10:13 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:12 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 1/8] net: dccp: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:40 +0530 Message-Id: <20201103070947.577831-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/dccp/timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/dccp/timer.c b/net/dccp/timer.c index a934d2932373..db768f223ef7 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c @@ -215,13 +215,14 @@ static void dccp_delack_timer(struct timer_list *t) /** * dccp_write_xmitlet - Workhorse for CCID packet dequeueing interface - * @data: Socket to act on + * @t: pointer to the tasklet associated with this handler * * See the comments above %ccid_dequeueing_decision for supported modes. */ -static void dccp_write_xmitlet(unsigned long data) +static void dccp_write_xmitlet(struct tasklet_struct *t) { - struct sock *sk = (struct sock *)data; + struct dccp_sock *dp = from_tasklet(dp, t, dccps_xmitlet); + struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; bh_lock_sock(sk); if (sock_owned_by_user(sk)) @@ -235,16 +236,15 @@ static void dccp_write_xmitlet(unsigned long data) static void dccp_write_xmit_timer(struct timer_list *t) { struct dccp_sock *dp = from_timer(dp, t, dccps_xmit_timer); - struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; - dccp_write_xmitlet((unsigned long)sk); + dccp_write_xmitlet(&dp->dccps_xmitlet); } void dccp_init_xmit_timers(struct sock *sk) { struct dccp_sock *dp = dccp_sk(sk); - tasklet_init(&dp->dccps_xmitlet, dccp_write_xmitlet, (unsigned long)sk); + tasklet_setup(&dp->dccps_xmitlet, dccp_write_xmitlet); timer_setup(&dp->dccps_xmit_timer, dccp_write_xmit_timer, 0); inet_csk_init_xmit_timers(sk, &dccp_write_timer, &dccp_delack_timer, &dccp_keepalive_timer); From patchwork Tue Nov 3 07:09:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876017 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51BEAC2D0A3 for ; Tue, 3 Nov 2020 07:10:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 000EE22277 for ; Tue, 3 Nov 2020 07:10:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ISRT7LKH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727696AbgKCHKV (ORCPT ); Tue, 3 Nov 2020 02:10:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKU (ORCPT ); Tue, 3 Nov 2020 02:10:20 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5184CC0617A6 for ; Mon, 2 Nov 2020 23:10:19 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id c20so13384227pfr.8 for ; Mon, 02 Nov 2020 23:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8OpCxwSm3PgNpymlgJjYXIblVA6rebCtOQW9fc/WZ8o=; b=ISRT7LKHDau0TRwmMO4TaC7doQQvZFIYhV6k5dbUcAXu0QAeNNdvBY7F8v1EKXRwYB InRFB+Aaie+bmDjm5wHeHs3yfvYVlt8IepwHuBGdU1pBo8iU0wjXsWH4sLlDTvmH/erE 2w4wsFDQQtLCGUlNOltkp5sWc5XIKKVlSjG+kQlu/3sFtECRcKYNPA3gZDtun5Ka+U37 SktZ5bRz0F7sZPcjySQ14ZEsVCAOohtIU1oZ7cPvgtCtxYFSsdYJc3YH+xotMImRWcnr n7Hc5gcdkn+0as3EsktCMBDuexm42/f6vR8dlPtnVLWMi1z0e+/mEemldVKZZ3nVD2j0 qIJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8OpCxwSm3PgNpymlgJjYXIblVA6rebCtOQW9fc/WZ8o=; b=K1AHDSiO+gyN6fywZ+G1i+1q3Bq2p5/txbcAMZ6PLgydWZ2+dR2A0/Aw/9uc7+vCtJ Psa/kZFWiHg5QXE61zQONx3EP9ikNTQwRUE8fSr8ixxGbAljPN+8csjC3j5cSAEvrLPN Fqil8DbMhkwiblZYiwc9NRwphYM67TYhKzjgX/pbmlrPAUMDFX4ctKiq5TbsRNMQcq0y Ub2804YJd1jWQOXaIVXMsedApwqbjpMku30AzLCqyq82ehfUgcU0U0jL2Lljfb3+bMth ADqwE88xyMEC7RWVbWg1G312NhrlWIDrXmGcO4JQgWTgnkf+wHta0Qzf3ts4FBt7YpeO GTsA== X-Gm-Message-State: AOAM533w8Q7BdBmM6sTrOCf6ToYQylPjjWFoGIYEa+j7mz8qVDsBMrte 8CKjrmt9G+y09vK3iBylewk= X-Google-Smtp-Source: ABdhPJwVa6U6wEW6zm+lAs5GsU3YHvRtxcFClIwhJkgNUR6CF6BgE9hm3kGjhWrsj9CQh739sg0rHQ== X-Received: by 2002:a17:90a:af82:: with SMTP id w2mr2391571pjq.77.1604387418975; Mon, 02 Nov 2020 23:10:18 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:18 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:41 +0530 Message-Id: <20201103070947.577831-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/ipv4/tcp_output.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index bf48cd73e967..6e998d428ceb 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1038,9 +1038,9 @@ static void tcp_tsq_handler(struct sock *sk) * transferring tsq->head because tcp_wfree() might * interrupt us (non NAPI drivers) */ -static void tcp_tasklet_func(unsigned long data) +static void tcp_tasklet_func(struct tasklet_struct *t) { - struct tsq_tasklet *tsq = (struct tsq_tasklet *)data; + struct tsq_tasklet *tsq = from_tasklet(tsq, t, tasklet); LIST_HEAD(list); unsigned long flags; struct list_head *q, *n; @@ -1125,9 +1125,7 @@ void __init tcp_tasklet_init(void) struct tsq_tasklet *tsq = &per_cpu(tsq_tasklet, i); INIT_LIST_HEAD(&tsq->head); - tasklet_init(&tsq->tasklet, - tcp_tasklet_func, - (unsigned long)tsq); + tasklet_setup(&tsq->tasklet, tcp_tasklet_func); } } From patchwork Tue Nov 3 07:09:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876021 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E7DC388F2 for ; Tue, 3 Nov 2020 07:10:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F9D520870 for ; Tue, 3 Nov 2020 07:10:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tAr8Ubt6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbgKCHK1 (ORCPT ); Tue, 3 Nov 2020 02:10:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHK0 (ORCPT ); Tue, 3 Nov 2020 02:10:26 -0500 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67442C0617A6 for ; Mon, 2 Nov 2020 23:10:26 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id 1so8153316ple.2 for ; Mon, 02 Nov 2020 23:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dibpCTFspvW/4xr+M6WRNfc+h/zPS3TVICoj/xJH1iI=; b=tAr8Ubt6R2Qet43sFuuaUWUGW5QHQQKPHO+P8UivK400PZ2Imn24qkST3uuWz2Cz5p NgNA4pFhHE4zluix0H+bsUQaJJeGQydl0h8AhhR9X5UqIfuxWdYnpO5xukoZykqBOHxr FdZFROBzRlzfPlLCAdBSasVnQxvMe2yEHlh5Z0spYSwR7MC8v1NugtLHmo29fyyPkyS/ QCh9ffTmn7LsFA7CabrRIlT0nzSHE3ypkQ4qRbXscEIqnglh0cC0Wi/9yIwb7iBuTBjk VrsEnDItlHxsL03IuVYeP9dukpX6PjtbzJ8VD4Fv1bvi4qCVDAm3Mc0goR/Vb3Zs0VA7 DgHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dibpCTFspvW/4xr+M6WRNfc+h/zPS3TVICoj/xJH1iI=; b=V7iHO1EduFjHI2HtSU0KSTC6BwILyL8FPB0I/OQ8VDcLtCKVB1pUfD+Vp0JS1IdS1E 0/No+DuwWFs/HS5QhbZaEBv0gR+QPse8w84Y/sGCwq3bwNpSeVrWGullr9BPrv6bzoQc 334iNvBIiShK9MUMG8yCDoabEP6ApOD+UG9dJl2LDxLnI7SsheHZb1yAndrbZUM5h8/M sKyDWebQ9rc1OUhUVLbCkBYTOJpzQjA4F36YWmwLvH5kAbhipj5lNgiHsqSy7dwmcnsH KF2Vw9VU/tVBZapGKyybWijpJ0vDB0jK586K+M+NW6z3XqtVLrTwsNJBqt5WId+gjUBD +CAQ== X-Gm-Message-State: AOAM532NRVQwBnoeIAvlrNECIRYLY73HAqqj4upLoOKuHRpWP9nXKHXK W+Gyzv1RsjfrfzQ8IvXsjGo= X-Google-Smtp-Source: ABdhPJxTmH+dlFOJjhyGispvMXdmIPrASrqPcPl/9W70UWIE2jzOirQAoxKj5k/Kfsa1VKXvbgVowQ== X-Received: by 2002:a17:902:c14b:b029:d6:ab18:108d with SMTP id 11-20020a170902c14bb02900d6ab18108dmr16912534plj.20.1604387425833; Mon, 02 Nov 2020 23:10:25 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:25 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 3/8] net: mac80211: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:42 +0530 Message-Id: <20201103070947.577831-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Reviewed-by: Johannes Berg Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/main.c | 14 +++++--------- net/mac80211/tx.c | 5 +++-- net/mac80211/util.c | 5 +++-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 2a21226fb518..2a3b0ee65637 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1795,7 +1795,7 @@ static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata) /* tx handling */ void ieee80211_clear_tx_pending(struct ieee80211_local *local); -void ieee80211_tx_pending(unsigned long data); +void ieee80211_tx_pending(struct tasklet_struct *t); netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev); netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, @@ -2146,7 +2146,7 @@ void ieee80211_txq_remove_vlan(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata); void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats, struct txq_info *txqi); -void ieee80211_wake_txqs(unsigned long data); +void ieee80211_wake_txqs(struct tasklet_struct *t); void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, u16 transaction, u16 auth_alg, u16 status, const u8 *extra, size_t extra_len, const u8 *bssid, diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 523380aed92e..48ab05186610 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -220,9 +220,9 @@ u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata) BSS_CHANGED_ERP_SLOT; } -static void ieee80211_tasklet_handler(unsigned long data) +static void ieee80211_tasklet_handler(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *) data; + struct ieee80211_local *local = from_tasklet(local, t, tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->skb_queue)) || @@ -733,16 +733,12 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, skb_queue_head_init(&local->pending[i]); atomic_set(&local->agg_queue_stop[i], 0); } - tasklet_init(&local->tx_pending_tasklet, ieee80211_tx_pending, - (unsigned long)local); + tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending); if (ops->wake_tx_queue) - tasklet_init(&local->wake_txqs_tasklet, ieee80211_wake_txqs, - (unsigned long)local); + tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs); - tasklet_init(&local->tasklet, - ieee80211_tasklet_handler, - (unsigned long) local); + tasklet_setup(&local->tasklet, ieee80211_tasklet_handler); skb_queue_head_init(&local->skb_queue); skb_queue_head_init(&local->skb_queue_unreliable); diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8ba10a48ded4..a50c0edb1153 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4406,9 +4406,10 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, /* * Transmit all pending packets. Called from tasklet. */ -void ieee80211_tx_pending(unsigned long data) +void ieee80211_tx_pending(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *)data; + struct ieee80211_local *local = from_tasklet(local, t, + tx_pending_tasklet); unsigned long flags; int i; bool txok; diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 49342060490f..a25e47750ed9 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -386,9 +386,10 @@ _ieee80211_wake_txqs(struct ieee80211_local *local, unsigned long *flags) rcu_read_unlock(); } -void ieee80211_wake_txqs(unsigned long data) +void ieee80211_wake_txqs(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *)data; + struct ieee80211_local *local = from_tasklet(local, t, + wake_txqs_tasklet); unsigned long flags; spin_lock_irqsave(&local->queue_stop_reason_lock, flags); From patchwork Tue Nov 3 07:09:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876025 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE82DC2D0A3 for ; Tue, 3 Nov 2020 07:10:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76FF920870 for ; Tue, 3 Nov 2020 07:10:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t8GmQVvK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727770AbgKCHKd (ORCPT ); Tue, 3 Nov 2020 02:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKc (ORCPT ); Tue, 3 Nov 2020 02:10:32 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0469C0617A6 for ; Mon, 2 Nov 2020 23:10:32 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id 72so6692553pfv.7 for ; Mon, 02 Nov 2020 23:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nMNRjNylHskhmguTYIM2g5ir+w4s7Zf1QuwlIAsmLt4=; b=t8GmQVvKb0xb6Iske+8cnXf9RM41eGwqv9A80koscras1jEKI+oegBPR+Ww2eBCmWe WzHccbBMXfbFG+xUmTX+M6sYCj7RlSa2YIij0ABHgD1w1P4sJA3UxStMWET7SDlbGNFk yDGcWfnqf0Q/OzAlnM9ok6rgtZGYAsXr8F1VdBiAl6NJUbnlgoyqVbvRWJE9auh+CmNL yFN9B+PkbsrCczUbInzThFNzOEZDaVLqNTiSvlkpBwj5DQcSh63NZVUOsNg3cEarFKJZ WkcHrnFM+xd2gDnMSSECM7UWRfvoQfzr5bbE24X5k4pL4XPv7MJJFLNunrTEdZqkv2wj QNuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nMNRjNylHskhmguTYIM2g5ir+w4s7Zf1QuwlIAsmLt4=; b=caZKul9as+Ws8jBIrDpj0tpZR25RVwH16A+7P3+udcsSlSWZ4qb1jD2RA30hSW1EO+ kevw2gT32QWnvYymO0xjPERqU18H0P0AKxSTANI/xajq14miNvpvslczTM5LGv/h0LwE v9lfOF8u4u6hTqZU7zyFJuKhypfo83gRTMXQ6FVffv3pUxrMpBazDzeGtqmONYA6mbiK Zp5LBLbdxfirZYi0ARZwgeRaXK4yFUqKf9HzHpu7xscpQvm5RJnLYaoGsGFPhB5fMOVM oeGl2SYvUyjGLh/dQHli0nnyNNBm9CBY7jNm2YU06Vg7W3NieySmOplSKXrgvBxyt+KS z30g== X-Gm-Message-State: AOAM533nZBg7QOsDDwaazz9ih/o8zwmk+u/VkE6Wm3TJzNvzYsc2SStf 4mddtPqjyHDLelQd0p/Iobo= X-Google-Smtp-Source: ABdhPJzAMOOqW+C5dtRBBfT2qgAz+3Um/46MEeFeMLHH35aPqlyYx97ZF2ac3z44shFY49XP3e5BWA== X-Received: by 2002:a17:90a:fe07:: with SMTP id ck7mr273712pjb.212.1604387432405; Mon, 02 Nov 2020 23:10:32 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:31 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 4/8] net: mac802154: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:43 +0530 Message-Id: <20201103070947.577831-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Acked-by: Stefan Schmidt Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/mac802154/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 06ea0f8bfd5c..520cedc594e1 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c @@ -20,9 +20,9 @@ #include "ieee802154_i.h" #include "cfg.h" -static void ieee802154_tasklet_handler(unsigned long data) +static void ieee802154_tasklet_handler(struct tasklet_struct *t) { - struct ieee802154_local *local = (struct ieee802154_local *)data; + struct ieee802154_local *local = from_tasklet(local, t, tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->skb_queue))) { @@ -91,9 +91,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops) INIT_LIST_HEAD(&local->interfaces); mutex_init(&local->iflist_mtx); - tasklet_init(&local->tasklet, - ieee802154_tasklet_handler, - (unsigned long)local); + tasklet_setup(&local->tasklet, ieee802154_tasklet_handler); skb_queue_head_init(&local->skb_queue); From patchwork Tue Nov 3 07:09:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876027 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5637FC2D0A3 for ; Tue, 3 Nov 2020 07:10:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F398420870 for ; Tue, 3 Nov 2020 07:10:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HcsdxSel" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727784AbgKCHKl (ORCPT ); Tue, 3 Nov 2020 02:10:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKk (ORCPT ); Tue, 3 Nov 2020 02:10:40 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D60C0617A6 for ; Mon, 2 Nov 2020 23:10:40 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id z3so7010348pfz.6 for ; Mon, 02 Nov 2020 23:10:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eLTansvwhuS/FSHqhj49yYp2DNG3ITpf5pPmyBMM/GU=; b=HcsdxSelfgsTNqiS3e6nT+6IRElsdVhoCztDGNXRWoOsyU2ds2QlUl59vlBL3fXxyQ /1Dq68iB54L+7unzijvHQcSOyCYidsZ7aG44uD8Pc+QNlClg9nTxSf8EdopNAe4Xgsly eF+x8HQtJBFquOOA16B1RPaps6uUzBud/oC5vCuhh9Vw/FOVR3i0Pwuyu0fl7wZT6Ve7 kGKFWKHxKLpqByDtGm5M7hBFB1LiOPsBhTDvdh7fNeV0v5WQ6CW/baXcfhkynXJJOhJm ZLwnKBPfWFAlE7svAITssU6K2HdccV0cQ63eTPp5IaAag1b2NMrhZjxuChiBLVbMWj24 1zFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eLTansvwhuS/FSHqhj49yYp2DNG3ITpf5pPmyBMM/GU=; b=ug3pR20EKBAHhJSEN8ffP2tYI6nFBMfhI/oqd0LP3FM4TI3PyABvWJLWMnXkZ68LKi DKOkAn6s2mVeKO3hNp0NIq6wSzuIC4wVbLQlXX/PZK1s2YrABBIGuitFkV6XEAkzg9eG /jptKnMkMrDy7MPZZ0mtFeBZxhFguYA9bcHTSX2SKB5yFfOy4TwXRrKVFbYuO2uTRFJS FC3EAwdjjCI7Srar/chP5+y2JmdkRD8GzKHz630PjHrh3kLDeZkKylFpD8jlENlxMBHU nwtlRHHDaR6ByCBmtcxWv9e88wcEDbRZhJvTQtredwBMBQwUQmFfo9dYbHuuasOhhiX8 nvAw== X-Gm-Message-State: AOAM530KlKAy7FmgzCIrPuULDXHCVTKigxpaOxLypEMNCbXslTwiS/ru /JmjsyRlnl/ojnaWowKjG5c= X-Google-Smtp-Source: ABdhPJws5qpdmLQNPB+JrywpPPGMx/f3h9R88/kj7yebjeBsmSsiaBbRxhwEQOKhD+lxAW2X+5ymCA== X-Received: by 2002:a17:90a:ea8a:: with SMTP id h10mr2385718pjz.142.1604387439839; Mon, 02 Nov 2020 23:10:39 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:39 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 5/8] net: rds: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:44 +0530 Message-Id: <20201103070947.577831-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/rds/ib_cm.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index b36b60668b1d..d06398be4b80 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -314,9 +314,9 @@ static void poll_scq(struct rds_ib_connection *ic, struct ib_cq *cq, } } -static void rds_ib_tasklet_fn_send(unsigned long data) +static void rds_ib_tasklet_fn_send(struct tasklet_struct *t) { - struct rds_ib_connection *ic = (struct rds_ib_connection *)data; + struct rds_ib_connection *ic = from_tasklet(ic, t, i_send_tasklet); struct rds_connection *conn = ic->conn; rds_ib_stats_inc(s_ib_tasklet_call); @@ -354,9 +354,9 @@ static void poll_rcq(struct rds_ib_connection *ic, struct ib_cq *cq, } } -static void rds_ib_tasklet_fn_recv(unsigned long data) +static void rds_ib_tasklet_fn_recv(struct tasklet_struct *t) { - struct rds_ib_connection *ic = (struct rds_ib_connection *)data; + struct rds_ib_connection *ic = from_tasklet(ic, t, i_recv_tasklet); struct rds_connection *conn = ic->conn; struct rds_ib_device *rds_ibdev = ic->rds_ibdev; struct rds_ib_ack_state state; @@ -1219,10 +1219,8 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) } INIT_LIST_HEAD(&ic->ib_node); - tasklet_init(&ic->i_send_tasklet, rds_ib_tasklet_fn_send, - (unsigned long)ic); - tasklet_init(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv, - (unsigned long)ic); + tasklet_setup(&ic->i_send_tasklet, rds_ib_tasklet_fn_send); + tasklet_setup(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv); mutex_init(&ic->i_recv_mutex); #ifndef KERNEL_HAS_ATOMIC64 spin_lock_init(&ic->i_ack_lock); From patchwork Tue Nov 3 07:09:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876023 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9AC6C388F2 for ; Tue, 3 Nov 2020 07:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8001922277 for ; Tue, 3 Nov 2020 07:10:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RFNudsiG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727799AbgKCHKq (ORCPT ); Tue, 3 Nov 2020 02:10:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKq (ORCPT ); Tue, 3 Nov 2020 02:10:46 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFF0BC0617A6 for ; Mon, 2 Nov 2020 23:10:45 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id t6so8129857plq.11 for ; Mon, 02 Nov 2020 23:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ge4cLiEBpSy5TOrMrj/Ga+3tavq0F26wgBOD5vzjV8U=; b=RFNudsiGoK+LANJ0iVEYmDYmPB/IE5RuM5obRqEh3XYHcmq+S7jWF/E2liz8AGBBQi msLYjyAEHboQkHW1uI1REuudFlZ/iIDzGy5qK+ynGw2h/QE9Gyo+BcVF9hz6MCbnIWj4 cFSe/uoyU8z9LvHY7hYp8DS2NzsgMJBDg2n64ya/uliJRrklJlIo2kf/b0helJJrWKDu t3cDtiUDO+frsWaJ0moLr0NzC2Gc8THs9rwQE1/M2G75Bst2iTJSw+E2db7FzQmR1Ok/ g09szASQF2+QR1+MCDf0ekiVKvW+KRSxYpJMsdUn8m81I+E26ErLWG2RDTpvKEkyq53Y 6uEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ge4cLiEBpSy5TOrMrj/Ga+3tavq0F26wgBOD5vzjV8U=; b=daMSX75piOoyBf8e23PCFqwAFQbSRsjd2x1+zedBVVl5O0TTL6KLjZmd04fGc5QVgU E3wu6kyxwd19AGw3fgY55fWm625uAcsIlrTwVl53TKye0yawqWoThSkP2vPUpV5QFiOB LJ5AJ/wscblN8dHBJRj4eFJn1nv1rFlJyLhGtfqOcXrb3B1GKH2BkDvCk1ZJayXuuOry QfVLOfnlK4WPrACDWEa9kwaaNxyky09gr2PbjUzXB/ciTRFJZkoF6pYiFZZByvwbiWnd 2bmGjhomugFyH1GkYJSUkfl9ACUDPY0Pu6TPdwoH49/oCcXjBsSN/8I6dUkWtdxfqxGD /iIA== X-Gm-Message-State: AOAM531aaFVhCItPG/AIuP29gHexmncPxkidEqr7yhEDCjFF4MM97bSL Fs5njP+p2HpbhFEf2fFxL1A= X-Google-Smtp-Source: ABdhPJzZwWj26cQwZ8/57guLBoKNkwCKwybgeCJpb6VVtp8dZdyzLiGhpeSS7hAzS5VxHrNvwelP6A== X-Received: by 2002:a17:902:76cc:b029:d6:6007:9372 with SMTP id j12-20020a17090276ccb02900d660079372mr23305695plt.50.1604387445603; Mon, 02 Nov 2020 23:10:45 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:45 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 6/8] net: sched: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:45 +0530 Message-Id: <20201103070947.577831-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/sched/sch_atm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 1c281cc81f57..390d972bb2f0 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -466,10 +466,10 @@ drop: __maybe_unused * non-ATM interfaces. */ -static void sch_atm_dequeue(unsigned long data) +static void sch_atm_dequeue(struct tasklet_struct *t) { - struct Qdisc *sch = (struct Qdisc *)data; - struct atm_qdisc_data *p = qdisc_priv(sch); + struct atm_qdisc_data *p = from_tasklet(p, t, task); + struct Qdisc *sch = (struct Qdisc *)((char *)p - sizeof(struct Qdisc)); struct atm_flow_data *flow; struct sk_buff *skb; @@ -563,7 +563,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt, if (err) return err; - tasklet_init(&p->task, sch_atm_dequeue, (unsigned long)sch); + tasklet_setup(&p->task, sch_atm_dequeue); return 0; } From patchwork Tue Nov 3 07:09:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876029 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EA25C388F2 for ; Tue, 3 Nov 2020 07:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA5DB22277 for ; Tue, 3 Nov 2020 07:10:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mj/6GsC5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgKCHKw (ORCPT ); Tue, 3 Nov 2020 02:10:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHKv (ORCPT ); Tue, 3 Nov 2020 02:10:51 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7B58C0617A6 for ; Mon, 2 Nov 2020 23:10:51 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id x23so8153649plr.6 for ; Mon, 02 Nov 2020 23:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wyxxcSZc1SJ6rvTowrOjryo8LHecdATP5X2cPcq3mdc=; b=mj/6GsC5yALid87j12A0nPtQvGrSezfoya+A2rIa1N4HCXgBHgsvwEGjKXyYGTa7rO TCoAAqrUm/NHX8oD02IQXOmJq8ZRLvkYJP2usBQKbMSJEwHyNojJ/qHHgHw73PTDf21/ iAuQpATGfJHB6+klswbJspfplbrqvNggeLyoGBIwA8apGYZ+++6tUv//3BOYQGvE81rR 05guizYqLd5X0yM92WGLquxDCb87W/S7zQQs5CpUvTW23ClYHIBf5liRmHDiEPhMWuLy lMTcW+6EsyeWwZHy9H3LUabcpHyJTtfDTgOL4jstoWdah9pFuF3sj0o6R4VXw4ZJfhGw hb5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wyxxcSZc1SJ6rvTowrOjryo8LHecdATP5X2cPcq3mdc=; b=EbmXtdJXogVywiMmqlNNHNw99dpQptyHjZj6ZY3HdpfUAOUCqy10f2gjKBxNuJBcAC y/Fk3aKRSrn2l6jR5PMEPuw3SLgA9eAwxEnIKk0HzCLS/KPoYNW0Wt/P+dWiSRFaXY5L AOBfqNrblxI2f5llC85GvfrFzqDQkvc5oBZyUVvMFuGN/cY4V37pJlrDr3Xs6uG3glgp bWuwnB1+87CNhCB/D3TCOaGdKkKP9i3mYjX3M9Zop0MaRnnhG63NbS5CZ/s6sW6GcBTe u765EBkAhfwYxcNWqsrDnka2sroYtWGN3lZKOgmcBWOx4Vdp3zCVlR/kMo2FnVQ5BvJC xgWQ== X-Gm-Message-State: AOAM530hybkFVHtgJln2nUOW6axuhKKZDBUkyZHMQzpUPEDQW7YB0JER xZAffiN1pUNOdOkzYyt6+ZM= X-Google-Smtp-Source: ABdhPJxZpHwxSZViSu36Gr+KGc2H61OSN+wF/PTCfnhLPh2JmNWoaO+I6Ufza37vS+/IETSBW+jfjg== X-Received: by 2002:a17:902:a40c:b029:d6:e361:7e4f with SMTP id p12-20020a170902a40cb02900d6e3617e4fmr1236216plq.58.1604387451354; Mon, 02 Nov 2020 23:10:51 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:50 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 7/8] net: smc: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:46 +0530 Message-Id: <20201103070947.577831-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/smc/smc_cdc.c | 6 +++--- net/smc/smc_wr.c | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c index b1ce6ccbfaec..f23f558054a7 100644 --- a/net/smc/smc_cdc.c +++ b/net/smc/smc_cdc.c @@ -389,9 +389,9 @@ static void smc_cdc_msg_recv(struct smc_sock *smc, struct smc_cdc_msg *cdc) * Context: * - tasklet context */ -static void smcd_cdc_rx_tsklet(unsigned long data) +static void smcd_cdc_rx_tsklet(struct tasklet_struct *t) { - struct smc_connection *conn = (struct smc_connection *)data; + struct smc_connection *conn = from_tasklet(conn, t, rx_tsklet); struct smcd_cdc_msg *data_cdc; struct smcd_cdc_msg cdc; struct smc_sock *smc; @@ -411,7 +411,7 @@ static void smcd_cdc_rx_tsklet(unsigned long data) */ void smcd_cdc_rx_init(struct smc_connection *conn) { - tasklet_init(&conn->rx_tsklet, smcd_cdc_rx_tsklet, (unsigned long)conn); + tasklet_setup(&conn->rx_tsklet, smcd_cdc_rx_tsklet); } /***************************** init, exit, misc ******************************/ diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index 1e23cdd41eb1..cbc73a7e4d59 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -131,9 +131,9 @@ static inline void smc_wr_tx_process_cqe(struct ib_wc *wc) wake_up(&link->wr_tx_wait); } -static void smc_wr_tx_tasklet_fn(unsigned long data) +static void smc_wr_tx_tasklet_fn(struct tasklet_struct *t) { - struct smc_ib_device *dev = (struct smc_ib_device *)data; + struct smc_ib_device *dev = from_tasklet(dev, t, send_tasklet); struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; int i = 0, rc; int polled = 0; @@ -435,9 +435,9 @@ static inline void smc_wr_rx_process_cqes(struct ib_wc wc[], int num) } } -static void smc_wr_rx_tasklet_fn(unsigned long data) +static void smc_wr_rx_tasklet_fn(struct tasklet_struct *t) { - struct smc_ib_device *dev = (struct smc_ib_device *)data; + struct smc_ib_device *dev = from_tasklet(dev, t, recv_tasklet); struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; int polled = 0; int rc; @@ -698,10 +698,8 @@ void smc_wr_remove_dev(struct smc_ib_device *smcibdev) void smc_wr_add_dev(struct smc_ib_device *smcibdev) { - tasklet_init(&smcibdev->recv_tasklet, smc_wr_rx_tasklet_fn, - (unsigned long)smcibdev); - tasklet_init(&smcibdev->send_tasklet, smc_wr_tx_tasklet_fn, - (unsigned long)smcibdev); + tasklet_setup(&smcibdev->recv_tasklet, smc_wr_rx_tasklet_fn); + tasklet_setup(&smcibdev->send_tasklet, smc_wr_tx_tasklet_fn); } int smc_wr_create_link(struct smc_link *lnk) From patchwork Tue Nov 3 07:09:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876031 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AD78C2D0A3 for ; Tue, 3 Nov 2020 07:10:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD98322277 for ; Tue, 3 Nov 2020 07:10:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s0RanAXV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727827AbgKCHK6 (ORCPT ); Tue, 3 Nov 2020 02:10:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbgKCHK5 (ORCPT ); Tue, 3 Nov 2020 02:10:57 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF974C061A47 for ; Mon, 2 Nov 2020 23:10:57 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id b3so13417722pfo.2 for ; Mon, 02 Nov 2020 23:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JApShhfCvmLPl+HZpc9d9E6Zu3XN4DCqO1cBwrgabIk=; b=s0RanAXV2mPo+3695gzYzgAgRN9h8fGQLBZ7WtEUm7cxlYLMXQw5fFWBAu/ByTMWyH ziHysjK7q6OZ8Xzrs5SWw3zt7DomvUDl33xnrAIWvEYmg43nUfbLz3A8gKk56iOLPM3u XNLOonFtXWaOvwjQXqDJGYqOrwyGvif9SFITtRjpfHDKCXUp8h4GjCPzlA3Eks3jyo6v 7NFkBbaB9tslHj4gE8m67Kp7wsW7de+44krVsNaJRVkTeXq8NTM0gBp1S7FoBrnXjJsM hOdKbts1AtbUloFtQGO2IKdn8/9UptL8qYabXNhVFTEGcWLa1FEy8y8Tt1/JyN8CFwC6 bIoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JApShhfCvmLPl+HZpc9d9E6Zu3XN4DCqO1cBwrgabIk=; b=AFgc8cjFC5Acn2Z8qSbjiiYzDDHgXLp/+3enxetnBJ6aC+efmws1dwzIFjzGy1y9FI 4dPQ7ykQizMx57i/WH15pRNhlVTiaaO4dEXT7TVqLrKjMluVSustmC10nehDNOcUEtjE OLKKUeSg9BDGPC6o7MUTbIFXrKuvuahNsFw1KaZ1MXHzcfu7zra8eRCnqAtsNgJ8Wcqg XqTS3Dw4DmKY5/RhOPGfKI8W0EpBbFCarwh6XsDsQ6j1Ax/ywl9mzgJMHpiPZ3gLoxDs 4V15nUrL3MJeYztPs4PNfO84IYNbi2l6R3h7utRfNcrMNYaFYPCKUwP8SrD7jRf84smP /FBA== X-Gm-Message-State: AOAM532khEL+4nebYzIEem6v2W7sOakPngWjCkjEZuHmApqOFiASNtSF gKgdQ6mAdPMTLvYMDi6qpeo= X-Google-Smtp-Source: ABdhPJxDiSDmiqcx+4I6fGONBXIPqJcjtRBbG3JcX7Wwd84dnJXoBDpK4igwQOfxS/+6Zsng5/cH5A== X-Received: by 2002:a62:55c6:0:b029:160:1c33:a0f7 with SMTP id j189-20020a6255c60000b02901601c33a0f7mr24693223pfb.35.1604387457344; Mon, 02 Nov 2020 23:10:57 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id 92sm2020074pjv.32.2020.11.02.23.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 23:10:56 -0800 (PST) From: Allen Pais To: davem@davemloft.net Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, johannes@sipsolutions.net, alex.aring@gmail.com, stefan@datenfreihafen.org, santosh.shilimkar@oracle.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, steffen.klassert@secunet.com, herbert@gondor.apana.org.au, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [net-next V3 8/8] net: xfrm: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 12:39:47 +0530 Message-Id: <20201103070947.577831-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103070947.577831-1-allen.lkml@gmail.com> References: <20201103070947.577831-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/xfrm/xfrm_input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 37456d022cfa..be6351e3f3cd 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -760,9 +760,9 @@ int xfrm_input_resume(struct sk_buff *skb, int nexthdr) } EXPORT_SYMBOL(xfrm_input_resume); -static void xfrm_trans_reinject(unsigned long data) +static void xfrm_trans_reinject(struct tasklet_struct *t) { - struct xfrm_trans_tasklet *trans = (void *)data; + struct xfrm_trans_tasklet *trans = from_tasklet(trans, t, tasklet); struct sk_buff_head queue; struct sk_buff *skb; @@ -818,7 +818,6 @@ void __init xfrm_input_init(void) trans = &per_cpu(xfrm_trans_tasklet, i); __skb_queue_head_init(&trans->queue); - tasklet_init(&trans->tasklet, xfrm_trans_reinject, - (unsigned long)trans); + tasklet_setup(&trans->tasklet, xfrm_trans_reinject); } }