From patchwork Mon Aug 17 08:46:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 258862 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 1501AC433DF for ; Mon, 17 Aug 2020 08:48:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E60C6207DF for ; Mon, 17 Aug 2020 08:48:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PrJCulEM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728139AbgHQIqh (ORCPT ); Mon, 17 Aug 2020 04:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgHQIqb (ORCPT ); Mon, 17 Aug 2020 04:46:31 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F4BC061388; Mon, 17 Aug 2020 01:46:31 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id u128so7893136pfb.6; Mon, 17 Aug 2020 01:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oOS0K7GpZh3afeLowZj9j+pfivOZXdIMkfXAqq7ezS4=; b=PrJCulEMFWaOo7xub/+9dBNahALBAPr/4S4y20wEeAsKG0UrGrab/hidB4hZNIRnVC GclZLvhXdFGymrldekzcy0L27DUH/kCotdFe/Rplksaq37A5RNRtWX3rZZhOZw+6xfGT SWSB4LR/zq80Som+PPs8VSZGPRI2vWbZVHVymWZtjUjCkNpwmLW3rTNjLdaMOtRj7G2y ia4xLZl6gdFuM5halTAeEh5tt3hvxRIzUZYL8elWrQrNhRcNLu/KSKC1KbmzY5gUTFOH xEhbGVHDNNG2xv+gPy4CsCgcpM2K3hj7EOJ8B3PCk011ridU/09Th7D6YQJJs7XTmgx2 qYUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oOS0K7GpZh3afeLowZj9j+pfivOZXdIMkfXAqq7ezS4=; b=DIAMW7M3ZHHntMNL3j32nVW5IBO09IikLdpKqsNdI3HfIEJVyjrlYKppnAd1u0AV+j /Z3pSw6BJwgIdj0kzI0RkNaDvIaRWuuQ0o4ht8swFgnV5b/kFB64JuItZCoaT924wStO GF/TU+9gfdyKxsIf5q0PEPqGMr2fdRCTY29coiu8TLnG8ctvQVKDHa8tOd9DqCqSMqDK 0xplDcO9lejSCiph6T9l4WFW11m/GGQpwabcmOSb1e2/GXkP0tPd0wMFTuLv9tIdkshz jNdDTVjM89IG5qnrsDwgBVOADjE0Wi7FslAmJ7DXGycb1nqxoECcxxbt2RLT9YAOV85D eboA== X-Gm-Message-State: AOAM532OjGift0Hs43Sg5wBtwSHFWu8scRK3CxrZVuIzNfrFN4wmKxeZ DsHLwJiTkDy4324UFl7E4gM= X-Google-Smtp-Source: ABdhPJxmlbSQXHs5X6UryDjN8bLcMP74h5+MW6N14AQyhNfmQHYv67bLXb2OZQROMb3BiWc3yE5UPw== X-Received: by 2002:a63:4c01:: with SMTP id z1mr9221997pga.280.1597653990907; Mon, 17 Aug 2020 01:46:30 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:46:30 -0700 (PDT) From: Allen Pais To: m.grzeschik@pengutronix.de, davem@davemloft.net, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, petkan@nucleusys.com Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 1/2] net: arcnet: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:03 +0530 Message-Id: <20200817084614.24263-2-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817084614.24263-1-allen.cryptic@gmail.com> References: <20200817084614.24263-1-allen.cryptic@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 e04efc0a5c97..69d8920e394b 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 Mon Aug 17 08:46:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 258867 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 53F57C433DF for ; Mon, 17 Aug 2020 08:46:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3540A20829 for ; Mon, 17 Aug 2020 08:46:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQV3wEUW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728268AbgHQIqw (ORCPT ); Mon, 17 Aug 2020 04:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbgHQIqq (ORCPT ); Mon, 17 Aug 2020 04:46:46 -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 96ED1C061388; Mon, 17 Aug 2020 01:46:46 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id r11so7873312pfl.11; Mon, 17 Aug 2020 01:46: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; bh=nH6C6M25+CzKqxxJmBz37cFUdmu+SJpjvhFKePru7gE=; b=OQV3wEUWhtMgiS/DMS1Gy3zAYDUvH3Hpm6bEgFlbXoP1jEqgeGCEEeewKOTaUPg62u iK8lLhkQQhh5rE8LqAlkv+ufGPL3V45wQfxi527NBy3QLQH81eD4aILrnTtZsH4tRBMV gbaog46WOaLnV5cq5lUXtXHzKgkAAPmVx/YB4L2/aogCJdpmvo+dBdwcXMkiz7ZhyeeH kLAR39ByGDxmYcWWL0qWKd1Er1eBh4sBbfsKjHqpZCA8oCxI5ZlF1DAPcRT3bsdj2C5z yCR1ElXbaVEIb6W3bdF+d808GOJTHRpOERQ8jgAO/68DEuhExdgmQCQk+YkKWJLRDk8W vRuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nH6C6M25+CzKqxxJmBz37cFUdmu+SJpjvhFKePru7gE=; b=nXRKwxwK9HZ9CmJaZ7J8UtoIBuEntZHdvIF77mkyaVbyLInGdI79fjifi8lzOgZgmA IGPtRlGKhMWZvoQt2zzWfAuuaL57greb0CiqqzDnz6/xIIVM7rivmWemszTNqPm9grdg cvB0sy4P3MwmCYd8yE0dlYjgv99Ebfs1hUPD68L5TQhrqlJ0JOb8pyj5Hd1HnvP2mFyX RniErMs9QwndZ2w0sFJE+t1LgBkXj8Wg6X0f3oQKfRBXTRph1HCzNr6hrkiQht7R0ws5 HrrbLgXVVvo4zlxM43n8NBXheXU6FgyBsWNFvvnfbd5r0lM11OlSKn6BZvgcThg7Ns59 65AQ== X-Gm-Message-State: AOAM532hhEE8/co8V+bXEntRCnGbbPWeaCX0chzwXNUT22qK9xb8s3Y4 AUOq9YhbgXk+sXgAYnSb9sM= X-Google-Smtp-Source: ABdhPJxnMU+Sz3Hxc2sacSZWKZ9Fo0PiAn5zYAAZRee+NBlJvdEuE0loVsvM1vjUdGFpohrXvp2ytQ== X-Received: by 2002:a65:6087:: with SMTP id t7mr9665677pgu.453.1597654006001; Mon, 17 Aug 2020 01:46:46 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:46:45 -0700 (PDT) From: Allen Pais To: m.grzeschik@pengutronix.de, davem@davemloft.net, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, petkan@nucleusys.com Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 2/2] net: caif: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:06 +0530 Message-Id: <20200817084614.24263-5-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817084614.24263-1-allen.cryptic@gmail.com> References: <20200817084614.24263-1-allen.cryptic@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 80ea2e913c2b..23c2eb8ceeec 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 Mon Aug 17 08:46:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 258864 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 212D4C433E1 for ; Mon, 17 Aug 2020 08:48:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F29A320658 for ; Mon, 17 Aug 2020 08:48:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LPJJgyv3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbgHQIrD (ORCPT ); Mon, 17 Aug 2020 04:47:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728360AbgHQIqz (ORCPT ); Mon, 17 Aug 2020 04:46:55 -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 88970C061389; Mon, 17 Aug 2020 01:46:55 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id g7so6026091plq.1; Mon, 17 Aug 2020 01:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uavx1EOmJ7bSLeVLJ6XOgqseCssvPSFdNEvIC2Bysbw=; b=LPJJgyv3/lpXbkuhi7Kjvn9mnA+OOxbjWuXsLs5FFc9v2qhqmkyKataTtaef0mNZ8w PudCWR1MMRmUIRpmDWHr3Z02PxKnmCODhbQW7JN241sYryKi9oJgjN38TADW5CGPRBfd QJHawRn1PCIw5GxiC5ufMuejMLjJ9WTT8G6KVWHriDUg81PpiQTF29r0xLm5KXj0jQ3Y 2EkHtYPtJZJ6+6MRyRy/LHqXc3cgxDMumDN8VFqt5Eu2qcZ6KbrLRjBbFBInnnNbK48r gZCgLDq5Zf0rYofg21pe+ZI6aYbWRFVqCT4kBpw5XmsGvcD4fce+QmZaWYYouco6vScv CMwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uavx1EOmJ7bSLeVLJ6XOgqseCssvPSFdNEvIC2Bysbw=; b=sT7oxkt4E/G44J8YK8HF8uoHYxcxuIGRmwpjg9DXnvwsPC/3QkYxpM6Zq5oY+MTEXf yMPXtA1NE0gmw9K+1AorbKxAK8/NCD9w8NlIOg1yn+kwxr7L+QrVeh92mzuRGNZ32srf EbyPU/OWO0Sfxz/E0rt9K20QHSOT2aAcpamBtqrNVtJ175K8CbuolQ4A7GadaS5d0prF Zcgul7gLX77erU3P8lNrsuEoxnK8lCBIekZlEFO7CrLl4nfY91bbE87tEt7wCOAledDf H0l7QPM0okqxCnd9falpafSrD2dJSAQV9W+omE+56hzqV5a11tde8tTSJt8MCbMmD1mV iWWw== X-Gm-Message-State: AOAM532KrhuYsy2NAECB0IMeQAlHRTpLORsIX1Mh7BOJmBfRoj1quLze 8Debx8yLLf9f4kmN6y+P83o= X-Google-Smtp-Source: ABdhPJww6G5UjSHakF95RK6lWfDJt0TSnLD/Lmaq3pCsiIthUPmi94Kb2THrMEF3W0jGfBwSAhy2AQ== X-Received: by 2002:a17:902:a585:: with SMTP id az5mr10412116plb.172.1597654015098; Mon, 17 Aug 2020 01:46:55 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:46:54 -0700 (PDT) From: Allen Pais To: m.grzeschik@pengutronix.de, davem@davemloft.net, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, petkan@nucleusys.com Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 3/9] net: cdc_ncm: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:08 +0530 Message-Id: <20200817084614.24263-7-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817084614.24263-1-allen.cryptic@gmail.com> References: <20200817084614.24263-1-allen.cryptic@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 Aug 17 08:46:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 258866 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 00233C433DF for ; Mon, 17 Aug 2020 08:47:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D385520658 for ; Mon, 17 Aug 2020 08:47:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jftKsQXg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728061AbgHQIrZ (ORCPT ); Mon, 17 Aug 2020 04:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgHQIrQ (ORCPT ); Mon, 17 Aug 2020 04:47:16 -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 31AC0C061388; Mon, 17 Aug 2020 01:47:16 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id ha11so7371972pjb.1; Mon, 17 Aug 2020 01:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G7+u9RfZ4cl+64Cr26dXMpMV5ktm179POSFJ+AOkz/Q=; b=jftKsQXgGWi+FXPt2ZFyTlOr/cV1PKn+tzd5IfZZMh4uzm+Ue8Sk0F7PhmrjjcVyRY TO7rzQtZpCeh1ktPtQfozgKTuYBkBNaMVRmc/LIIUhIvVUHWm9aKvUH9ilKtYzNElzmz 35CxpuPkYEYJ1X3bhuQFMwV848JxRewOBzE7rIrGm+QX+LX8tE/mw+FQRWWLq+aH+71K W9felpyi6a5pbZp6drnIf2o6hTyc07hyy62NehLoyJ+gz3bXMs6DYt6UskuvSCTIYaLB 88WjqS07quZv5j396wnYOrlVy5pgB9xNsdxNTVN4U8GYfu8TvbeiJU5dVQkfqUDMq99o U/8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G7+u9RfZ4cl+64Cr26dXMpMV5ktm179POSFJ+AOkz/Q=; b=GljOpYHIhHtP9X93lDIiLi8vnkhRwwNSwYIU/Q6+4ZtZAnEBwZ3ArM396lYcirxTGe FQaK9LkuPzsZf9+q4zUWonWkjzOQFT59/qsZKQqgkUmQpSfZy6VeAjMzaeUazE5u1YJJ Sl6cPibDvFKrTUhFh/6UcPE17FvAB5FJUAHiMsOXAB9zt31f96qY1YsqQGqO6H4wYLde XaQd5nvstT7tVEmZ9jvTXN3vVF8Zm9/7MsQpX8AuGpZZwjQmyydtGHRVOLaPL5uJHeJ6 sFdzuZLDatTnjebKEPqAWy62rEp2GrX7VTa6G03rMM0erPNTxumK2mvhEk1US5zsC6WW mNCQ== X-Gm-Message-State: AOAM533cZSOWIFX9gmN5FDYhSzMo8dPanPNnAR1J0B5yZuH/MaUMKoXK V4wTYUmo8ieovbLSbFNgOEI= X-Google-Smtp-Source: ABdhPJw4yTuPYPMatgAtLiBNdEo2nN33/HZB5EU+ZwyiWp3/aY9wrAnaojEc7+5dloID/iAO9+KVtw== X-Received: by 2002:a17:902:8608:: with SMTP id f8mr852652plo.66.1597654035752; Mon, 17 Aug 2020 01:47:15 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:47:15 -0700 (PDT) From: Allen Pais To: m.grzeschik@pengutronix.de, davem@davemloft.net, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, petkan@nucleusys.com Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 7/9] net: r8152: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:12 +0530 Message-Id: <20200817084614.24263-11-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817084614.24263-1-allen.cryptic@gmail.com> References: <20200817084614.24263-1-allen.cryptic@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 2b02fefd094d..6805686abfe7 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 Aug 17 08:46:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 258865 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 BB92EC433DF for ; Mon, 17 Aug 2020 08:47:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9722020758 for ; Mon, 17 Aug 2020 08:47:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mQkr38lD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727914AbgHQIrZ (ORCPT ); Mon, 17 Aug 2020 04:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726924AbgHQIrU (ORCPT ); Mon, 17 Aug 2020 04:47:20 -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 C8C50C061388; Mon, 17 Aug 2020 01:47:20 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o5so7798856pgb.2; Mon, 17 Aug 2020 01:47: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; bh=sDB+8Tz8U9Ch6dcpkTtA+z2iicnUFyx5WajKnuGwbDA=; b=mQkr38lDq37Raa/13zjMqvZ9sWysD22QEBUTZoh79zdS+SoSEiGWMgPI07tYxYVQzo mHbWCTyVgmhcxYyXJeQUoby6HVbcOpP29Kwa49uRHB1+DP/Kkt/6d+BvVE/Di4Mpu/Sk lOxjczwuKAi4mG0Mtsmtw7GhZDrDXbHGVmhktcvtrUNXP3yDHut72eJyDUj2A2XbEKxs KHsWlI+/aXIpiPCjtmYFGQjKICL2Ai6EapwuSg7fsFB82t+/4NT8A5T+wljdM692F/sO a6WwhgkC0k4xCA2HVwhH9ZPJ0gqf/7oToPJCNghoJjSI5WOAdgsP3qlR54Xfj/nbftca JS4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sDB+8Tz8U9Ch6dcpkTtA+z2iicnUFyx5WajKnuGwbDA=; b=IjY1g31aLVPUfGHyfo3vOi3EbN9Bntnn1ZKCvuO2WmB2ZhLDX13VpAzzX0I6s07XHx Lubmdxz5ITVvWZ3SzHtSuUG1844NZmk7mpfLR5wpq4Z8PPdjwkmAUcTfVx3hfHFqDGn/ CHgFeVt8Ad/4YXBzdEltGKGve3ptjX0eRx3g51wmidixqPgY/uCy3KUJpCTK6+V1qr0f Kf99mIWMuBjnb59IG/Jj926wsJjBRXu1CNtERVsZ3sPsaZuiABSDHj7isw4acZ7MLR1j 8ijURiKsT/Tyz+cgYHxoNa9tVnyJGXRzOkN4siGg7eWnB2h1aRMGyNHt7nUyodpwpjhh XN/Q== X-Gm-Message-State: AOAM531kcSEpExI9T6Q6I+oCd9rDZYmmXtpUmE2nYddm6rLnigX8xnAJ 5cYrX0pkKPMEtJ505xBrxYg= X-Google-Smtp-Source: ABdhPJxIKYPF0Ovbi48FHHiSjY1UtWEDTFVVWL/Yijz4HEPwFhdhxl+1jiZgaP4oixNJOBgyid3jsA== X-Received: by 2002:a62:8f4b:: with SMTP id n72mr10540579pfd.5.1597654040357; Mon, 17 Aug 2020 01:47:20 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:47:19 -0700 (PDT) From: Allen Pais To: m.grzeschik@pengutronix.de, davem@davemloft.net, paulus@samba.org, oliver@neukum.org, woojung.huh@microchip.com, petkan@nucleusys.com Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 8/9] net: rtl8150: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:13 +0530 Message-Id: <20200817084614.24263-12-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817084614.24263-1-allen.cryptic@gmail.com> References: <20200817084614.24263-1-allen.cryptic@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 e7c630d37589..b6d70716321c 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;