From patchwork Mon Aug 17 08:46:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 11717109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A778815E6 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 8E3C5207DF 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="OtRevU3R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728179AbgHQIqi (ORCPT ); Mon, 17 Aug 2020 04:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728110AbgHQIqg (ORCPT ); Mon, 17 Aug 2020 04:46:36 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A2FEC061388; Mon, 17 Aug 2020 01:46:36 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id mt12so7478020pjb.4; Mon, 17 Aug 2020 01:46:36 -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=JyZDla3GSQu8y9PuecHRmoHloxiXoZbN5kGEO0ZCGqM=; b=OtRevU3RHg2HvzTD4tAV5LooqXPgMzAC6RQF9L4fQaUTi9xEo/TaVaZuvndcdGq7Ig 8YpGbM3rlOMnbdFD2CqXmfR5emUW86UXcJAgXlsb6D+DMxSgtQgcw0YDgamosabDIJOc FF3BdqPAy857z+CCGtZ/yKzASg1VXXq4H5YDb1jJ2dRSykSBgw5ydo9FiZ8mUpwXABLO NL3oD6+6zoRTw2IddI/HXPwGZh1gLPBs3xBwY8/1Cn/5niq9xVj4CXxl3Q9oKk4oCNG4 tt+Q3PzHkyyQpEHXpnwj0EZSfdyNYKQ6Q4xrPd76CGRS0KEeytup7o35QNh6YsCsVbIu BQBw== 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=JyZDla3GSQu8y9PuecHRmoHloxiXoZbN5kGEO0ZCGqM=; b=PHSQOotT9UzvJ1oa2bMbc/8LzD327YC2AVVYO9p1a9ZpuR5RFlrOvGOsVUu/NfLtc/ ESefwOZJGeZ9Esj1GXB6aTf292wPUJ3quiK7RG+06jJ2vqBssn/OqjNfA7Rq4sSr5O3o mm1fxs1JDEW2BS6HrhKWLZGHC2Htm+vWUre75U1pU1jPlaAb0B8+BkCA7jM8JfFzIuCX oT/zApCS5Mi5waSDDd/BS2J69CFoxHpaeIq1+jYb2HbqJp/o6az0PQmJOJ2VE3DDlB8G /gx+aeF6Xid3vztpDkCKpFW56RV9kX0QTqewlLQny34mVqLoBCmMORaLBq3lD9Xy1pzw OcFQ== X-Gm-Message-State: AOAM533rkQdciYGB65QzZAWHEDNXXHMfJQcNrTNmSyzUXjXeGewulCZM RVYAHq6HKGFy95aLIoE5Hxs= X-Google-Smtp-Source: ABdhPJwtIy6H1JNlP99tqVKJm7oD/92VbujI1oTFtbXZTJi8go/diz32GKDxkLDAyM4vEgSgRcx7Cw== X-Received: by 2002:a17:902:b203:: with SMTP id t3mr10076797plr.50.1597653995599; Mon, 17 Aug 2020 01:46:35 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:46:35 -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/9] net: ifb: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:04 +0530 Message-Id: <20200817084614.24263-3-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/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 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: 11717111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4217D109B 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 299F2207DF 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: 11717129 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CAEA109B 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 1534E207DF for ; Mon, 17 Aug 2020 08:48:12 +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: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: 11717131 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16EFB109B 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 F0DE220758 for ; Mon, 17 Aug 2020 08:48:13 +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 S1728519AbgHQIsN (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: 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/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: 11717113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B18B81392 for ; Mon, 17 Aug 2020 08:47:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98EA920658 for ; Mon, 17 Aug 2020 08:47:12 +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 S1728424AbgHQIrI (ORCPT ); Mon, 17 Aug 2020 04:47:08 -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: 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/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:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 11717127 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D5221392 for ; Mon, 17 Aug 2020 08:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6308A20658 for ; Mon, 17 Aug 2020 08:48:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RR4FE7zI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728458AbgHQIrO (ORCPT ); Mon, 17 Aug 2020 04:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728433AbgHQIrK (ORCPT ); Mon, 17 Aug 2020 04:47:10 -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 C41F1C061388; Mon, 17 Aug 2020 01:47:09 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id u128so7893848pfb.6; Mon, 17 Aug 2020 01:47:09 -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=lMvQXQqK67XE+ERJB4p7WULy70BNuugzhIMCPrWP7dc=; b=RR4FE7zIDT7xeJOw2T0yeOy8yebnB11xxk30+wQaytBEzxV/MFN6/pC9x6iU/9ygxp HddjXFM1tpAGKFD7jFJrGhn45BnTzr3yEyc2Zuss3oNBERdfs9hVTwlrDj++iTgoZxBe eNbD3eKt4dufe6BmPfHgWa9Dq+gEBKiEmyJ67+7g9urctxoZFapjBz6ZWKExv5l0ApWW 3IeCKkLvcRLuHVXiQ+BC1HTjnz9246JxhBfidmHGtTqr7jDHxv1N+RjKM5QnyCSGMfqR 4ks47n5plHjmPz+o0yuwtrVecJtoVmKR/6xeTD2qhfZb71jqKoAxI7RB+hyUQpFEUgdU DZaA== 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=lMvQXQqK67XE+ERJB4p7WULy70BNuugzhIMCPrWP7dc=; b=hwYuIPzEL7omgmWcmyFGIEnLEcihB7vX/s05WWswbmR3w7B0P2IuKr+tJWUx56YmKw y1VTwH2tBHGLEv+J/J86aeuffF5t8sR9UrhB92XtViT6sLnzH8pV92fIbQ9YpMeQ1Anp sPqrfq5Hk5ipHW9wUsrhJf4aXYEcOATuYSySvhH9W8jHWv5iqKkp23I5NeZinbyMsOdy n5Hj8v33WTCAjSlZneLLN995h9Dyf+uw6PojUNhMVeT9a+z/QF/LKoR6VHV9Jca1Ex2D 4F+Ak6bFJSsdwbtbqXoc92Ra+sdvwFFaw2pwEHS4L9J2uEVYX2veoXcqiQzsHuRmUEvF X8mA== X-Gm-Message-State: AOAM532AWtNUsz12Y3/Z+H9kU7U7oCbssTjq/8tIz0EmYz7efnxOglOF BZqvRcUdRGWaadTmtbpSVP+yIKUKE+Wcwg== X-Google-Smtp-Source: ABdhPJxb8PBsTsMLDsJ2/3LBtSkPpxbTso20fBQASjXGomLKioE9lTEwZMw1et+kICAbv3Ribbp/iQ== X-Received: by 2002:a63:9d0b:: with SMTP id i11mr9105907pgd.399.1597654029291; Mon, 17 Aug 2020 01:47:09 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id ml18sm16418443pjb.43.2020.08.17.01.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:47:08 -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 6/9] net: pegasus: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:16:11 +0530 Message-Id: <20200817084614.24263-10-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/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 0ef7e1f443e3..addf904e7c65 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 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: 11717119 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC89F1392 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 D3DBE20758 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: 11717125 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B82D11392 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 9D8BC2080D 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; 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: 11717123 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 073C9109B for ; Mon, 17 Aug 2020 08:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1BE720658 for ; Mon, 17 Aug 2020 08:47:44 +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 S1728504AbgHQIrg (ORCPT ); Mon, 17 Aug 2020 04:47:36 -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: 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 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);