From patchwork Mon Sep 14 07:31: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: 260946 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 DEA42C433E2 for ; Mon, 14 Sep 2020 07:32:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A2C1217BA for ; Mon, 14 Sep 2020 07:32:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vOez9tpW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726004AbgINHcP (ORCPT ); Mon, 14 Sep 2020 03:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgINHbq (ORCPT ); Mon, 14 Sep 2020 03:31:46 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CC10C06174A; Mon, 14 Sep 2020 00:31:46 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id s14so831585pju.1; Mon, 14 Sep 2020 00:31:46 -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=otmLPGw1Sp2M+tYoijrVhQVfizYDf0d88yKEsD5YvR8=; b=vOez9tpWBd7BsqyZI9fqFgdoWpoWFJYFRehPaWpHXeOlN+Cs/58Jop0XdOEPKKSFDZ Qm/M12lkve0L1QKsozomktRpeGUW2rP8hs2+pFh5UbMlF7vs2AhetNVS4Hjd+JpiIefJ edbOdo8Pb04gWefw7Nw0w8sr7fuwkJbRuiyXlBFY9qJQNxyMrbzubtw6YJaI3JeR7fZX XjLJJYhpbBo2kjzCdpxY4k4YdVpy8gs1tRGzfAdZYFxXdgnvxNa8oBVbLY707BMRYf7k uAIgJ9LCPDvLjz6Bk3wzy+V76aonA48V89EKPmhl6fiecKYyxm0d9j9GzjC68ajSSJQd Uc2Q== 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=otmLPGw1Sp2M+tYoijrVhQVfizYDf0d88yKEsD5YvR8=; b=cG0FB95YqN8tu4JsMwoI+jx7RTn1Aa62Zo9joKdVNy4UMI7Pe+S2QjXa03AJclNJhq uZ14ZazCcra9FQ8xmm2c8EHjtugLFNDKpe0cQpgdGsJ3q8VjHfA11IB+AAKgv/oqNQgJ 8qDFLidOLtG9WHGvUgrTTREAE1obOyPyp92OEmJ2VCfZJwQMoiuTN1tZsMwfI27A8tWZ KRGV1QqvMFchOhvnDUhkjz1pTm5x8jW7h63Uvm03Q4pJEi8KQLRAoRMaCoT2F6B0CJeb 1VUOtKdV8RqALKY7kXlGd15vxmpnprvU+j1PPN7Rs75n5z8nUWIypCpUJCvCy6mOOmQL XeFQ== X-Gm-Message-State: AOAM533GhDBMWfeB185gZjiyXTvk9RolbA+vRfKgFlUyp5uEzwJ4K7Cv tEv90nsc2I2W+JhuSU6E4T832b6D2+Seyg== X-Google-Smtp-Source: ABdhPJxWhHA2jm5Cs7lHsXstYe6OOIWBdmtfMeMVuJMmy4KXP5l0ub2bzRf3/oBS3LeA7iwlwY67Tg== X-Received: by 2002:a17:90a:d18b:: with SMTP id fu11mr12439499pjb.203.1600068705972; Mon, 14 Sep 2020 00:31:45 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:31:45 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 01/12] net: mvpp2: Prepare to use the new tasklet API Date: Mon, 14 Sep 2020 13:01:20 +0530 Message-Id: <20200914073131.803374-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais The future tasklet API will no longer allow to pass an arbitrary "unsigned long" data parameter. The tasklet data structure will need to be embedded into a data structure that will be retrieved from the tasklet handler. Currently, there are no ways to retrieve the "struct mvpp2_port *" from a given "struct mvpp2_port_pcpu *". This commit adds a new field to get the address of the main port for each pcpu context. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h index 32753cc771bf..198860a4527d 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h @@ -861,6 +861,7 @@ struct mvpp2_port_pcpu { struct hrtimer tx_done_timer; struct net_device *dev; bool timer_scheduled; + struct mvpp2_port *port; }; struct mvpp2_queue_vector { diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 6e140d1b8967..e8e68e8acdb3 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -6025,6 +6025,7 @@ static int mvpp2_port_probe(struct platform_device *pdev, err = -ENOMEM; goto err_free_txq_pcpu; } + port->pcpu->port = port; if (!port->has_tx_irqs) { for (thread = 0; thread < priv->nthreads; thread++) { From patchwork Mon Sep 14 07:31:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 260941 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 769E7C43461 for ; Mon, 14 Sep 2020 07:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24F2F2192A for ; Mon, 14 Sep 2020 07:33:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TXK8eRC4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbgINHdv (ORCPT ); Mon, 14 Sep 2020 03:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbgINHcA (ORCPT ); Mon, 14 Sep 2020 03:32:00 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC39C06174A; Mon, 14 Sep 2020 00:31:58 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id t14so10812624pgl.10; Mon, 14 Sep 2020 00:31:58 -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=nCXxnuAt1fX5hvo8OyzQOdQYZNM/qXDUgrQxb+zH55Y=; b=TXK8eRC4ymOFFPb5FEZ5hfqhu3SqIqp8KgGjsSnFjHG+4ZwGPPB1w8dT9F0o6IB9yd PihDn2ti9IbQP79VXVTKlDwvvmE9hfv10T2IDCbZ9Ep+/lEizQzDo+8GG43b3jwZyKL5 VqUeEZNERg9yYjc0rqsIVdlJVIq0wjYnAprUAWY8xPKAAvqQVb97Duc42uJtZzFj4h1Q eszf10GtTDv2A/BNf/d8Dx52GWak+80GqJWva4MQ569SMV+PpmEXz6rvt0MSJGGTvm2i VWNyBci6/cminKGi8US/5Lzs2XQOPeQvzxfFrw6uJFun2HVs+WfRwNFf68vtMVyB1Nty 6VAQ== 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=nCXxnuAt1fX5hvo8OyzQOdQYZNM/qXDUgrQxb+zH55Y=; b=rfEeTGRjZvg3sW216g/xhnqgqQ1T6pTU85pcF6yGV1IE6fRjew7KBm1O/SMKhevRIN aXt+EezXYEcKU+7MetfSeWceP3lISh/Cz9y6lbGdenO3KSaJVu4B0LHBytL8+Q5Lf6eh ZP+BnUWBRjxRs9bR/1BHDpJwl4t7hWQ5Ci0nkbYtN+Ip/Q+xUcVMGx9hiDLfQDRvbngA wUrvsoAjbn2Z8F1HKKz5UBAZteE/yAPD9gOP67h2TASLvZvnCKyxRc7E6+XPsFC+x1uN 6gBoZQT9OfklIOTshnKN2tNB/IEVtUeFgFnyPw9Gp2Ts3oup/0HCvs/oOR9Y7b5vN2V5 bvQw== X-Gm-Message-State: AOAM533a8oOGeyWUTkJgi1H/iivckd4fB1NWIy7l/C55uYKTpelEilV0 GExFEBqpCxX1dWUqMkOnG8E= X-Google-Smtp-Source: ABdhPJzvtQsUGPxp4EH5pqtUt3Z3HA3HPD+xFngiqPjH8Tw/S5S8TRNGyI9N9SNegylxmQGF7JCN4A== X-Received: by 2002:a17:902:28:: with SMTP id 37mr12795896pla.107.1600068718597; Mon, 14 Sep 2020 00:31:58 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:31:58 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 04/12] net: ifb: convert tasklets to use new tasklet_setup() API Date: Mon, 14 Sep 2020 13:01:23 +0530 Message-Id: <20200914073131.803374-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- 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 7fe306e76281..a2d6027362d2 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 Mon Sep 14 07:31:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 260945 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 12CC8C43461 for ; Mon, 14 Sep 2020 07:32:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A60612192A for ; Mon, 14 Sep 2020 07:32:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H9oplXLL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726066AbgINHcl (ORCPT ); Mon, 14 Sep 2020 03:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgINHcP (ORCPT ); Mon, 14 Sep 2020 03:32:15 -0400 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 DCAB5C06174A; Mon, 14 Sep 2020 00:32:07 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id l126so11877412pfd.5; Mon, 14 Sep 2020 00:32:07 -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=yFfTzKbC737CiCdcc0Qf1mfE2VfmaqJXLd14QnIRSpM=; b=H9oplXLLvus21oTN7Tuzl9KJDupryRH7cT8dywWEtodMsg1282jIzm1oWqmL6WPKpB NOrf/JTBETDAuD7QoasYaFgGa4/SiQaKyH5DBogQUeUmURlhyJCDJQSrB0mj8Pviouou osvhqFtGZOIFc15H9L18HDf+UgfXxqsf/zcCmBQJWy6BdH2XUDUDc/4KDILQvAV41v8t egvOLafkMA0j5Ss2PYuJhIkDVLQ6qUiBXBGTah4sbL/0Pzew6fCZvxAzR2etMQ2qS9WS VhSQHxoIIGZG38tzwfAP8XUb8A5o29GJN2j4SAtUEEBti8iF9gOLxmCuLCPlCzc447XG +n+w== 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=yFfTzKbC737CiCdcc0Qf1mfE2VfmaqJXLd14QnIRSpM=; b=WcHW3xPDRTWe5LlmRM9eoHmlDzUNfKFIk+FmQs0Njs+izvWS58H16rHM2R8WAJlixU a2xzD0LCEdIZwIaIiMiDJ/mpdvJCbc4FLMJcwT7bTJG81hMRQx9bMRQF7T4RIQNmjc9s iVOJSX09vHFHkIAMSzwPMA3yo/SatD/VfLU3OqnSM2dXf5xUL0LtAFTnB12XoLcZJaq9 n5JmYDPKHIMw5SYIGJy/D4XRdh1GDv2JcZp52+IJ4YWY3zyfUo2HXH3fAbz9Z+DCsvtl NXPNw67SHxograUlVhlCe8RduXxKEsCYbvB0nnWYwx03nZIHsmAdZnVu1VTgOS+Ee/oW t+oA== X-Gm-Message-State: AOAM532m7AJ+VSLj+XQYjgJxg3p8JbF6UuRzTuUNxk+W6YHpJSSa/5SK +d1vGpK39KxMsbNgwi0g2jg= X-Google-Smtp-Source: ABdhPJyEcN0So3gQDeCdXrlobhXHvrlly4dzm9jYBa4iJDafB560Qejk6uorb5sLy9KPnwapaRdhEA== X-Received: by 2002:a63:6ce:: with SMTP id 197mr10223234pgg.32.1600068727519; Mon, 14 Sep 2020 00:32:07 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:32:07 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 06/12] net: cdc_ncm: convert tasklets to use new tasklet_setup() API Date: Mon, 14 Sep 2020 13:01:25 +0530 Message-Id: <20200914073131.803374-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- 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 e04f588538cc..57a95ef90385 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 Mon Sep 14 07:31:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 260942 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 EB00FC43461 for ; Mon, 14 Sep 2020 07:33:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B04D2192A for ; Mon, 14 Sep 2020 07:33:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JQAf75xc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726080AbgINHdn (ORCPT ); Mon, 14 Sep 2020 03:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726176AbgINHcV (ORCPT ); Mon, 14 Sep 2020 03:32:21 -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 B4B8FC06178B; Mon, 14 Sep 2020 00:32:20 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id v14so3569991pjd.4; Mon, 14 Sep 2020 00:32:20 -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=cd71yq/lAASqvcH4C2Jtz3wuu5v0StzhHrHHOcVra4g=; b=JQAf75xcEztoyinIIDsx1TWKkL/AJ4wVKElWlJKiEycTkNg4NaU89AjUPZuklCIivF ZHn7CWNqeXB2ZXURJiBJFWqh3YlCUJwzAr4Xr4SUB0WbBkkj7sTBbKq8NiC3ZvloTLTl TlYFAPlniWvALfFaWjP+I4TSWA/VmOb1G6MGIt0twZ02SNFIpR2oMhFwXlNI6kgpXnWB G5oQXIOq79hdf/BjUETwLXPQjVlGA0Lm8+lYsgUnqVtEIg4Mzvn8cWO4wtE8dncji0UQ xUuZHmZr1yrfoRF7QnMC3dFlj33H84UAy31UrljaFlQzqlggOE0YKpmgr43y2pqmnefm TGwA== 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=cd71yq/lAASqvcH4C2Jtz3wuu5v0StzhHrHHOcVra4g=; b=Y26hpk0NG4n81/g6kdHV2XhcYoz/lkgEUyw9W1GwQQpNo7BOtsMCBvaKjOnvceT8or qb7h9axSk1qDSu8IVKrFU4n7nu4zr5KV1M6HzFWpE+V/Lc6lJ1U1lepVtd7edqrfJXv4 c/uJ7CvzEm1arVAH1lBBNUPeoF4pp5TxueNNn23zug/82wm+5KGDhGAE6BZJpuQOkhE5 Am7n7dFInMc5HrI4aPQh1RzNeJt2AE7/qVlJqm5PjTRz1uQT1kGQgxOkGpVDFrHdAVQe dX49K/gwRy5/h9VxHJffka3ICQsc41w+CH+ycxV3QjchCqnybRqYSLPPokvAALmCvOSO bnZQ== X-Gm-Message-State: AOAM5337ybrm6DmxfThxRx99bDvNosqlSqx1FRoNn1aVYSGwJbyCJPlv Qe9OLyI9s7E0hNqEF6wRwh0= X-Google-Smtp-Source: ABdhPJyxn4lCfqiv+OVxmW576cCaSzWQhjtVvF1qvhnzNVPCURZEq0END9+HC31olr2Y4/lnztzaNg== X-Received: by 2002:a17:90b:104f:: with SMTP id gq15mr12445937pjb.215.1600068740380; Mon, 14 Sep 2020 00:32:20 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:32:19 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 09/12] net: pegasus: convert tasklets to use new tasklet_setup() API Date: Mon, 14 Sep 2020 13:01:28 +0530 Message-Id: <20200914073131.803374-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- 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 e92cb51a2c77..1f11e586037f 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -565,12 +565,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; @@ -1141,7 +1141,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 Mon Sep 14 07:31:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 260943 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 D1660C433E2 for ; Mon, 14 Sep 2020 07:33:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E094217BA for ; Mon, 14 Sep 2020 07:33:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CcnFiM+y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726206AbgINHd0 (ORCPT ); Mon, 14 Sep 2020 03:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgINHcZ (ORCPT ); Mon, 14 Sep 2020 03:32:25 -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 B4FD7C06174A; Mon, 14 Sep 2020 00:32:24 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id l126so11878106pfd.5; Mon, 14 Sep 2020 00:32:24 -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=jwBSQkwxFDmuxnhyMb2b19ee2+rUfqniVLHpZYtKUdU=; b=CcnFiM+yywZ1hWJKc0oQLwb63YKZFFUEQ7k4r3aOiFjYEQxFvBXb3DH4xKX5HyU6Mo Kg/QvbkQclgjIBxT8yhzqbBt3I16v97MsmKYULWbr3/228COyZH1msIaq839WxwTI2Wz tehc9LHApHk9MWU+upofP/S2ocYaw+xA2EPqZ9/iaMBmIBMoPnaUVtNkMUDBJhR3ZZJO sWiJ2GcaO2E7zu1qVQQxPBKH8gm/QDonq3GvV2bOjfISyO2vQHODuBbvcq4O63n/1VJu jDDgsJZUghcIxXReZCINf9eC4JOfhMh5hjOWVoPtNbzV4esPeZj1fIlLXPK1Y3gCC9jI ztnQ== 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=jwBSQkwxFDmuxnhyMb2b19ee2+rUfqniVLHpZYtKUdU=; b=X+7r3JnI10CT3Rg6DM/9MgzdZ/Aw0pI8MlfhuopxWkqyujXsa188P6lFLN4nyQOwf3 r9GgcIN5Zs5woRoqTOR6yOeR3OtYhB6mUuozgiSmxveRtpvo6TyxsuWQSjXQ3YXOKCZc OFbk1SQ+g+w4vSYzIeaNL6u6OmpBjsJF46I6qerl+f5wLvmTk/eB2KrazHAt1GTkP3qg o+xPmowUobINU9mig7QzqejSfMtp2rWHYSDNpSXltk7ZaGbQRIF8WV7LqIPhJPIkTO4O R2Bb3EScNfav3MbjZcAowoln+xdLsap3oUfGF2fLd4y0izYZf36yIUqzfieQ5p81i+/l dVxA== X-Gm-Message-State: AOAM532NGRlu10BkyCQfhiz8ETIds+wjIlpDCPs9SCcdh990SIBDkKBo 7WmAPS9Dsm7NztuxQpGuTGk= X-Google-Smtp-Source: ABdhPJzN+0NqSopntb5zrOiedCWU/1GO532NjylMRNFzb35Ce9i6VUKEm4RvEXZemKErD8wsLVd+lw== X-Received: by 2002:a17:902:c253:: with SMTP id 19mr12931535plg.65.1600068744361; Mon, 14 Sep 2020 00:32:24 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:32:23 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 10/12] net: r8152: convert tasklets to use new tasklet_setup() API Date: Mon, 14 Sep 2020 13:01:29 +0530 Message-Id: <20200914073131.803374-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 --- 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 b1770489aca5..2d706cdbf9a2 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 Mon Sep 14 07:31:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 260944 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 41E4FC433E2 for ; Mon, 14 Sep 2020 07:32:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECC5E21D24 for ; Mon, 14 Sep 2020 07:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H7Vk5lpu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbgINHcx (ORCPT ); Mon, 14 Sep 2020 03:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgINHcd (ORCPT ); Mon, 14 Sep 2020 03:32:33 -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 4A976C061788; Mon, 14 Sep 2020 00:32:32 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id q4so5022181pjh.5; Mon, 14 Sep 2020 00:32:32 -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=zOQKj9yAVp75GeABVCWJkbI1F1JUvZbL7Zt6hBXdVz8=; b=H7Vk5lpud8ae6do/7R7/E439BDih3dEXglPrN4QqhqLQQ1FQLrVcCAHDb5kj+fpEh5 jgworh/Rgo/WQ0m3CUHSklQxIVCn5UYvKw6xDqgesyKExEUOtrGvD93csUhuKpeYsP1r B9kx+8EQ+VJjLwz7Bb3LnOmdygSDnAz4MxvcvQZYLQdDcxEDKW4qWWdQ8GOOCa6owmLD 0E4zGxeTmCy8+p8QgPNG46Hn3YwdeBMAoDAUik1H477+Ap/HI7oF6yhMre5u07bv5YoN 83sTHWAXkPLNBaiOHSHl0JQ87pcL6TBelQ//35vPXG++uBmOXGeYR2rs5YxH5D5bVAYy L35g== 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=zOQKj9yAVp75GeABVCWJkbI1F1JUvZbL7Zt6hBXdVz8=; b=i+8UrnFfL15Lo1ugDRFk6bND7DsYoywNroRdordYxf0O9VtdxCJ9x3GxBeEkzoZGi/ oTqDFVvy3VLsAFePSeALT3pB65KVNN2NuZslCOzRJcPvOinDEjGTIlpqMJcogbK0y9Nb 3Fxja8zm4sMycOQ8mKZx05BuI7lLvi24FTWsbA+dMmZE6sfnFnTCXo7i3N+Y9uXNtKlE Ql0Pwgeq3SZY90P2oVk6csU/I92V9YpPCZ6GyzRW1xEpSTM23vZLeThI779cV16ZEvIt Nd/YfiPHylJhI3BW/msWrCraUGZgbuBiB+E4yPwadxtytGWqtlsUaZZYERTifoXGaOkw GAug== X-Gm-Message-State: AOAM533ghjAUWimkbeWYvamp8Kgq/kBIAfVpP+Z3LTRze1AtB4XEM1OR W1n5xP5xfeJnTKoiawaAF6w= X-Google-Smtp-Source: ABdhPJz6NeGTlr+27zZLNZza9dbvHhQ1tg12+yq4GzCKa4ifumMPCs29uCVZqiEazYOJGCtTZjblaQ== X-Received: by 2002:a17:90a:ec0b:: with SMTP id l11mr12375692pjy.144.1600068751891; Mon, 14 Sep 2020 00:32:31 -0700 (PDT) Received: from localhost.localdomain ([49.207.192.250]) by smtp.gmail.com with ESMTPSA id o1sm9128626pfg.83.2020.09.14.00.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 00:32:31 -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, linux-usb@vger.kernel.org, linux-ppp@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND net-next v2 12/12] net: usbnet: convert tasklets to use new tasklet_setup() API Date: Mon, 14 Sep 2020 13:01:31 +0530 Message-Id: <20200914073131.803374-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914073131.803374-1-allen.lkml@gmail.com> References: <20200914073131.803374-1-allen.lkml@gmail.com> MIME-Version: 1.0 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 and remove the .data field. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb/usbnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 2b2a841cd938..d63485b858ba 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1708,8 +1708,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) skb_queue_head_init (&dev->txq); skb_queue_head_init (&dev->done); skb_queue_head_init(&dev->rxq_pause); - dev->bh.func = usbnet_bh_tasklet; - dev->bh.data = (unsigned long)&dev->delay; + dev->bh.func = (void(*) (unsigned long))usbnet_bh_tasklet; INIT_WORK (&dev->kevent, usbnet_deferred_kevent); init_usb_anchor(&dev->deferred); timer_setup(&dev->delay, usbnet_bh, 0);