From patchwork Tue Oct 6 06:31:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288949 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 BF9C9C41604 for ; Tue, 6 Oct 2020 06:32:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A75E206DD for ; Tue, 6 Oct 2020 06:32:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sE+M/sMx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727048AbgJFGc1 (ORCPT ); Tue, 6 Oct 2020 02:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGc1 (ORCPT ); Tue, 6 Oct 2020 02:32:27 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3D8AC0613A7 for ; Mon, 5 Oct 2020 23:32:25 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id nl2so1016538pjb.1 for ; Mon, 05 Oct 2020 23:32:25 -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 :mime-version:content-transfer-encoding; bh=/UzESi8UuNZEiVz0nFfm9fN5yC8iGGjdO1zss4vprzg=; b=sE+M/sMx9W5S1HvtkEuUowYoMviJYiYaKVRu4yjmhfoGGHhdgrHMhSa7hNjp4/N38Q pp+ot5e0LupLDCK65pzgptSIjHQmapFvj/B1z172HDOhJY3n94YYs4u9ViO85pMu1Nfw vfAZwaPLIeW9k/Di2WJlV/dbN3VygSiVvBfgncasdppHJHfTRXzFfjHa5IdtHGRcew4g umcaSGiNjbFfVaGr/wuz4NdVOZWKieRzyazM03ork02LiGyQQhF9iD4Mqf/FmKOM6rqm weKDeo7zF5Ihdtf5K6vqNQtPV5GNqfKLUgjYHnsnB1j4esEwIisE8hSonf1DMZxxjRMc Dfqw== 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=/UzESi8UuNZEiVz0nFfm9fN5yC8iGGjdO1zss4vprzg=; b=Bu06OrBFNOhJBquRCVtowzDbTLJmGiNodm4WBnkuLtsLGjO5fCqSXtIUqbUtjerBKy or8haTD7X5QOffthw6L9HTX8YoMOnmBYZSb/s5KiC5kqBE8ywnXS6C41NrgGeM48ZD7k 30LiHfZX5oJ+E8FGClCH4kO0Gax0JsM2Qgn8XpvtavfdGbfUCGV8ZvGI2aAoTUz5Bp5c 9FL3URv+u6yBpJRtHVVfdrHSvJOrtMQAviZ/vsEBQxa3ARCjuuG2KYRIuxhBanFGDDdI 2h3xFWzbOZlT5ZKXYM5B7iv0Fw89UEBKvYrae0Ah4hHTOtdETaB2lgP0kUW28LubE/kw qclQ== X-Gm-Message-State: AOAM532C1tpAkN5myXBZfqCjZ1vPwuA39DxDB1wYAztkGI47ZCEqG6n4 47WdZfic3tzDpZhz/JUdNcY= X-Google-Smtp-Source: ABdhPJyg32+pfp0wbnD6iQpYiP+LXvIo7oqiDYFNH/dSEmGwk7ZMKNUDYwRoLHe3hBtZLL3DUKQ69g== X-Received: by 2002:a17:90a:974a:: with SMTP id i10mr2902536pjw.137.1601965945491; Mon, 05 Oct 2020 23:32:25 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:24 -0700 (PDT) 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 , Allen Pais Subject: [RESEND net-next 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:55 +0530 Message-Id: <20201006063201.294959-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 bf48cd73e..6e998d428 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); } }