From patchwork Tue Nov 3 09:18:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876385 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 BBCE4C388F2 for ; Tue, 3 Nov 2020 09:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A4662242B for ; Tue, 3 Nov 2020 09:18:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OvEYbHo3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbgKCJSp (ORCPT ); Tue, 3 Nov 2020 04:18:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbgKCJSo (ORCPT ); Tue, 3 Nov 2020 04:18:44 -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 28CBBC0613D1 for ; Tue, 3 Nov 2020 01:18:43 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id 1so8300434ple.2 for ; Tue, 03 Nov 2020 01:18:43 -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=OvEYbHo3vzzjaz2MFLvoXq3TOPO1hezqiCCwqNO9Y82uk0QoyCPjloSWgK5x0K+xnh WbIRxXHQX6bc11NX9Pf1FUdMB8ZHnKufmwwuaUyrSuO69Wn2AjlR+mbYimhWjMGO8J17 6e+eW1kw/x35K7Tocqt0EkGnP2fk6EDd73NJlHYiQLOXk4tqRKB9kG8UNAyza702wQ+H iqr5jiPJ64Ydmss/qrrHFx85P2SHkMYNyPycoslCvVAjsYytLGGZZM3ermUmEqCYBN2S I+3wRG0Zxv9e12lQbhCVqWwfwxx99AmYbw94ACNKKmQN2WoTDHxlf1xgYlpaVRqZu9q4 5hKg== 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=ZLO9paeCco2wPIlW8V796WhHcoKBTg6DmQnYX5ZuZqjJEzMwqO+kC+eGzqcMmI3aI9 PN9qhUQoOF12HmGi/XvTrK6jVQ2NriA1fILabu0NNHm7pxOnhValvWmvF/sVlsnrqw65 UYVrvh6THBK1P/hzpA53DF4kiLu78/ESK8EhWMimmqdTEoaij+ffPMcjxhU08G/derRF 8j2gcRxv3faeWweN1FtVCQDXDYROCB0KOwDKOMuB0xFPJOImCrBZNSzfNWbJ/OIgCQ0z WdM1NMaYtGJusf+PAHogtGOFyH49/Aer8veYJDUIIBopBxF3g/6jTTIx/3HbysIZ6JjZ PO3w== X-Gm-Message-State: AOAM532Un84XD9HjWF7zz+mlhGbyBqgBiyhUq5ueeLVio6K7Z8eCEf8I DWJDql3Lwm51Vc7qDkNDpog= X-Google-Smtp-Source: ABdhPJznQGbFNaTz7CxM7zn0tXOdPKm6W7NBu77qB8hOhUCKp7YvH8U+cpqy65LA3yxqHtsjRy/P1Q== X-Received: by 2002:a17:902:b689:b029:d5:e78f:65d1 with SMTP id c9-20020a170902b689b02900d5e78f65d1mr24517621pls.6.1604395122740; Tue, 03 Nov 2020 01:18:42 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:18:42 -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 v4 1/8] net: dccp: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:16 +0530 Message-Id: <20201103091823.586717-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 09:18:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876383 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 48B4DC388F2 for ; Tue, 3 Nov 2020 09:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E66C2242A for ; Tue, 3 Nov 2020 09:18:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DdLl75iX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbgKCJSu (ORCPT ); Tue, 3 Nov 2020 04:18:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgKCJSt (ORCPT ); Tue, 3 Nov 2020 04:18:49 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8227CC0613D1 for ; Tue, 3 Nov 2020 01:18:49 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id j18so13674848pfa.0 for ; Tue, 03 Nov 2020 01:18:49 -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=DdLl75iXhMMb3xxzjiqOqaDZDZMqBd2npZKIR/JsJtKdQ3BkuPlwYKGw9vTL8jBFi/ OeYQcR4jo69NRr1xAs/REGhdgz2xYEZEnqegMhyUju4kjAIjLfxBEonnC9Evwz1JKh9I dsgOLFPFm9hfwe+syfdkRfYBun00wXQOqVeXnpnGe+HQcxazVAO8N87UQ9skoo+zGdAE LZ6JBcUO7Fg4Gu/xiMNHssOrPBdw6DvYSZFI5NGkLtab3z7RB4RkeDzJ3O6Dw0ULMA1K +i8l66K/Drgm7wcttM/lCMaBcqdG70KKT/EoA2of10BxRMfP/gDl/m8DZh0JMJZaLa+H Zavg== 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=fm/GXaH4bwVPMCqX+FHZMzyaljrX4HHGqqgFb5I6aIke8i2eORDKLgNGAqH65g+12o 5SoHqPohy1z6TQ4hLw7kQsAc3VLwgF7DoQdGkdZARt4vUDDLyBOx6ZXDz96noTiG5a8O qddWTVXEMrkMvfY1G8v8AXz0gm+S17squPwyoCXkfBPnEDAJwjTymR484nRpbdmdMcT2 M8mFxmOxrrbNkTXJG9DNKe4zAcb+NUAz/AYVTZNWCrDKj4xhK0L+nqHFRj8pdhOvsvSR Cn83O0QrM2Y+IlPVa9VN7ioJylJRfqRZWf8DfyD9To5sK1Ss1ZosuG6EKzuq6puVgnBZ wNWw== X-Gm-Message-State: AOAM533+EhKBhO2Cbi5a0PDnk77/ZMSEnclDVfbR157AMVeaR+4Q5Cid gGobzeV2gNGAZmJ9/oD9SxQ= X-Google-Smtp-Source: ABdhPJxfoOdC+D5+BF4IetuAdWD+yHuaekB+CCmqEeGJ4mE9ax/2zAwnJ5JBWP0zHKhvAPVgpJ59bw== X-Received: by 2002:a63:f551:: with SMTP id e17mr3598866pgk.170.1604395129126; Tue, 03 Nov 2020 01:18:49 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:18:48 -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 v4 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:17 +0530 Message-Id: <20201103091823.586717-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 09:18:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876389 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 C435EC2D0A3 for ; Tue, 3 Nov 2020 09:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 630612240C for ; Tue, 3 Nov 2020 09:18:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lfX7bST9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727553AbgKCJS4 (ORCPT ); Tue, 3 Nov 2020 04:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgKCJSz (ORCPT ); Tue, 3 Nov 2020 04:18:55 -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 A1C46C0613D1 for ; Tue, 3 Nov 2020 01:18:55 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id 133so13646744pfx.11 for ; Tue, 03 Nov 2020 01:18:55 -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=lfX7bST9U2TuTClRa12sLxhNFsarV/EFLVD8WIDH+PgnbmsxvdkpNjitfHLxVbtFBn h2N8pUIlNy97PGE5aLrt3Pq4teOGFTcvv7YE4ny9FpYkmArcD7hHNIs0g6Q9hHbBSZCY XLmc3DTQKWg1PmYb1CP0K0z6DYdYSfjB8dyktZJrdBx+dQmDxv53zVy2W1AMsOFS5uZc oBE6jov4xwK8E++Z/0kIEvlqMoV2sRtLcE9qOIqKocVj3+eMcSCNsCiCSeOqvOgJOXG0 avydQQQ4fzR5MrUGSc3udp6oFW9fxb70tiaHUzxroFxAaA2QlhkP4w+Y9D+2VD9iIPvA 2aIQ== 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=XOVGXffKKAQt8D1U3pZhIJ6ACznZOPQG4tQlBU8b4Sap3euy0geIUEudHIRzv/U4lb jMeBP2IrRvQupaZlkrB0OlLH7mVBEOjQWWaiMQXe2pGkfJ5GVnH2FvdSwP7Vy8PddH/9 4aDOuqeXl1KnkYs2S46E9E7MLWYLLdw3KZ8x+Ta5PljnHfWY4lrthVxFzl/tRcWue6me Wph/YsgmBXp9ufmPK3zHoBzfwKYBUbF9QUm1zsMMX1qGaH3qQa6E1ZiKIiI0yevwW0ai ksWOUgxH4UAv6G0rlylKTiyEb3HIdAC3E4fB5viFgj6/SWPIKL2Zh3LigjOUcxIkbtf3 mbTw== X-Gm-Message-State: AOAM531ebEHigSmmvcZGI/17Cv8muJDxRddjRmlRq/6hWYHvMllSIcYS by1MRRekgKmijaFNvBW3wuc= X-Google-Smtp-Source: ABdhPJw/cnr4y7akWoaj+6cQkQayVR4n/WQniSEteK6HRF8E9XFDl+uCLFIbtvM9Aqs9Jyie3gADlA== X-Received: by 2002:a17:90a:d182:: with SMTP id fu2mr2857108pjb.145.1604395135251; Tue, 03 Nov 2020 01:18:55 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:18:54 -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 v4 3/8] net: mac80211: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:18 +0530 Message-Id: <20201103091823.586717-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 09:18:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876391 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 977C0C2D0A3 for ; Tue, 3 Nov 2020 09:19:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45DBE22400 for ; Tue, 3 Nov 2020 09:19:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oFlEmYGl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727657AbgKCJTD (ORCPT ); Tue, 3 Nov 2020 04:19:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgKCJTC (ORCPT ); Tue, 3 Nov 2020 04:19:02 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C096C0613D1 for ; Tue, 3 Nov 2020 01:19:02 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id 13so13653250pfy.4 for ; Tue, 03 Nov 2020 01:19:02 -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=oFlEmYGlvL24rsIjgrI5dUafiVVZlIpy6u2aRq0b0pA1qppdgu4T/jXzheIaze9jJc 0ufmKXqVxoYr7Mu8Bz7iSqVimy6bZBw8jM/wcNo3s+f2+FYp76P4nxqorAUbT7wi6mWP B+I/C19FNRCtBz7FBOBvB9X68uUA+2NhAnIyHx9y58UHoQPxBph5IexY4TlT3SOurSeG Gh817beda6F+/cP+HY91UfzQBGmyKRO6E1OmZn2TJfIG1bNLS7yqJT2pqYnxCHxQNUwG CPr1hXxmPmG+YNrtS484T3q0YOTwoKcIHXdPfpNWDgFveRgDP/Xe40jKcrjzyERAplEO JMJw== 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=GinOl0ZKqxk517Vwy6K2kWnjVaFdKTPD6xOg2KL60kIb60Qta8D/NmiO10vA0/APU8 u6xozX71d+tRN+e3Jv6icrvTn7LcYu026dtC/Hi3XYxV5yjEgzYd/DXaYeDtS6zQUxMx vCRf3RhdMvwL22t84smFhv5PKyY3p/86HyxH5kPfMSEUNxtxjPz6H7KS5rqU2D0ZOUgK 0U6AhZD7CFVdIBnXxctbhlqdr4pXCCaReslvQZYNzRJa9oO9o12V5GusbH2DBwpdpwT9 uFTnQ7KBDbrYnVgp5LT+lIhIatqXgDcKMWph3ubwuNE44lZE7oh7S2ELECnAbD5GW3A0 HTPw== X-Gm-Message-State: AOAM532UcNFIAVaF9q4Ovv8IdLxcx+cAlPsLbgqO3AyKn8PRJb8bqJnj wTm11w1NoYiAFKKsNWx4usU= X-Google-Smtp-Source: ABdhPJzPq+my/nctZ053QeS4R19JnND1UU+KBwFBKfnSdJDSx03YV+olo5JCvPniHUxuNvkF455S0Q== X-Received: by 2002:a63:f84c:: with SMTP id v12mr16566822pgj.125.1604395142204; Tue, 03 Nov 2020 01:19:02 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:19:01 -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 v4 4/8] net: mac802154: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:19 +0530 Message-Id: <20201103091823.586717-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 09:18:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876393 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 2E70EC388F2 for ; Tue, 3 Nov 2020 09:19:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5B512240C for ; Tue, 3 Nov 2020 09:19:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sr4uQR43" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbgKCJTJ (ORCPT ); Tue, 3 Nov 2020 04:19:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgKCJTI (ORCPT ); Tue, 3 Nov 2020 04:19:08 -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 33D0FC0613D1 for ; Tue, 3 Nov 2020 01:19:08 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id a200so13638940pfa.10 for ; Tue, 03 Nov 2020 01:19:08 -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=sr4uQR43N86qnT5gb3StcgiOvcZuaAHbuXs+v2Nxh9lxR0AEjJ3AQaCW4Z7McQJyIh 63pDVLiXc5Hsfgjj5x59SkLh5zAYLGrBpwIJGO8Ut/KOCbs1Cg+MtaNsqNgnzU7+bjhI nH9//96IlL3Ghdn1CYIia9vmTq30NRtpyBIor61Wynuwhwfw8M8kEtyrz4QXjV4RBLmN 42wsfNUxsuKT+Xi/yMrdw91p2qBXTV9DaPYqXuy1qN2tebzj2ES4/hJIPIRrjm/dBMna UA8J+LJArr/rdBCVD72Ui98rHS0QN8cmRvIV/Y6gNa4WM4spp0W/f3Nj03jXdITbMmez 9EAg== 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=TBzxZvW1R9K+ACQcXnxGRZRbXFntCH6pPDiwys1CcBw1RJNImfW8/ZI1R45wK62FGf 3S5fe/r/15VsKjEEyO8FaZq8zyWXkJ48wAIM23fTENCDJ+2wQEcLIvCTEDM0Zji7Ag1u lFs7XWjS73ROEIPwGCx31ACxBJwEzPmd89aMUBKP6XejO3nsQwxuySlFukNok5UZ0bvL 94ceAKwTdhW9QBpPqcl0p0OTnJ8uvYYvOMR4JsQJJVDZg5zRl+iLpAIPDoX8QUqMSCAo XvisTlGQyp1nxtMJYiWT5/W1qlYydwr7U6AGRSX4nAcvqHna/Tby2Lji+RFC8pmaJIcI l0ZQ== X-Gm-Message-State: AOAM533UV9iwlJV9uwy8JkvAvZHJ0fQHORiGe+pAW2HrZAboU4UcoOdw gfG0us3KlTGO5RRmQRF2mrE= X-Google-Smtp-Source: ABdhPJzoVWPFdJiBnFQHm6ma+jowTXPeb/kcQM+TEilMDUgMd4nHTvazbErVej6378DYYgKzZ8G4Nw== X-Received: by 2002:a17:90b:4d12:: with SMTP id mw18mr893753pjb.32.1604395147877; Tue, 03 Nov 2020 01:19:07 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:19:07 -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 v4 5/8] net: rds: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:20 +0530 Message-Id: <20201103091823.586717-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 09:18:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876387 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 37F10C2D0A3 for ; Tue, 3 Nov 2020 09:19:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D014822409 for ; Tue, 3 Nov 2020 09:19:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rMOaIqgt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727709AbgKCJTR (ORCPT ); Tue, 3 Nov 2020 04:19:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgKCJTP (ORCPT ); Tue, 3 Nov 2020 04:19:15 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D765C0617A6 for ; Tue, 3 Nov 2020 01:19:15 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id 1so8301005ple.2 for ; Tue, 03 Nov 2020 01:19:15 -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=J6To5x+/NpmSzPdToXkC2fL7RskesiLWAv1XVW6Uqzg=; b=rMOaIqgtb1OJTjCIZcMzutVqgJxqmPfR0sSLjUCmhI5NeSb7GUnj0igqQnh0R9Im5K hayoThholeZ2oQ43TihklgISWDsyrcy1m5/11JMVa+ORflttjN9TjGmnLTFE/K67HehN oSnm8UrMIMoU9nrgSsmiKInBO3pwoR2Mz2bS+ILd5cTBimxZgHhm42bJqWusjPYm6eTb 4YEDiO6xDaH/n3Crf64dietkoLtbzruVEhBDPkzprFTOQkw7gq8U7cqJy81PlcaCPKuQ Gdf3yvHdzNB/kenTD8j2ddqtUVLwG+TYzt7TuAcCLogPp3eFWlZTQAd/lCf/eXC+Ldl0 Nd6w== 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=J6To5x+/NpmSzPdToXkC2fL7RskesiLWAv1XVW6Uqzg=; b=k9BVC53YHiSsRO1V83AvkeExN/UJoryyDn6fqngMxlMDLRVS8wWLDRAX1LPCmiqJ+z VskpqaC0GZPfpJBBZP2dl21qNzDA3g2LVnZOYbRybJ9Y+qcaCj6E3j/+J80mEmEtalJL VU8lXIheJ4GSv9Y48oV9uyb0g49+w3fzWMpUOlQuEBeDCN//h8VqWnjV9UnVD3NoEEDM e801cZw1CnIo8jclevJW3jphFpXYDpjnUtKvKygal+WeMghBil5jaLgicu3vzyrpgwng xzEFb1TWD1gNJ5cAQDTgLJ/ReI8/9BURPSzvJqgpg4j/1vFB5q36iPgLco4UdpN2id6T eOvA== X-Gm-Message-State: AOAM530UoW2RS3o98nP07D8qNXRSsNieu+rrMeUctJ+8hGDR281ZZUsH qqulaUL+6qsaPpuTMAfmBDY= X-Google-Smtp-Source: ABdhPJwThl9EQ50CzXVrkPlMCCotgWiX5LyWomgN51fAHRZWAHeEwpJzKhqOboGZ6K84Bo0TN70SNA== X-Received: by 2002:a17:902:8215:b029:d5:f299:8b11 with SMTP id x21-20020a1709028215b02900d5f2998b11mr24548965pln.39.1604395155046; Tue, 03 Nov 2020 01:19:15 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:19:14 -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 v4 6/8] net: sched: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:21 +0530 Message-Id: <20201103091823.586717-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 --- include/net/pkt_sched.h | 5 +++++ net/sched/sch_atm.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 4ed32e6b0201..15b1b30f454e 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -24,6 +24,11 @@ static inline void *qdisc_priv(struct Qdisc *q) return &q->privdata; } +static inline struct Qdisc *qdisc_from_priv(void *priv) +{ + return container_of(priv, struct Qdisc, privdata); +} + /* Timer resolution MUST BE < 10% of min_schedulable_packet_size/bandwidth diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 1c281cc81f57..007bd2d9f1ff 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 = qdisc_from_priv(p); 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 09:18:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876395 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 41E77C2D0A3 for ; Tue, 3 Nov 2020 09:19:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D66DE22409 for ; Tue, 3 Nov 2020 09:19:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uMhEzYwL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727760AbgKCJTY (ORCPT ); Tue, 3 Nov 2020 04:19:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgKCJTW (ORCPT ); Tue, 3 Nov 2020 04:19:22 -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 48129C0613D1 for ; Tue, 3 Nov 2020 01:19:22 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id 13so13653965pfy.4 for ; Tue, 03 Nov 2020 01:19:22 -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=uMhEzYwLkJsxI6qmsLBnZdyfixHm1vT+X8J7R1fezQf4fafyH8EYQZg2DwxxH+zJX3 mieH5UHhjzfzUEoVwhbnWMdb1zJelrkBFQ8mvxhrj9UZFzgYEQ7arHFJAkvUECzRYMjy dMwon+G4adttFTTK4TZYO3JxgaGVZP3uaiXlMSliSQOjW6hHcTD/Hs8KEfaCkAN4fw+k 42wncShiNuPiyOLwY7b3tlv8hilSTxbaPBb5/dIXf8E7ucGpyw7aF6LUrVy7/7p2l6Xy HaG9KXZejPEIxd2pwdQ5MC+10RoD0XdSUUJvYzLU5eEGbwZIhJCVRauVrrmjjwzzsg7T 24lw== 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=e6Hjp2bmWrJYHmy3WfnB+FY3M5h4WB2R+REnvptTAZ0cvZE7j4ukQjdpcTaw1/fQhD /kSDcxLaMypGNTDCxGe2BGK5KA4ALuxofxo7/crp2V94Ei5bxD1owmy7SdyhoKQgWGFj 5aMjg/K/Vkp7H/81SgFeQ50ZsJ2jsVfDElrXTCGsfFEgXTwQiggEwsbgB3Wb5o6Vspxh BVLtKoMLuQjCcqRgU/L6oJfKjEi92+BudPRmjD2O9YJ4rBVzbeabf4l4g4ruos/6hLRu 6HsvsoZTTfZPaekEb0Yq8HCVpWek2OuL6w8/h3vbZQ+pYAbIZPAWSwxyMsApL8L/qLgg Qt9A== X-Gm-Message-State: AOAM533INCmJ0fMRynaB3vlmvuN4xkf1yyPHEYrK0gEIHP5iTFZrT6pF 3bvFvFSM4dce0dfer97/YtY= X-Google-Smtp-Source: ABdhPJyajSSutkaxnYVxtSOjHaOlfXBq4a3N1or4cIxsOzk4tGwJH4paYGCe6ceYjejYvKArgS7EKg== X-Received: by 2002:a17:90a:7089:: with SMTP id g9mr2862637pjk.4.1604395161941; Tue, 03 Nov 2020 01:19:21 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:19:21 -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 v4 7/8] net: smc: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:22 +0530 Message-Id: <20201103091823.586717-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 Acked-by: Karsten Graul --- 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 09:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11876397 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 509D2C2D0A3 for ; Tue, 3 Nov 2020 09:19:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0055122400 for ; Tue, 3 Nov 2020 09:19:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fLG/nK4X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbgKCJT3 (ORCPT ); Tue, 3 Nov 2020 04:19:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgKCJT2 (ORCPT ); Tue, 3 Nov 2020 04:19:28 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F2E9C0613D1 for ; Tue, 3 Nov 2020 01:19:28 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id i7so11267008pgh.6 for ; Tue, 03 Nov 2020 01:19:28 -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=fLG/nK4XKMQQPerHv3ZwDKzwo83lQfZ2M2ch6ojyzq/QCXQfmoZ+1TFQpzvmfOFYOL 970I0oLCkBtLdRrFP1ncsXzQxCWZpsYkKl31CLusiSxcvxNoMj7JNC7iK8pjg/JhJuvk GWiCmYlgUvlJOyC4v6YF+HeI/kelGQ4NBbMt1uhGtLjNuR7HxC3mEzMDG1/U3G/WiHxU 1g+qxPBH2jNS/b7Q1oomk2Z82rSsfXkOa7ZfLRckD8bRCgOMxsF1d8VlBv1wqOLVjjzr Ay7w+2+5i8cJJ8Sfu7T4P1z5tn0rjrowXu2odNvn0gXHoXlEkqgqOfBKW87xx2QnwNiK ghMw== 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=alRzZ/6um+W5P+QnS/UMTHq/YLhKAAou1mtdI2InIxRPZ+HRDy48tgIddfR0KglGwT AeLuNTdj1iEfXMWICMwPcINcQLI92NPxSmGtHtjMZKjVv+y1W9aYBee8hRaWk/2KRmbF jdVg9W/WHcKpJ9JHqmjuzbT2S0B08uuz9J3v4+slp26ItdlhC+yBEHgDBXunuwYLjwcS H5N80M2LSF9Vk7Ao2laxj1Fr5ldbzOa0kVEGemQeIMHVtVlapQC936xgsfU93ehO/gEH ZUAi1slKM14/kkBs6+50ws0SLc+/sst+3yI+D/RV3//qdN7yJjwsGULwYCXkqpA8Nixf pvPg== X-Gm-Message-State: AOAM532fn9SdQVbyMYeEjvUIC54gu4tKy+6TQjMD6bwtMZxUEGnyRvo9 K8eAGFYU8SvVY2Irr9VqHzc= X-Google-Smtp-Source: ABdhPJyFL6NvRrNJE5SNjsKYo99q2br2Brc2miLaO0vZVrv9N6dcbeDt3YKPtIUoXk7Vq1LWwTQ/6g== X-Received: by 2002:a17:90a:f0c7:: with SMTP id fa7mr2900184pjb.3.1604395168043; Tue, 03 Nov 2020 01:19:28 -0800 (PST) Received: from localhost.localdomain ([49.207.216.192]) by smtp.gmail.com with ESMTPSA id f204sm17178063pfa.189.2020.11.03.01.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 01:19:27 -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 v4 8/8] net: xfrm: convert tasklets to use new tasklet_setup() API Date: Tue, 3 Nov 2020 14:48:23 +0530 Message-Id: <20201103091823.586717-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103091823.586717-1-allen.lkml@gmail.com> References: <20201103091823.586717-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 Acked-by: Steffen Klassert --- 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); } }