From patchwork Mon Aug 17 08:51:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262447 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=unavailable 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 88351C433DF for ; Mon, 17 Aug 2020 08:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64C18207DF for ; Mon, 17 Aug 2020 08:51:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NwDo0yrS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbgHQIvr (ORCPT ); Mon, 17 Aug 2020 04:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbgHQIvo (ORCPT ); Mon, 17 Aug 2020 04:51:44 -0400 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 2FF99C061388; Mon, 17 Aug 2020 01:51:44 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id k13so7149657plk.13; Mon, 17 Aug 2020 01:51:44 -0700 (PDT) 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; bh=YHwU7mJDKeQtuf2nGZDv2FGeDLOAbojJ1CiHYqxaKsE=; b=NwDo0yrSQNwwGODAhpyAHCdlmpi//hZOjDK61tg57+GVESEZTVsizg6alKCHmNRTpO LO6xlZa58B2CqDtHsbZHOEXREjfqJlHHLi+/2rREVo7qGSvDqUElihhjH8ivo87c17nE vcsuiwSXrrxLuynrDkaA40TZFHWlzTIWrOdu701+PZsucTDXEf/H+URfhrJ0eJ9x8x1m X/8f36s7uoi3GGa8mONHWYC7NpxncIjCBg79/WYpHKA14v6dmaeUAYJgtJ1f6sxXOZul rPL339TSOCn6xiA9F1j8c6VjejT2qatpi4CdKjHwhgDzRE4DnyGq+DscTfCKl3GPtuKW 42Vg== 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; bh=YHwU7mJDKeQtuf2nGZDv2FGeDLOAbojJ1CiHYqxaKsE=; b=bkZLzXMOI4m4gehJhQVpOGdpPalBtDNuJkkplR1+6JpiRomyji3ZReA2z6mgpA7Frd eFB1fkw3jOlDpij1rRArTHjsXuHAxPepDiM+hlb9GwizrtH05h6y7cCWLHuhEbBAyGPg aw5OK2A6wHgqZpvsfiymRorsvSC/0AHl0PL1rDsfeG15kiJmYZaVLDKvjQxLWp4Rhae8 779lZdxXTZQoqFxpaUGX/yjigTAi7dia5CWUvmYe8unSZAskB65C1N4GY3Pq60vbAvFw 1+pgUKRIle0yk3dClVDj+TA8GKk0tEVrLecnF5cNTs9y80vVPjt3ILpJw6GNehUcduvt A6Fw== X-Gm-Message-State: AOAM530ZuVbchzT+VwHcEirVceclv3Ahb1MY1wevU0MvX78y2Nd5JmVC onL07pyj16WivI7J8IWTK/g= X-Google-Smtp-Source: ABdhPJwEdFp8CfcoePsDFPhRFMP6EJZ5h2o1f+OZt0pK3aPE3p2eGSCRrwPtC19qyJ7L7cLqbopEWA== X-Received: by 2002:a17:902:6b05:: with SMTP id o5mr10389378plk.173.1597654303737; Mon, 17 Aug 2020 01:51:43 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b185sm18554863pfg.71.2020.08.17.01.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:51:43 -0700 (PDT) From: Allen Pais To: gerrit@erg.abdn.ac.uk, davem@davemloft.net, 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 Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:21:14 +0530 Message-Id: <20200817085120.24894-2-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817085120.24894-1-allen.cryptic@gmail.com> References: <20200817085120.24894-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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 85ff417bda7f..6afad9b407a1 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -883,9 +883,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; @@ -970,9 +970,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 Mon Aug 17 08:51:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262446 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=unavailable 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 E0526C433DF for ; Mon, 17 Aug 2020 08:52:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0FD6207DF for ; Mon, 17 Aug 2020 08:52:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CoGj2d/h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728452AbgHQIwL (ORCPT ); Mon, 17 Aug 2020 04:52:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbgHQIwD (ORCPT ); Mon, 17 Aug 2020 04:52:03 -0400 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 3B373C061388; Mon, 17 Aug 2020 01:52:03 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id y10so5603974plr.11; Mon, 17 Aug 2020 01:52:03 -0700 (PDT) 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; bh=/Dwv0Cic7T6kz8Rts1cgLM7pEUoAzAWE8onSffb/CRY=; b=CoGj2d/h+8Kc9CWQDDtSzGXdf08Gnkjryfx4wKEKQ2hzvLKCAnNWJCx1nm0ddyU8YK V6c2cURPPd2WUu91ps+wgkH4s0FZLalYBMI/7HH7gnSRgxdIAUSBxGeiVdRrHzdisAaB rfCXlOTlJIi3uwTXOLf+1FVEWCdjiq/Tq6a8GctK+hotTmNXK33F2ugGf7510Nodjdxo JHMVle1h6yzBVPKVVGK4ZyYyOGM55FRqalHY7jOFE/Te9peW80xoOAA5rblb8aCQ37hO gUNUlxMp+YJz2piUpHaXcpautwjevnR8wGPezLBo0pAOFc36kB+Q/KtJ2p6+z2KxBQUU 46zg== 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; bh=/Dwv0Cic7T6kz8Rts1cgLM7pEUoAzAWE8onSffb/CRY=; b=ijTnR+3O3fgn9rruujy9kWYwQr2fBgy5MN3+VtP6QtS6lqhcddPr/L+2HUG4DCElS2 GFQRpVGQ8rZRuKiWvinDB9MTFjrw0wF0hdVpBpj168s1ZxgrcR4Ne8ncVfB4G/TEG8iv B4niU98zTgEK/nQupBKBKWl9OlCRAKYELSTgeGO44FL+xXwEsdMIUYMmANw8Udxch4/u N127IfQMv3Mk3bBobW67Cx309szwMm2VEs9B7TkMImKfLRbzwlMhYMDEi6m3PBzOSNnA KF5zXgPvvdj69fghHQO8cwuTPPZwZpy1j3bFizRz1McauEBTGuFJlAzQMwNzrBJjcZmJ 7YKA== X-Gm-Message-State: AOAM531inZ5xRzD5ULvwMb3G7XzgOEkhC8Fr+aIpcTaJsaSHZ1s47qjb EeWb8GbSg4/7vg7Kwsdn+Ec= X-Google-Smtp-Source: ABdhPJytBX5O91tG68f9TX19wYBPt+IKOmYp94gCzm4N16NATR0r2Ef8mF3P33JY9+mj9FNO5dwIvw== X-Received: by 2002:a17:90a:ea91:: with SMTP id h17mr11482982pjz.36.1597654322795; Mon, 17 Aug 2020 01:52:02 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b185sm18554863pfg.71.2020.08.17.01.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:52:02 -0700 (PDT) From: Allen Pais To: gerrit@erg.abdn.ac.uk, davem@davemloft.net, 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 Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 4/8] net: mac802154: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:21:16 +0530 Message-Id: <20200817085120.24894-4-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817085120.24894-1-allen.cryptic@gmail.com> References: <20200817085120.24894-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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/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 Mon Aug 17 08:51:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262445 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 E8E29C433E1 for ; Mon, 17 Aug 2020 08:52:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B89F2067C for ; Mon, 17 Aug 2020 08:52:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZvtBicJ4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728584AbgHQIwa (ORCPT ); Mon, 17 Aug 2020 04:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728496AbgHQIwS (ORCPT ); Mon, 17 Aug 2020 04:52:18 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B1F6C061388; Mon, 17 Aug 2020 01:52:18 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id ha11so7377044pjb.1; Mon, 17 Aug 2020 01:52:18 -0700 (PDT) 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; bh=vizVhQpfl/P3IK7pdHhXwQuZJfxeoLTLAQwlgNJNWDQ=; b=ZvtBicJ4SHYCH+T9jknNOHbGL5ebXQExMrnEngS40FAumeB0nrQtJxh7WcMySXmaDQ ak4WnkwOWVjRV315tOGdLCe/Mi10sI68E212P2cU9T8Qid/O9SKl6e3rgVQ7Z4acf2Vy AQ8w50xgaBk9idsZ8zZ8KX0FwdxK4fJCtxz8BYhpe7JR/qgUxVyVhym4Sq5oyI0/rOxh Sl1irBBzjVytyAvys0zlbu6OnAfAXtD8Apvp1JBzm96pAHcbc3TYOmCfwUp0W/HbIgCa ynXCtwGrz+hWLI63HITzVI8MA7NdK67qI012GX4nO76plWswzvHbiCu/5SVyLIYBylY1 OqRA== 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; bh=vizVhQpfl/P3IK7pdHhXwQuZJfxeoLTLAQwlgNJNWDQ=; b=q6I8yskDflkAqDdTrroS1yqVqCSwR7NMTkYy6JipIAnlK00/Gw21hmOHIwLA2fbHHQ fmfSwA1tkTIVyNBJOW1IIeRIqHGE7n7C4Lu6BqRakjbnh6gWjgxKIoLakayveoead+d2 fUpPsHdSFSXbSxdZlOMM/8r3RQV8FeSyNbZHOb02qxIm8RH/zJq5FfvCnMr1WwzVRzWo fnyLRjoebQPuqnRvgCfl4IL2+9m05vyNJzKo0vr6xQyI4VRYpgQ4bmBizsRFhiHSXo8Z 3vrVdPXOMCFSQBDfWW/kCCVNJfTOqPaM0laKjG9naqq+DcrI5mVlQlt1qUDfb4g9Rngk rFPA== X-Gm-Message-State: AOAM533VcswTlYfpwGTr/vqWNcc3ZBD5VWgvY9bIpMNlJAc58aYy/ML4 kGw63gU1LFcKsEchNJb05ss= X-Google-Smtp-Source: ABdhPJz0JVPD+0NkPV6g7YT8ZnT0v2Chrhm2dyQYkE8uYkF0hl+N5WY8lwYvVona5wPQ+g0GAcnB7w== X-Received: by 2002:a17:902:8b8b:: with SMTP id ay11mr10720345plb.241.1597654337917; Mon, 17 Aug 2020 01:52:17 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b185sm18554863pfg.71.2020.08.17.01.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:52:17 -0700 (PDT) From: Allen Pais To: gerrit@erg.abdn.ac.uk, davem@davemloft.net, 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 Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 6/8] net: sched: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:21:18 +0530 Message-Id: <20200817085120.24894-6-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817085120.24894-1-allen.cryptic@gmail.com> References: <20200817085120.24894-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 1c281cc81f57..0a4452178d5d 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -466,10 +466,11 @@ 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 - + QDISC_ALIGN(sizeof(struct Qdisc))); struct atm_flow_data *flow; struct sk_buff *skb; @@ -563,7 +564,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 Mon Aug 17 08:51:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262444 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=unavailable 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 1DD56C433DF for ; Mon, 17 Aug 2020 08:52:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC2442067C for ; Mon, 17 Aug 2020 08:52:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="neTJjMFs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728606AbgHQIwh (ORCPT ); Mon, 17 Aug 2020 04:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgHQIwe (ORCPT ); Mon, 17 Aug 2020 04:52:34 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6324C061388; Mon, 17 Aug 2020 01:52:34 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id t6so7376876pjr.0; Mon, 17 Aug 2020 01:52:34 -0700 (PDT) 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; bh=Zci4NAKwohhjC6jbPEfsLcCVWXjg3g8VJKMClXGB928=; b=neTJjMFs5UlhpeAmvYyBjINgwTwregw/xelketaeHGUa397oY0D5VFmv6GO5eZopZp YdJemYr09jxlmNQmSmVgSuXZtYhju6+l5U6RJg8+yPW70AD+pkDoYseQK1wZjnY5EYZ7 rWQJi7otG+hpUvvqr+PcISiap2eMDWJ1jQQbFsFvOOHFh1vqDKZZreKInpS7xSyC1OQx OPdMF1hHdvPXaRpA58i6dnczuLb1R7nOe7nO0Xp8QYCiHvWBpFlbRRh0UPAm3LHPzBTQ 50ns1OQs14gJwWyhTBq+CTBlIM2zcG49deLsGxfGk1VGZk9NZTElcdM7h4TLBpXx4TFO HGhQ== 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; bh=Zci4NAKwohhjC6jbPEfsLcCVWXjg3g8VJKMClXGB928=; b=CiNRC9udS4we/SGopFSlPFBIUjtUakGMoj2S0QUR7TW52k+Vrpb1+KGnmjutjlRBB3 /DTE4nOYEXwXny7316ieFtnCWQQpcYb78TwuHgkKciDelZlw4VUFHilW5rI498zikKzq C0DEQeJe8aZCShUawotn9XJCPP4y1ATMN9mRnz9f5464RxlbM0iUXCcyPBrxuUcWLKDs A3wHyF7sEwfpmQ8GbVW87sByNdw9hMp/wz/HLlhPMHq5Cvh8il55YdllCPBHshzAp+nI 5y/Hh2D9j/UyFKLMCp0yNK8TKQxlIHxHXxoUFpN96FuG/IdkZMr+kXMuK+nm3MYErbVE AQpg== X-Gm-Message-State: AOAM533bHsgFF8Yshg7ML+J6i7drEzWRrrgEWWoq0trMe03zZQph4fSy Qz+f0QLbOByry50K+KMhfO8= X-Google-Smtp-Source: ABdhPJyqnKZWuEQ9WtaHZx0iO8Gc5tduriJCuSHNz/iCSB5adxOK+UjF4Co+4bML4gOaDWzJUb/SqQ== X-Received: by 2002:a17:902:7c8b:: with SMTP id y11mr10133867pll.119.1597654354468; Mon, 17 Aug 2020 01:52:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id b185sm18554863pfg.71.2020.08.17.01.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:52:33 -0700 (PDT) From: Allen Pais To: gerrit@erg.abdn.ac.uk, davem@davemloft.net, 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 Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 8/8] net: xfrm: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:21:20 +0530 Message-Id: <20200817085120.24894-8-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817085120.24894-1-allen.cryptic@gmail.com> References: <20200817085120.24894-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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); } }