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: 262453 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 2CB3BC433DF for ; Mon, 17 Aug 2020 08:46:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 093E220658 for ; Mon, 17 Aug 2020 08:46:41 +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 S1728180AbgHQIqi (ORCPT ); Mon, 17 Aug 2020 04:46:38 -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: 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/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: 262452 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 3AD8AC433E1 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 1851D20758 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 S1728305AbgHQIqx (ORCPT ); Mon, 17 Aug 2020 04:46:53 -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: 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/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:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262448 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 99146C433DF for ; Mon, 17 Aug 2020 08:48:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77B1720658 for ; Mon, 17 Aug 2020 08:48:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OdXiaKjL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728551AbgHQIsN (ORCPT ); Mon, 17 Aug 2020 04:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbgHQIrA (ORCPT ); Mon, 17 Aug 2020 04:47:00 -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 5733DC061388; Mon, 17 Aug 2020 01:47:00 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id q19so7173010pll.0; Mon, 17 Aug 2020 01:47:00 -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=4TxG6+J4B/o5uSMqtKNoCn/oi2hrZhvhcZ6aqvQF8Ek=; b=OdXiaKjLj6swXp8EzhhhqBW2gdWFZDSDNffoJWy1fhZn7qDQy6s+zOtPuhe3g1G8jU YGNNUjquAo8NKVx4by3/4Bdv+kjhfXSd2ma46VSnnBlKuCxAd7cOwghp8ffBPq9hErI+ gPkuxXhgsIGOFJTAir23hvv2wcwkqQOlnY8N8Qk+/ip35DW5ERH/wBobzvUjJil2GBC7 PuqUsdt81xF9JuZjp7mkZ9y/a91CK2ZBlyxFjPas6xj79vSa/RZk+fPvq+kaC5KL6vM4 5Zy21BidyF6CxrvxlkTFLWVn0b+gOsrodeFk5FvoKNRrngoWclla85dvNKA2NsexXilU /MdQ== 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=4TxG6+J4B/o5uSMqtKNoCn/oi2hrZhvhcZ6aqvQF8Ek=; b=t0A6blW4JchfbemmPfpwU8tntT8uiaQoMo3b+8Eg43cU9ooQd3z1yUBedEdGxRNROT IpS/q+9PwsoiVY7eL4chMsh36PqkU3pNJgoxpbt630t+xbkDbhn52Cn5V50KQ1I100Dl RTXGjZk1jkuj3ZLx1NEv8S6Fp/ZDv9mBTChPrugnZHY42Go8b6XzBgvYIqb+55lt4Q5G G07r/Ok7UD4SM8bXAQrrXNDzgnJvq7QgPbcuT1YTL1cQC3YyllcaMSpxs5CzL6sJwPXm GYa5jSv7SO41u1U2ld+zQUsOqg7CbcVeJb4D6u82d9SuHlFWOK6VA6rpcwWjvQFyrM4c 1YCg== X-Gm-Message-State: AOAM530BlofIitS8HjPugQorCSVdRO1Z8BgMBnECM34bC2O5jJM/Mxau +hxvVmWIkO3IekAVwzN4WjvrQbbGRo4OEA== X-Google-Smtp-Source: ABdhPJzEs6e7wO/WADFWSaj9sezCrs7Z0iJjmWIs3AcMsJ/DSkokg382ikDsGXCnOjQv0XnvCsG6Sg== X-Received: by 2002:a17:902:9b86:: with SMTP id y6mr10707980plp.127.1597654019873; Mon, 17 Aug 2020 01:46:59 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:46:59 -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 4/9] net: hso: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:09 +0530 Message-Id: <20200817084614.24263-8-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: 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/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 2bb28db89432..56b3b6395831 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 Mon Aug 17 08:46:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262451 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 0370CC433DF for ; Mon, 17 Aug 2020 08:47:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D111A20658 for ; Mon, 17 Aug 2020 08:47:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PUJ1wLCx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728440AbgHQIrK (ORCPT ); Mon, 17 Aug 2020 04:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728404AbgHQIrF (ORCPT ); Mon, 17 Aug 2020 04:47:05 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23FCFC061388; Mon, 17 Aug 2020 01:47:05 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y6so7169994plt.3; Mon, 17 Aug 2020 01:47:05 -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=XzAA7QZ/JwcFzI2XScQHE0IAe+dKTNTeiH53oeNSRfg=; b=PUJ1wLCxWrpKBcdLb6Jc/e4ZqPX7SEPaggXzj9jp+/F16n/S3bnRJUytGqH6lbhkKi 4n9SEUEEjYiVNi4rZWGRjio8H1gVKsR83S8duAYNUVAut1ukyhrIsHBDgHSaJFbVCp1j WCdd02yB7zx04gQlhsOLEAqHcKBT+pwxiWe0kDc1qsD1HdV1FpZBO7lepcK4nJGT/I0v wxFeMGPvQBOwvrbMrK6X79sAhoylApFewxMl0JOaULSPpb9eAxl9HH4DB7Bf6xc1xWoq bWsSpZldh3wyc/jg/gOEAh0vJhbvhXOOAypSuK+0ZJw60D3WkfY4/COfr6tNwnMoIZ76 7/3Q== 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=XzAA7QZ/JwcFzI2XScQHE0IAe+dKTNTeiH53oeNSRfg=; b=JRJiVjqnAkaiLcLlJ4kE2utP1Pd1zUwG03Y6jn7k20u1bdEPDzvj0SCeAm0k2pPnf1 XJOTzpn4VDDVJPNCf5wkr0eElvNOoNuwsCAMOTLg264F7ykBq6Qqny5lmQPwN3MDOBGJ MBWAunfNwtwnD7jH9ZbzUDDs/EBIABejfwGiiB/nOE5mYm+S3OJLZNxTG3MaEjgn6UFW U+myXjbFtTv5EYnZnmPdJYQul3uoWaWXRfNmkGFUYY5fw+/z7j5DvfhYTsTSzdVWw+WF OwNM7XrLoPqHdP8sR2lRWoU/7ciCaeHLZqo88uYcxChcXHBJNpC8an4aOUU8nJ2t3G0q 3P8g== X-Gm-Message-State: AOAM533m6YahuR7Bqdu4Fdu570UIS9LCe82O7+elx3snCJcaPNdX71A+ o+QY7kVqWwMIx/vgFxfqG+8= X-Google-Smtp-Source: ABdhPJzdKnoWl9RVy3K1G6BUrlM3wOchRsvYl2AOsspQKQL0EzzBUBSgvSm96fUrUjfFaqAYkWe+cw== X-Received: by 2002:a17:90a:3948:: with SMTP id n8mr8712576pjf.156.1597654024645; Mon, 17 Aug 2020 01:47:04 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:47:04 -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 5/9] net: lan78xx: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:10 +0530 Message-Id: <20200817084614.24263-9-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: 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/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 442507f25aad..557999a94ef9 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 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: 262450 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 346A3C433DF for ; Mon, 17 Aug 2020 08:47:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1336D20658 for ; Mon, 17 Aug 2020 08:47:27 +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 S1728087AbgHQIrZ (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: 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/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; From patchwork Mon Aug 17 08:46:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262449 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 3FCC2C433E1 for ; Mon, 17 Aug 2020 08:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DD0320658 for ; Mon, 17 Aug 2020 08:47:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HFtOQ5Al" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728512AbgHQIri (ORCPT ); Mon, 17 Aug 2020 04:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728016AbgHQIrZ (ORCPT ); Mon, 17 Aug 2020 04:47:25 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68210C061388; Mon, 17 Aug 2020 01:47:25 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id k18so7883461pfp.7; Mon, 17 Aug 2020 01:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I9FCZOgIDuZqeurOHDh0nbpiKmkOvQNtsIsTlWYfc1Y=; b=HFtOQ5AlNWLobweJbdYclZKpNoCZYZSSQ7FjqaOzxn3bUNoTtUgUfNeCT1A+UbLXVY FdbbVnKnsy4hXPSbY7m6m3Kc3GKYQl4Z1tcriXuMcZsULljml7W3WoY09rp+AwjybdST Kr4G7JrhHKO5p9ek0hpCjB+kbOPzmhUHuoHueGU8tP+Y4xZ+j/+Ea7Y7QRhBfpX2IT10 FISBVOF4394pHGIexQJUSskOjPhebxVO1hh1EuCIoIulAHsTKN2Z/o/U423Xu3a/c94g HIK/XiVoaTPKB1ItLx53sa3m+W9acLIHG0HijwffrWelWvi0TwouPy03yuV1LSMCgQB0 YUxg== 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=I9FCZOgIDuZqeurOHDh0nbpiKmkOvQNtsIsTlWYfc1Y=; b=YMWcXzdPWpr631LG0jrgLUjt8GkUYTjMp88IOjDcrJjyFD4+tPDZNypMbTAHy3pv9v 6rfWT8sCFxORfoahxMSe7NTkzSEKvhQZgxTz5x4/IJ8DMjFn+NLb95NC2qpWPb1jiyi2 6kzD/ZvvpWKaANQWvEVsgUyAnkTr3guc+q+XmlpLhl6eMv+9nHr5z2YpVka+5MuYkcTH 7DMeT+JbW7CiwjMcKUBblzQYo5GVFJz3oglLhVlFpvK7nD+tg2L9tIZC37u1e0jHyrBL YmFQ5ZpOHo3xB+rjY8+bJiKCKWqsjR4WfwvaopcPvzFGnrX9eqkN9hgZv3KUtu5ENya4 NpqQ== X-Gm-Message-State: AOAM533LcKEMrj2nwu3Atgzz2QdjBi8qLHXh6ch+6j/Mldn7Ws4KDxW7 EjArTVfg2VVJCE88HrTr+GU= X-Google-Smtp-Source: ABdhPJwTnBvHFCwyjA7hh+z6WJdIOftS4ISK9d7eBdKss0Xek7P60Pw9LQNtFXEqQ85qo+gOEiLD1Q== X-Received: by 2002:aa7:9564:: with SMTP id x4mr10453280pfq.29.1597654044966; Mon, 17 Aug 2020 01:47:24 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:47:24 -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 9/9] net: usbnet: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:14 +0530 Message-Id: <20200817084614.24263-13-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: 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 e45935a5856a..45bf0814939d 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);