From patchwork Tue Oct 6 06:11:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268063 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 88B6EC41604 for ; Tue, 6 Oct 2020 06:12:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B8FD20796 for ; Tue, 6 Oct 2020 06:12:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U8hpGB4G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbgJFGMT (ORCPT ); Tue, 6 Oct 2020 02:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMS (ORCPT ); Tue, 6 Oct 2020 02:12:18 -0400 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 A80B1C0613A7 for ; Mon, 5 Oct 2020 23:12:17 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o25so7413960pgm.0 for ; Mon, 05 Oct 2020 23:12:17 -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=3iJn/SEkkuagk6iNHHSbaftdnkGl8+optOMxbRPz3jk=; b=U8hpGB4GSBayuzOK3SR37ML1nqFdWRwWQbdzEA+KgsO70Rkp5RYsl18VMUYCNCFO06 Pu4Y23BqffRIhqF6VozmcrFNxNMisHV7AcO2yhgpIiEKPW9IH66D5OTAHj6cMCxw0nP/ u7FXvdK/BoPm1CsV5h+iiqPfb55wN1MoNuBlD5mUU1uVYv+z8zK+9/blO7ZL1kTAR51x qKSEO+FvlQZXv2LiHNpXQausarJxuFWHvM0nCJcol7HDh7Eyx5V2DuWR72fbekMhC82a SJ8s7xcML9+sLV7fXk21OPhbzZZybUgYjJEvUP47z5Z9yDXqwgcqjoVBLVm9yqdjVFhr B5TA== 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=3iJn/SEkkuagk6iNHHSbaftdnkGl8+optOMxbRPz3jk=; b=ZaTlr5kks8G3zeL8gzFkA4co3UqEHxs88XnVTwLBp0N4SQV7u6hwYkjU7EEZeIimcF 957iUGu5i2JrG+aKNfsPwY6WZuQNTmCRaHEOYeOkNrcZhNlnuCW5AcP4TwwTdu0rBXNZ C0FVmVKih04zEsE1GBM6r7BF39cIDwN0MZivUkZzbJe8uFIl/m+G6TJoxDFz4RcGFw+w bcoLFsboEdSRFfUtVgKlRRkR/UhfWeE84QPJ91bMY1i3A9tTVkrB7OFSVQJdl4qTEKWo 6lAbfYh10EH+LCWoA/8jnKjHcVyVT5/v+DYK9/lbXbMBeIpirxjas7rxh3xg3US79fSX CYgA== X-Gm-Message-State: AOAM532u2egbp8pAuWuwHiwHjMLZ+rRjp3R7ctkWLyqQI+IBgP+fZgKI BOujAgTY8ywiI97enATBdi4= X-Google-Smtp-Source: ABdhPJx5W4ivBXJySaJs46khpZJVwAiNkLi3lSq3Wy+TpiIpkM8/QY4Mk6OC1IkSXKq0ybikYePCnw== X-Received: by 2002:aa7:9f04:0:b029:13e:d13d:a08c with SMTP id g4-20020aa79f040000b029013ed13da08cmr3027299pfr.35.1601964737066; Mon, 05 Oct 2020 23:12:17 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:16 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 01/10] net: arcnet: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:50 +0530 Message-Id: <20201006061159.292340-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/arcnet/arcnet.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index e04efc0a5..69d8920e3 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -393,9 +393,9 @@ static void arcnet_timer(struct timer_list *t) } } -static void arcnet_reply_tasklet(unsigned long data) +static void arcnet_reply_tasklet(struct tasklet_struct *t) { - struct arcnet_local *lp = (struct arcnet_local *)data; + struct arcnet_local *lp = from_tasklet(lp, t, reply_tasklet); struct sk_buff *ackskb, *skb; struct sock_exterr_skb *serr; @@ -483,8 +483,7 @@ int arcnet_open(struct net_device *dev) arc_cont(D_PROTO, "\n"); } - tasklet_init(&lp->reply_tasklet, arcnet_reply_tasklet, - (unsigned long)lp); + tasklet_setup(&lp->reply_tasklet, arcnet_reply_tasklet); arc_printk(D_INIT, dev, "arcnet_open: resetting card.\n"); From patchwork Tue Oct 6 06:11:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288955 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 35FEBC41604 for ; Tue, 6 Oct 2020 06:12:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA49020797 for ; Tue, 6 Oct 2020 06:12:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T84M37x3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbgJFGMW (ORCPT ); Tue, 6 Oct 2020 02:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMV (ORCPT ); Tue, 6 Oct 2020 02:12:21 -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 AC3E4C0613A7 for ; Mon, 5 Oct 2020 23:12:21 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id gm14so1051642pjb.2 for ; Mon, 05 Oct 2020 23:12:21 -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=XtYAHLGQp5a8nA/p44315exvsBdm564sL0Emr+HilCY=; b=T84M37x39ubfP6XQULROfrO7I587+unBtdaLQuZ4wfRTl/iw9CPkBukQ2WhE2R0Yit 1rFN9HToavoLs+K6nMVaxA53CCPV5a8uKy3BgciuILiPMLrcYexnqHbkcbZ1vcsZQ63x FWAAgpN7zv5nRGfSKtBo6jvoQTV1LPbNyV+YQgLskmQWHxkcysyo/gDC9Cn4EeBRZiZ4 YCxVV7T7bRLZXdGgjlIUNtJVrNJKByPIvdu878fck/y2z79GQBpbyhutK7i71adv0INt 3H8G4GAHPCoBmj4ajrReYzYwuz5CaH6K5H0o7BvY4Zm0i9d8mkP2iNiKQf97DtqH29n/ kVbg== 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=XtYAHLGQp5a8nA/p44315exvsBdm564sL0Emr+HilCY=; b=FgTJop/BNVEAiwVDtsyxXBcpxgJblPoPAlyLKNxcsQ7oHvzIlkDcuuLjqb+Th+5vwe GT6VoDTuFqjf76Ulah7lSg1gaUygkah0hq/jldlC1RSi1JSGGfKKOq8sj6NCuNLGS9uL RyyQIZkIiVUWq0CcdGClY7q7pE1vH9JTflmBetZk/2F/V47orispzkaF777lMUN8IAt/ JrabH4hZbYEd2AxaUNp9o4vuB+mAen1jeMJfa9ZtZE1+RDpOZjXp4qls/FleiQwLN9Ci 18IXXoT56DxCmQ7FnPQT9c9EBDFWQrotAMsgpKs1X9U0tUh7dQg755nIh3GgQcpkC1I7 2tsg== X-Gm-Message-State: AOAM5301dGS/8YWJygUWjzGUWemhMFMnMROHxdLf0dVa9Qb4Obto7Qme BLMDrEidp8p6RHfh7acbRvM= X-Google-Smtp-Source: ABdhPJyh9h1IwRDOw0GKoy9hdwfIFOszSIbIpaLXdl+zOyCJ1e5Pudeh1nIqtHUllbByaluF0n4bbw== X-Received: by 2002:a17:90a:8585:: with SMTP id m5mr2805798pjn.69.1601964741310; Mon, 05 Oct 2020 23:12:21 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:20 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 02/10] net: caif: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:51 +0530 Message-Id: <20201006061159.292340-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/caif/caif_virtio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c index 47a6d62b7..106f089eb 100644 --- a/drivers/net/caif/caif_virtio.c +++ b/drivers/net/caif/caif_virtio.c @@ -598,9 +598,9 @@ static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev) return NETDEV_TX_OK; } -static void cfv_tx_release_tasklet(unsigned long drv) +static void cfv_tx_release_tasklet(struct tasklet_struct *t) { - struct cfv_info *cfv = (struct cfv_info *)drv; + struct cfv_info *cfv = from_tasklet(cfv, t, tx_release_tasklet); cfv_release_used_buf(cfv->vq_tx); } @@ -716,9 +716,7 @@ static int cfv_probe(struct virtio_device *vdev) cfv->ctx.head = USHRT_MAX; netif_napi_add(netdev, &cfv->napi, cfv_rx_poll, CFV_DEFAULT_QUOTA); - tasklet_init(&cfv->tx_release_tasklet, - cfv_tx_release_tasklet, - (unsigned long)cfv); + tasklet_setup(&cfv->tx_release_tasklet, cfv_tx_release_tasklet); /* Carrier is off until netdevice is opened */ netif_carrier_off(netdev); From patchwork Tue Oct 6 06:11:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268062 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 DA933C41604 for ; Tue, 6 Oct 2020 06:12:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B80220796 for ; Tue, 6 Oct 2020 06:12:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sqcsSbFd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbgJFGM0 (ORCPT ); Tue, 6 Oct 2020 02:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGM0 (ORCPT ); Tue, 6 Oct 2020 02:12:26 -0400 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 55D16C0613A7 for ; Mon, 5 Oct 2020 23:12:26 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id o8so699368pll.4 for ; Mon, 05 Oct 2020 23:12:26 -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=PBZ7XCCPYxTfU/knzfg4kBS9oODa0+K0405tO+rt+gA=; b=sqcsSbFduH5gRSicAKhviLuWtHTBV8dRYx/Xx3Qz+WVH5s/7JFgZC8lvEfqAQTVazY Pc7KWjUmJA3wAVtYO/Mrbt5r3gL/NQJ5dwPs/3bYo3/OyHwC6t3gC9KZ6RjbV+5IMQP8 fa3dRRoKrjYgQTM9DA1LYoglCrj2n+TMS3NQASxxAJLPioXBk1vMQTzVl2cdsS+utyh1 7Lmn6OnZhM5WGQZlmgKDTFswEpPii8KbpD574SjzitFeT6IyuI51J9dsq8Qa3xsGj/bW J1PcZrZ2fs8ZsD0dx7yHo7o71RYwTob4rhFhXuv5AGWPEH/io1qve54KCNIB95XKQ3Tw VKeg== 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=PBZ7XCCPYxTfU/knzfg4kBS9oODa0+K0405tO+rt+gA=; b=RCTMqKCTKp/o+AcrSny/z7qASRKdpJB81iat1kGcP4AuuNVP97ZYNQmAdbJIWnMvxG j3IZVJFcC+LsDPWKUqTzQIYTekDhyVEnSAZuT58XjlkqI+mp8KCB7f+YbbZQqT9UxNRA wikfstr7VbGTsxc+Cl6e+1dFS0Yj2frxOCBKj6ptJlAkuZN4NNoJ1yF5DQXquo+0dGNR euFOdk1NJZHhhNqfQ2fDcsZ45r0LpUV3f3yB3c+6DAFeTbTfktzHEks4njXAcyfkDXNn FCKZlYI9APeccmLxOoGJtiOsD7jGiOQyHwGhlhsbxwO0whr1HkaGojGBrr3PkDktuEUP +jXA== X-Gm-Message-State: AOAM5331Hvf4Zxu4hbWpueNDqT98N818HrxrhvlSFruFqpiWqavR7QWv PRyOw0/gctUkAI2jlhMsxtU= X-Google-Smtp-Source: ABdhPJwiB7PlFebTEgmw1V+FSkUiqIvzPMGa4l5JMvP3gt4ySyEutBzK8QAcJ82hbSsPuHvpsZumHg== X-Received: by 2002:a17:902:6545:b029:d3:d370:2882 with SMTP id d5-20020a1709026545b02900d3d3702882mr1931962pln.44.1601964745936; Mon, 05 Oct 2020 23:12:25 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:25 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 03/10] net: ifb: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:52 +0530 Message-Id: <20201006061159.292340-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/ifb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 7fe306e76..a2d602736 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -59,9 +59,9 @@ static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev); static int ifb_open(struct net_device *dev); static int ifb_close(struct net_device *dev); -static void ifb_ri_tasklet(unsigned long _txp) +static void ifb_ri_tasklet(struct tasklet_struct *t) { - struct ifb_q_private *txp = (struct ifb_q_private *)_txp; + struct ifb_q_private *txp = from_tasklet(txp, t, ifb_tasklet); struct netdev_queue *txq; struct sk_buff *skb; @@ -170,8 +170,7 @@ static int ifb_dev_init(struct net_device *dev) __skb_queue_head_init(&txp->tq); u64_stats_init(&txp->rsync); u64_stats_init(&txp->tsync); - tasklet_init(&txp->ifb_tasklet, ifb_ri_tasklet, - (unsigned long)txp); + tasklet_setup(&txp->ifb_tasklet, ifb_ri_tasklet); netif_tx_start_queue(netdev_get_tx_queue(dev, i)); } return 0; From patchwork Tue Oct 6 06:11:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288954 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 08054C41604 for ; Tue, 6 Oct 2020 06:12:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C922207EA for ; Tue, 6 Oct 2020 06:12:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lNTDA9o6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbgJFGMb (ORCPT ); Tue, 6 Oct 2020 02:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMa (ORCPT ); Tue, 6 Oct 2020 02:12:30 -0400 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 7205FC0613A7 for ; Mon, 5 Oct 2020 23:12:30 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id b26so5064007pff.3 for ; Mon, 05 Oct 2020 23:12:30 -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=p0nOeFTTvxchhLDUOUtR4smjW/MrDN1RrdOcfJ9Vqqo=; b=lNTDA9o6leiZAV8Sn3Jl4K9rflqqzYaO2W//DuaVB+x0c+nmDe4hK6ZmHNxKs6cCXF hxAGCJ5qWPYZE6ntem4M4YIEjnfj8i+1GfVYhD3yCqZyFZHj2iZgEMU9gNK3tUZ1h22D 0k+XjtQIMxCyD0p3kONYrES2NtPV/WBzmDJxszPiB0/nctGxbQhMsylJ+igLqn5XwLZK /ZU6D6NG8oDjtNCcuHOyXinWARRCUYzaxjVON4KAsx+X8ubnLVK5cMkjj8+pP/hJvzGU fng/QMk4WXZMO2iMrePmir4PLcAPyl4pw5z9xgHaOv4K2DilMeK+AxIp6ahTUt7joYJK RRcA== 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=p0nOeFTTvxchhLDUOUtR4smjW/MrDN1RrdOcfJ9Vqqo=; b=sTffn3iWJlD5C1o46MbCpiU8TCOWhSqds3TG7EjwhG5FX+xPnBaGkRwvvVKJ+tYjJU zExSMzkJ5awfVVmyZX98r1JiKu/PzupeTmz7H23LkuM+ApaXv75TwhH8PkvulQzUdXeD IbtbDwlQPjxiKU5MwHvCiAcFNEqh/K/DIoYu0j4rt8/YGBvNZEquaSnX+O1cwA+NtjrI QnKf9vp3qUkWU2C/zgRjaOny4XcmM5p0vIJHSNWbDEfMlaFKxgyL+uyz3zi/M8SbkqJg ynBitcv2fcqSnRyPdebll1oVRnHkEJS8w/PG+/w3F0QYARfpVooKpJ08OpXhtw8lwlhc sfCg== X-Gm-Message-State: AOAM531wDKDQW6ZvzF1NkiTM8G7hUrKsR2pL3E8XM9at4aYHqJkLyYfH DbWkLIv2N1m55gxI4gyyR3A= X-Google-Smtp-Source: ABdhPJwTwsRzysboUCzDYQZBJecflXTAmTgMQIpnaHk6oRyeP758cZWfXnnLSSxVzFz3/dq2hlfh2Q== X-Received: by 2002:a62:7b4a:0:b029:152:4310:a909 with SMTP id w71-20020a627b4a0000b02901524310a909mr2847735pfc.37.1601964750027; Mon, 05 Oct 2020 23:12:30 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:29 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 04/10] net: ppp: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:53 +0530 Message-Id: <20201006061159.292340-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/ppp/ppp_async.c | 8 ++++---- drivers/net/ppp/ppp_synctty.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c index 29a0917a8..2b66cf301 100644 --- a/drivers/net/ppp/ppp_async.c +++ b/drivers/net/ppp/ppp_async.c @@ -101,7 +101,7 @@ static void ppp_async_input(struct asyncppp *ap, const unsigned char *buf, char *flags, int count); static int ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg); -static void ppp_async_process(unsigned long arg); +static void ppp_async_process(struct tasklet_struct *t); static void async_lcp_peek(struct asyncppp *ap, unsigned char *data, int len, int inbound); @@ -179,7 +179,7 @@ ppp_asynctty_open(struct tty_struct *tty) ap->lcp_fcs = -1; skb_queue_head_init(&ap->rqueue); - tasklet_init(&ap->tsk, ppp_async_process, (unsigned long) ap); + tasklet_setup(&ap->tsk, ppp_async_process); refcount_set(&ap->refcnt, 1); init_completion(&ap->dead); @@ -488,9 +488,9 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) * to the ppp_generic code, and to tell the ppp_generic code * if we can accept more output now. */ -static void ppp_async_process(unsigned long arg) +static void ppp_async_process(struct tasklet_struct *t) { - struct asyncppp *ap = (struct asyncppp *) arg; + struct asyncppp *ap = from_tasklet(ap, t, tsk); struct sk_buff *skb; /* process received packets */ diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c index 0f338752c..86ee5149f 100644 --- a/drivers/net/ppp/ppp_synctty.c +++ b/drivers/net/ppp/ppp_synctty.c @@ -90,7 +90,7 @@ static struct sk_buff* ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *); static int ppp_sync_send(struct ppp_channel *chan, struct sk_buff *skb); static int ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg); -static void ppp_sync_process(unsigned long arg); +static void ppp_sync_process(struct tasklet_struct *t); static int ppp_sync_push(struct syncppp *ap); static void ppp_sync_flush_output(struct syncppp *ap); static void ppp_sync_input(struct syncppp *ap, const unsigned char *buf, @@ -177,7 +177,7 @@ ppp_sync_open(struct tty_struct *tty) ap->raccm = ~0U; skb_queue_head_init(&ap->rqueue); - tasklet_init(&ap->tsk, ppp_sync_process, (unsigned long) ap); + tasklet_setup(&ap->tsk, ppp_sync_process); refcount_set(&ap->refcnt, 1); init_completion(&ap->dead_cmp); @@ -480,9 +480,9 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) * to the ppp_generic code, and to tell the ppp_generic code * if we can accept more output now. */ -static void ppp_sync_process(unsigned long arg) +static void ppp_sync_process(struct tasklet_struct *t) { - struct syncppp *ap = (struct syncppp *) arg; + struct syncppp *ap = from_tasklet(ap, t, tsk); struct sk_buff *skb; /* process received packets */ From patchwork Tue Oct 6 06:11:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268061 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 2CA59C41604 for ; Tue, 6 Oct 2020 06:12:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAAD5207EA for ; Tue, 6 Oct 2020 06:12:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CdbnlBWK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727096AbgJFGMf (ORCPT ); Tue, 6 Oct 2020 02:12:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMf (ORCPT ); Tue, 6 Oct 2020 02:12:35 -0400 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 257CBC0613A7 for ; Mon, 5 Oct 2020 23:12:35 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id h2so698191pll.11 for ; Mon, 05 Oct 2020 23:12:35 -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=NapLG5xGSA6zL7J4CktPjbhy5S9DFmPYUCoV49Bbr34=; b=CdbnlBWKTZovz9tvPQs8fjsXRAFxLTlVK4XKsSxC9O/bRuYM9Ii//y7Olj636xrYr9 ckNNFawu5S5apOOU/c+fwJtb03iK5Qt6kS7DWDujsbwKVrBfT8gQHvR0liIidcctl7i6 dwBn68BLo0YM0Yyto9rvZnq3kmIFwaBzo2aCsAqcAi47y1uBtHeOvab6Yjbd250Pewij vEzaKf8KLNjK6qdPJU/CDRXECkWX7awtMO6xIC0EfO8WtLQoy0CLpOU4ccYAXTO3s7Vi mwPpiRMWPJVpcs6h6d2G6L+rN4s81UbcP8RnJZ7nyZggUWNRhyQJ1rVKnfKALgS6pG6x Pwmw== 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=NapLG5xGSA6zL7J4CktPjbhy5S9DFmPYUCoV49Bbr34=; b=AF9w7AbP4i+AbgpGasGxi+9+eAnpewkTXNxXVHfGZiSy3yNQIvRhma3p/QNgo42VKW bmJaoXHIo5ynANSplgOxYQTnLuuYPk5j12wKmcC3BxEX/ITWUZl8J60G0wICDY2yN1FA JcylOaQuDW6Cei6dlu7wbK6uOgp6qLENMMe6T9M7DKHD0Z6rPdBMiJGOcKnTbawMEjBq q9kDl2FHDaj81TZ7rT3dScIhjg5nfPBBuEDkzs2lSS1gcCfhEp62oGqAJCiZ1EaZs79p BW7g9ooXzc5eVFgiSUlFOcp1Yv66OwyLSNG99jt/dX1XawQle8aaZIEhU4GIeJBLgykc pxfw== X-Gm-Message-State: AOAM532TOelWpBIU8E1LC6d/NGDRJK2FMxyQhC6ncknUNUYpagepU9in xcxSy0rvLTepG8iCCGiuMgs= X-Google-Smtp-Source: ABdhPJxPE0A1OVr8iMMrhTVelXa4bjkxigLnFGwSmZyqsZ9giWhc3rDaBC4Rs91EciDvKR60MQMH3w== X-Received: by 2002:a17:90a:e64c:: with SMTP id ep12mr2803977pjb.43.1601964754720; Mon, 05 Oct 2020 23:12:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:34 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 05/10] net: cdc_ncm: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:54 +0530 Message-Id: <20201006061159.292340-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/cdc_ncm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index e04f58853..57a95ef90 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -61,7 +61,7 @@ static bool prefer_mbim; module_param(prefer_mbim, bool, 0644); MODULE_PARM_DESC(prefer_mbim, "Prefer MBIM setting on dual NCM/MBIM functions"); -static void cdc_ncm_txpath_bh(unsigned long param); +static void cdc_ncm_txpath_bh(struct tasklet_struct *t); static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx); static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *hr_timer); static struct usb_driver cdc_ncm_driver; @@ -815,7 +815,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); ctx->tx_timer.function = &cdc_ncm_tx_timer_cb; - tasklet_init(&ctx->bh, cdc_ncm_txpath_bh, (unsigned long)dev); + tasklet_setup(&ctx->bh, cdc_ncm_txpath_bh); atomic_set(&ctx->stop, 0); spin_lock_init(&ctx->mtx); @@ -1468,9 +1468,9 @@ static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *timer) return HRTIMER_NORESTART; } -static void cdc_ncm_txpath_bh(unsigned long param) +static void cdc_ncm_txpath_bh(struct tasklet_struct *t) { - struct usbnet *dev = (struct usbnet *)param; + struct usbnet *dev = from_tasklet(dev, t, bh); struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; spin_lock_bh(&ctx->mtx); From patchwork Tue Oct 6 06:11: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: 288953 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 9E856C41604 for ; Tue, 6 Oct 2020 06:12:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 597AC20796 for ; Tue, 6 Oct 2020 06:12:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ujxaciNg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727105AbgJFGMj (ORCPT ); Tue, 6 Oct 2020 02:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMj (ORCPT ); Tue, 6 Oct 2020 02:12:39 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 327C3C0613A7 for ; Mon, 5 Oct 2020 23:12:39 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 34so7378935pgo.13 for ; Mon, 05 Oct 2020 23:12:39 -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=BNLKh6X7abDI2ONK24Z9VMkrZsBSfKxmcrOIvLnwVgE=; b=ujxaciNgyIGB2h3LssEMVCVlBX94zrlLu3fJguod2tJ+HTSb0vQzi2rQRcUNEj/Tcw Yg0FtZgWxBVn8gJj/ElBiAjqWa8R0SL5MLouMjckVL0qjY5XQnqD/++i1qSKzvcRBSI1 wMIqpx4GHU2K4z0MTs++uEKjttwG+qTOEa9eG4JsAnh5Fb+pHSI716lhUzpag9cCsGHl LaGKzy1ZwmKBpKbeLMEsA/DlmGXzRbsCo1Oqv4o9wwX9pm8zQWejhqaBTyNTEVdlU8KT JUHUuYEoXE7u0kqFmGe12nbI85kObwfktG98Zr/FI8GOPzX9EFfL7Z0YjiDzSm6MWTJ+ egMA== 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=BNLKh6X7abDI2ONK24Z9VMkrZsBSfKxmcrOIvLnwVgE=; b=I5gXPjbB6wzD7Q58HH80I7Kg9eOGIcnnyZrJwErNLSa1rt00uTTZpTFvMU7sMFgmtS Qpp15YFD+Ud7EqySNcCKOE3W2nRk1qlsMDmaEVAowmhRVYHsmm1MQCaB/teaIzyVHRfx 0M0IJSrXIqRfkEEIGQMP6ULBA6858V4RoAGKQmsFw6DFxGd7MfWFJf0iJ2rdn8LYHfKa niZ0WxLZFr2eH6E0GD9g09QOhu4wubjADlQmsp5vZZ4bw4VFdblKtnX0pzyQ1g8o2i/h oLuzk2RYPdVCZ24W4gQqvYimvFnl22Z9fdlanphaVoR+E8/rTs+90NjGZRP8jjOUVMAq lb/A== X-Gm-Message-State: AOAM533PvPV7MSuOFsZeviBLQKwdFTZc10AS9AL6Tp3WHVfHgkvrFWmi gI26tALioPs5kwXougL4mKg= X-Google-Smtp-Source: ABdhPJz2tMp3zxw37SP4I5yMK7z3BDlb5PY+j6FZWwodBZKmQkb4W27TxZQgRiKzqiy0+eqkho1sMg== X-Received: by 2002:a65:6a0a:: with SMTP id m10mr1391227pgu.162.1601964758788; Mon, 05 Oct 2020 23:12:38 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:38 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 06/10] net: hso: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:55 +0530 Message-Id: <20201006061159.292340-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/hso.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 2bb28db89..3b08a6b5d 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -1213,9 +1213,10 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) * This needs to be a tasklet otherwise we will * end up recursively calling this function. */ -static void hso_unthrottle_tasklet(unsigned long data) +static void hso_unthrottle_tasklet(struct tasklet_struct *t) { - struct hso_serial *serial = (struct hso_serial *)data; + struct hso_serial *serial = from_tasklet(serial, t, + unthrottle_tasklet); unsigned long flags; spin_lock_irqsave(&serial->serial_lock, flags); @@ -1264,9 +1265,8 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) serial->rx_state = RX_IDLE; /* Force default termio settings */ _hso_serial_set_termios(tty, NULL); - tasklet_init(&serial->unthrottle_tasklet, - hso_unthrottle_tasklet, - (unsigned long)serial); + tasklet_setup(&serial->unthrottle_tasklet, + hso_unthrottle_tasklet); result = hso_start_serial_device(serial->parent, GFP_KERNEL); if (result) { hso_stop_serial_device(serial->parent); From patchwork Tue Oct 6 06:11:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268060 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 96B05C41604 for ; Tue, 6 Oct 2020 06:12:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 511DE207EA for ; Tue, 6 Oct 2020 06:12:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="feFA5KuL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbgJFGMp (ORCPT ); Tue, 6 Oct 2020 02:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMp (ORCPT ); Tue, 6 Oct 2020 02:12:45 -0400 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 08D38C0613A7 for ; Mon, 5 Oct 2020 23:12:44 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id s19so698355plp.3 for ; Mon, 05 Oct 2020 23:12: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 :mime-version:content-transfer-encoding; bh=VgNwRXJyEDG01lBqMPdHE+//hDQm9seBMBcDf8TI/sQ=; b=feFA5KuLoPL+uhPS3bdJuNdgg2TfuEvXyfuw0fVXG/IeCG91f4mFwJyAmB4ky+JTWH Xv9BIEetgXRgC7rWcbnUX8Jxr3YDAExm1+NwXHVCs8AuvuJOYM8owoZkjGsR7UTXolrn HNtwmDFWGO7IC5LTzmE/0kOpv9I5C8VFkiDVXof85eQzOl2ft6mLnilyTKfwv2W0WJMz LjejrFT46tNMuJbqrZ7doaexegzNjRHmMgwg3IsVK+dZElwKT8Ia8yvHInGX/zo+ZudN 942qT07viiY43QMWleHI8EJzlRUw3VD9mjMqX49laZhsS5zMhM45eWcQaI1mOMXHRq+a A5NQ== 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=VgNwRXJyEDG01lBqMPdHE+//hDQm9seBMBcDf8TI/sQ=; b=mZf7ssSsUHCriSNfVPwW56cj+Q5aSuRDRec1qOaFOreZlhqPv4WMBbzNtFemlupXbs VQ8wzHmx6sDrOs5j945vmaer5UIVHUJI8O5TDcIiZazEucNZY44C7dtGgJc3ngqkBGWI F7fpunsf7AFQLF8Av3FvB9XB6RxV7HKJTGq1SOWZMGv/ScAz2R2zO3DCbRaIsA7FdZQt dsEqkerDKWdRsw6OzuZNEmdMTimfPhQ2sZxGmSkDVWz4ST5hnzPSqir+naOuI3iXAhzt jkOHYbj6laUn2VhHUZAADkaZc9zTuktiH9FIoMbZRG4xdX1GmRnMbN5xLCpZoCZzgaTA saqA== X-Gm-Message-State: AOAM532pp/c0FqY8y6jj4XhCqVhG+6lBTRhRxbL/ZsO7PVmo6dJ7ren9 YQdBZaDNI5T5aPeYwC8ssmY= X-Google-Smtp-Source: ABdhPJwmC3oyCuxJ+6UZe+4MdfNOeOtICggqI6WgBHLbvtKLE2GoAN8IeGaINfjDIG/Nv4hzQ3vNrg== X-Received: by 2002:a17:902:6847:b029:d3:d44c:3c7b with SMTP id f7-20020a1709026847b02900d3d44c3c7bmr1787320pln.53.1601964763620; Mon, 05 Oct 2020 23:12:43 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:43 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 07/10] net: lan78xx: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:56 +0530 Message-Id: <20201006061159.292340-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/lan78xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 65b315bc6..3f6b37120 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3386,9 +3386,9 @@ static void lan78xx_rx_bh(struct lan78xx_net *dev) netif_wake_queue(dev->net); } -static void lan78xx_bh(unsigned long param) +static void lan78xx_bh(struct tasklet_struct *t) { - struct lan78xx_net *dev = (struct lan78xx_net *)param; + struct lan78xx_net *dev = from_tasklet(dev, t, bh); struct sk_buff *skb; struct skb_data *entry; @@ -3666,7 +3666,7 @@ static int lan78xx_probe(struct usb_interface *intf, skb_queue_head_init(&dev->txq_pend); mutex_init(&dev->phy_mutex); - tasklet_init(&dev->bh, lan78xx_bh, (unsigned long)dev); + tasklet_setup(&dev->bh, lan78xx_bh); INIT_DELAYED_WORK(&dev->wq, lan78xx_delayedwork); init_usb_anchor(&dev->deferred); From patchwork Tue Oct 6 06:11:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288952 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 5D719C41604 for ; Tue, 6 Oct 2020 06:12:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 179F720796 for ; Tue, 6 Oct 2020 06:12:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dD5vCNIj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbgJFGMt (ORCPT ); Tue, 6 Oct 2020 02:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMs (ORCPT ); Tue, 6 Oct 2020 02:12:48 -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 B4FE9C0613A7 for ; Mon, 5 Oct 2020 23:12:48 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id az3so1045304pjb.4 for ; Mon, 05 Oct 2020 23:12:48 -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=JhX2wxus5RbdcHbbl5XkDhw1vYd+kb0KjLnVSS0LP+k=; b=dD5vCNIjptEVROer9MwJHrcyBz0bVYx2/OGMOOLxSKy1GupS18mtiqwu1Na6wcaL41 kxZuZ1eqOEf+zZ9OgVsriaSahb5AYbnCZEfclaUZR0+llILL1zXCvHrDQbdTt5EuF1d9 Ws/zkyppoz/wp1+6W9wHK9yOl7Se6FUU1HxZJYJEJo21de4LcdkMz7sDaX8iQRgS3s3s fY10VynAj7WeS1lZSdVYyCkqDXvojlmwrHQqYHEyOlX3GNB0G9p12eUBMXelB4aAg/5P JHbggaCo0mhn1QQgwP/bD3Ql7v4VdYORlj/UGn/qqiguUn2xYs6+vKaScxjxbcdk6WQf /pbw== 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=JhX2wxus5RbdcHbbl5XkDhw1vYd+kb0KjLnVSS0LP+k=; b=grqfync6+uk1R7S8wuEHCGLonqzKB6t8aYP5BapG/M+8BcQ+mQGDwzzWLwoWZh7GSD liqp5NrbciWMgJtHUusQclW4wW95HAw2XzbMUCwiEgRhGsQQQTYv7fcQxGb6NGB9j7L/ iH7W8XyCXNPC/IeTV0LYvU7GJ67/uklWWqOaGlwFh+Zjyvd0qI7B+UTw86+lEcbEURMA 49BWqn604pdD5aZk6LtKutIEH5kGcubD+3JjxYbsf3ozX7j1a1VM116AMHrr8WZhBplX XGFTNKSOgK9cryGyFDtpan1XivCQ4Cyi0PWi0x/4XAOtzi7t6klU1ZWs/z06a+tzyqJL M5CA== X-Gm-Message-State: AOAM530Ep1Ki78B9Rts6fOtnZP2/D9Ni9i01aKXobW0e/urkmpNq/NEi XlzsX8gE8G4Gqx+rUgcnve+9mqOVL70= X-Google-Smtp-Source: ABdhPJz7Ak3KAoI5SoMD81GHj9wKnJtO0ArbZefys2C5eUg4DhlMPZ+QJMTR+/AQa1JpVzUhVVgrKw== X-Received: by 2002:a17:90a:4b84:: with SMTP id i4mr2793174pjh.132.1601964768319; Mon, 05 Oct 2020 23:12:48 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:47 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 08/10] net: pegasus: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:57 +0530 Message-Id: <20201006061159.292340-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/pegasus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 060a8a03e..8eb4af405 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -584,12 +584,12 @@ static void read_bulk_callback(struct urb *urb) tasklet_schedule(&pegasus->rx_tl); } -static void rx_fixup(unsigned long data) +static void rx_fixup(struct tasklet_struct *t) { pegasus_t *pegasus; int status; - pegasus = (pegasus_t *) data; + pegasus = from_tasklet(pegasus, t, rx_tl); if (pegasus->flags & PEGASUS_UNPLUG) return; @@ -1160,7 +1160,7 @@ static int pegasus_probe(struct usb_interface *intf, goto out1; } - tasklet_init(&pegasus->rx_tl, rx_fixup, (unsigned long) pegasus); + tasklet_setup(&pegasus->rx_tl, rx_fixup); INIT_DELAYED_WORK(&pegasus->carrier_check, check_carrier); From patchwork Tue Oct 6 06:11:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268059 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 E09D1C41604 for ; Tue, 6 Oct 2020 06:12:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8B1220796 for ; Tue, 6 Oct 2020 06:12:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Np0o5EiL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbgJFGMx (ORCPT ); Tue, 6 Oct 2020 02:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGMx (ORCPT ); Tue, 6 Oct 2020 02:12:53 -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 566ADC0613A7 for ; Mon, 5 Oct 2020 23:12:53 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id x5so700087plo.6 for ; Mon, 05 Oct 2020 23:12:53 -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=UMPpQ9MhQnwTKESiOifs7VirxYRe8QqZDvNFjPxNfCc=; b=Np0o5EiL4SptCTmvPTNuloCPef6mbyDXFXpNTBPdw4ZKCF2WEwXweC1Q3Br5rZqNTB b0e9ROtXIdcbP9vA/g5F9OllVp8jHH0iR8NyKfRCPBmfrpoQ2u20NyD1HS5nQqd6ZVn0 +/7On01l4nWTFrslFAHh33oo/tbcNpYZ/rj9jx4QccCTaYLnWX9AV2dMBAflkMeU/jAE KuyEci8TckMP7l4i+CLoWy8aIlsmunWAaWtn1MkIqUAb1Uxv2bIG6YqGumgcZ+Pp+GTQ Gd8n9JtMFMJuEFv0hZNuZOOR/mL8yfH83+vFDonzaHWao7rwVQ42xcMQ5+aOXOmnSt+R WxIA== 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=UMPpQ9MhQnwTKESiOifs7VirxYRe8QqZDvNFjPxNfCc=; b=Ls2c4MzLOFS5/pMR5r7aUfs39u9WywPyIGPx08++VAzHLqiMXk6i5lqP+N3GRYVUjz +8XuU1uWkSys8qHljFcPBO0M+tdqHto2ZKDvfWHX8kR3xlLqbIkhKLJi4gzeumznFUJD WgTktXqCOTbx8E2zwxnABUZbpcphzvuJDEyWAAzLufAbjnRECQnaojA3PN5PR9SvfGH9 MJ7BaoPUOVNAamcTX69pRlLnsGKFRqO+rR2ZF1rHVEI2gLflv++aruk7Ro8Em0L8Du0b 0gt4H1GJUISbyRNUUPxWGQ+Xz5Q6KpBkh3OLzsYF5dtTAjGK4SyXLiY3ozcULZ23YJ2j gXzQ== X-Gm-Message-State: AOAM532KZRGHSRpWOwJEFflXtTYbAuopaN6g/B8adpH6NkTcoDTyqnHz 4S8SaaVt8GKKbAjRm9VSa6J/cXddeSY= X-Google-Smtp-Source: ABdhPJxFeuL/6JdgRphp2QChYb/kx2avOX/19jrcjnY1SRJMqaUbqQQs4HpereFw6IPtkw2qpJASVQ== X-Received: by 2002:a17:902:d90e:b029:d2:8cba:8f02 with SMTP id c14-20020a170902d90eb02900d28cba8f02mr1839923plz.38.1601964772941; Mon, 05 Oct 2020 23:12:52 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:52 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 09/10] net: r8152: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:58 +0530 Message-Id: <20201006061159.292340-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/r8152.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b1770489a..2d706cdbf 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -2410,11 +2410,9 @@ static void tx_bottom(struct r8152 *tp) } while (res == 0); } -static void bottom_half(unsigned long data) +static void bottom_half(struct tasklet_struct *t) { - struct r8152 *tp; - - tp = (struct r8152 *)data; + struct r8152 *tp = from_tasklet(tp, t, tx_tl); if (test_bit(RTL8152_UNPLUG, &tp->flags)) return; @@ -6730,7 +6728,7 @@ static int rtl8152_probe(struct usb_interface *intf, mutex_init(&tp->control); INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t); INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t); - tasklet_init(&tp->tx_tl, bottom_half, (unsigned long)tp); + tasklet_setup(&tp->tx_tl, bottom_half); tasklet_disable(&tp->tx_tl); netdev->netdev_ops = &rtl8152_netdev_ops; From patchwork Tue Oct 6 06:11:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288951 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 17DF7C41604 for ; Tue, 6 Oct 2020 06:12:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDA0320796 for ; Tue, 6 Oct 2020 06:12:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m2DZsMya" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727139AbgJFGM6 (ORCPT ); Tue, 6 Oct 2020 02:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgJFGM5 (ORCPT ); Tue, 6 Oct 2020 02:12:57 -0400 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 A276FC0613A7 for ; Mon, 5 Oct 2020 23:12:57 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 34so7379345pgo.13 for ; Mon, 05 Oct 2020 23:12:57 -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=A7J+7LCMnngWYfExdQcrScC+YWq3P/NsolST99HIK/M=; b=m2DZsMyadUBNsPBDJrwZe0cFIrZACVrKSfXIOmz2msgb47fIswXmLfh1OFeiutAtzM y01YzCDMdZSYvecVqqHJdhRyLtDOAn+r9/kA+tMa9m5rP1MMk+MT9brT8oNvcwqPAkcC we14/GMlv+uKEkieQgPXUxTphDTY3nfLum2hIXlvrg1VF5lrZ+2Wry4X29m92b3AK+dW zfvtgrd2GgXru/fTdevxI9mesIepAMtwCqhJpjmMFBkchj17eRJfseJv5kkqLq5yfvdd DmN8+sctVsjgRFj2p6DcxuOTtKIkZvB0eROwYcHm3hmjAVxHKEm6nMh8gsgdds5jE7Ew 2bEQ== 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=A7J+7LCMnngWYfExdQcrScC+YWq3P/NsolST99HIK/M=; b=fws7d8S4fQ5UUB7egU63iGsL5F1EFcaw4/tL6Rdoe0tL+Pls8ytfgxIPgwOhnRoa88 10WhmqGq5wdkDAthUhpZWkbF9zYZ5soFQiqy6m4BAS5G/VLtaSnVHsxQNYg7O+tHGDVh 3yPH3ZAcjaFptDr2qKEze+cFdNpCXjmCcYFKSquwOHTHg1DrMis7qGc5BsyRTC6vxnJ5 HHXzYAsTdDz+BgwPxxK1RvmWL9tD6DQ8yyRZ8oXH26GhYi99fZdLMQxXGsx+cgkxRKKP bBpd3u1K7S1thR+1FH6fNSC0F5P3bowpFGp3jzvouEfn/z2ujA/AX15IoD2WLYM11G2u iJvA== X-Gm-Message-State: AOAM533OAg+/LQiCqMTZc+KQfhwFlMNlcplv3NHCmT4iEsTRcJj+9F72 U5NLCuVaol1+UKTUjT4P+wk= X-Google-Smtp-Source: ABdhPJyKvtv8lbNKWYSS7vgVs64tEdTZGkobL44Db7eJM+4pL8DuIh6Axh41kbpRRnEoOJu6auppQA== X-Received: by 2002:a62:1e81:0:b029:142:2dad:a68 with SMTP id e123-20020a621e810000b02901422dad0a68mr3264658pfe.5.1601964777162; Mon, 05 Oct 2020 23:12:57 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id c12sm2046410pfj.164.2020.10.05.23.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:12:56 -0700 (PDT) From: Allen Pais To: davem@davemloft.net Cc: m.grzeschik@pengutronix.de, kuba@kernel.org, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, petkan@nucleusys.com, netdev@vger.kernel.org, Allen Pais , Romain Perier Subject: [next-next v3 10/10] net: rtl8150: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 11:41:59 +0530 Message-Id: <20201006061159.292340-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006061159.292340-1-allen.lkml@gmail.com> References: <20201006061159.292340-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- drivers/net/usb/rtl8150.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 733f120c8..d8f3b44ef 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -589,9 +589,9 @@ static void free_skb_pool(rtl8150_t *dev) dev_kfree_skb(dev->rx_skb_pool[i]); } -static void rx_fixup(unsigned long data) +static void rx_fixup(struct tasklet_struct *t) { - struct rtl8150 *dev = (struct rtl8150 *)data; + struct rtl8150 *dev = from_tasklet(dev, t, tl); struct sk_buff *skb; int status; @@ -890,7 +890,7 @@ static int rtl8150_probe(struct usb_interface *intf, return -ENOMEM; } - tasklet_init(&dev->tl, rx_fixup, (unsigned long)dev); + tasklet_setup(&dev->tl, rx_fixup); spin_lock_init(&dev->rx_pool_lock); dev->udev = udev;