From patchwork Mon Aug 17 09:02: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: 11717339 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 70ED1618 for ; Mon, 17 Aug 2020 09:02:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 510B3207DF for ; Mon, 17 Aug 2020 09:02:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jyoKi+zL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728037AbgHQJCb (ORCPT ); Mon, 17 Aug 2020 05:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgHQJC1 (ORCPT ); Mon, 17 Aug 2020 05:02:27 -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 15904C06138A; Mon, 17 Aug 2020 02:02:27 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id f193so7899654pfa.12; Mon, 17 Aug 2020 02:02:27 -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=2vTu6UftF7cQJbJWPsIkFjwuCpKR0DhP9J5zcRGrqoI=; b=jyoKi+zL9LSuhOPQ80fRIjLL7JLJHMk+jLLKWZWpDdCply4xhhtYwfiLo+v9Gmd2HB MoafH47E2/qeJ3o2/fhNpyesUHbHtqfSjtNFfI680LssZHCLaakpecGrN8t2GiXyVYKC U3YqdYATtpfP0z4bvmCdcmaXgeHyeh3N+B2Ry1cg1RYmTwAWLlEQUKP2f5ItyZ8Y0QKK MJ5ISgtHIBDE9WMLkRMfUB9u/usIIFGRwKHPqdpsRqbCg70JlN7uj5wcW1vruY98BiKD POnKmfAz4wNjunOokWZ/ePwWAZgvXkfvv40q2M2wXRYwrnj+kDNIzuB7thZaxu1p0Kz8 LSqg== 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=2vTu6UftF7cQJbJWPsIkFjwuCpKR0DhP9J5zcRGrqoI=; b=kK2OG8YtlFlqVrPsR9v1KK+RY8TKXDOYNaGXRbsJDaF2J1U82qjKqq0olVmvAWJGuJ qAXL7xL6kJR64GPQMDlp7I9L80w8EQafguScXF1in7+OYYkSW6V/8gLax3NRoL1a1FKi E+dletdi8A+pZBSFoxM4REC97/sWDQOP5a+ZcqyrONckcZ+v/oscDuNpTnOZ8C6dJc4e 7I8yOqVm1cLLnoxCfMz2YvJj8b0W/gPCHW9UepwpSDvZx831OH8K875IYruOittse2hZ VxwaWHt9l17TaEHdcB4cvPtmwRyHz78pIhE25zDIB3sAwIWt2ngxXkfEQ9wkF3SP5vAS 3wiA== X-Gm-Message-State: AOAM531ocEjI7YwzUEDgmJd1lqsTjdqiBfxDbRUFNjWeoccdKbyR/F/Z iGPUapcx2pM4VO3zAbmRTXE= X-Google-Smtp-Source: ABdhPJw+NUVlFHmHuq0xLyJ9Qs3O4JjM2hTVZcFUlYoIH6k59c4k+FO8V6iZ+byK1cCoIzwPNcFOEg== X-Received: by 2002:a62:8141:: with SMTP id t62mr10236273pfd.282.1597654946593; Mon, 17 Aug 2020 02:02:26 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:26 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 1/7] usb: atm: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:03 +0530 Message-Id: <20200817090209.26351-2-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/atm/usbatm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 4e12a32ca392..56fe30d247da 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -511,9 +511,10 @@ static unsigned int usbatm_write_cells(struct usbatm_data *instance, ** receive ** **************/ -static void usbatm_rx_process(unsigned long data) +static void usbatm_rx_process(struct tasklet_struct *t) { - struct usbatm_data *instance = (struct usbatm_data *)data; + struct usbatm_data *instance = from_tasklet(instance, t, + rx_channel.tasklet); struct urb *urb; while ((urb = usbatm_pop_urb(&instance->rx_channel))) { @@ -564,9 +565,10 @@ static void usbatm_rx_process(unsigned long data) ** send ** ***********/ -static void usbatm_tx_process(unsigned long data) +static void usbatm_tx_process(struct tasklet_struct *t) { - struct usbatm_data *instance = (struct usbatm_data *)data; + struct usbatm_data *instance = from_tasklet(instance, t, + tx_channel.tasklet); struct sk_buff *skb = instance->current_skb; struct urb *urb = NULL; const unsigned int buf_size = instance->tx_channel.buf_size; @@ -1069,8 +1071,8 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, usbatm_init_channel(&instance->rx_channel); usbatm_init_channel(&instance->tx_channel); - tasklet_init(&instance->rx_channel.tasklet, usbatm_rx_process, (unsigned long)instance); - tasklet_init(&instance->tx_channel.tasklet, usbatm_tx_process, (unsigned long)instance); + tasklet_setup(&instance->rx_channel.tasklet, usbatm_rx_process); + tasklet_setup(&instance->tx_channel.tasklet, usbatm_tx_process); instance->rx_channel.stride = ATM_CELL_SIZE + driver->rx_padding; instance->tx_channel.stride = ATM_CELL_SIZE + driver->tx_padding; instance->rx_channel.usbatm = instance->tx_channel.usbatm = instance; From patchwork Mon Aug 17 09:02: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: 11717345 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 AE77915E6 for ; Mon, 17 Aug 2020 09:02:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 960572063A for ; Mon, 17 Aug 2020 09:02:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mJ5F5yld" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728226AbgHQJCh (ORCPT ); Mon, 17 Aug 2020 05:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgHQJCe (ORCPT ); Mon, 17 Aug 2020 05:02:34 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4EA5C06138A; Mon, 17 Aug 2020 02:02:34 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id m34so7797767pgl.11; Mon, 17 Aug 2020 02:02:34 -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=gm2DPvF4/I64ZAeUJOgSkbWKhyOzAElLnGagSu5aOZE=; b=mJ5F5yld6XickAHkvpBb6JckeIwY+bA+85siQwV3lN0jaztwnK365EyFRr/uQvz1yk XO0zlZv6rWVSyY8Dhd0gGIenv3YPdwJN3G69408jkglbW+u68hu8IBKc40WjDTLyTggH 3RhPklarqCEx0e+sEHZ5XJET0lGsJEgbuSlU6OFZbJsF6sORYH51Iqccd1QD4gdYl3wo XcmGgxA0zhWX3i7FAwXWRRt7OAzBVmSsDo4xFkuLn1PyFan6fPqLb14InRHksPqD1Rm1 I0ggraWJpV8DM9XeC34rrApCjEQGSgmlQ4ww4ZDkE19y+PJLZdca3xC1Waq5EHb4j4ZC ekaA== 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=gm2DPvF4/I64ZAeUJOgSkbWKhyOzAElLnGagSu5aOZE=; b=UI9LGtD3ucQjzDcJDbfBAsKeLlO6ARSW3yCKOGWPsoPiPd31XzfeDcQdK7NWjfM6JG s0gu3CLlsDf7RvVoJLaAmJMOdT8dlZQ6SXLF0xRKZZiuJ0NZUfVdnU9TIKqVmF92u6ja xhRIVAtsPJPjPACJ9rHTJTCLM+ftSXy3L4zky73V7AnjS6APDB2Aw4xbvXhy6++O2YgB 3+T1C7OBTlq3ZGsKghVhAmRZXkU/MGup8vPDZBpy8fvm23esJ2mzeylik9wHEVR9cLS+ Mp5r22OVVMzYQvOnSQaEpI+PBRNHvtQt7P1pIZjIQ6tvXI6BFRXvOeLYkj+gxGhKufYK DT2Q== X-Gm-Message-State: AOAM531mbu5jrtXYHqvblB0IqomIGcsqG+6JwkNNCSjXbqkd9FsmRM2G 8RJeuaWzs0UgMmHXilubt0E= X-Google-Smtp-Source: ABdhPJzaHBXW6zQTImjBsJ8W8K4gYkr4wCtwsNf4qlxo3NDdA8id6na2HB0/9zVB74dwUb98LkWYLg== X-Received: by 2002:a65:408c:: with SMTP id t12mr9819753pgp.204.1597654954303; Mon, 17 Aug 2020 02:02:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:33 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 2/7] usb: c67x00: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:04 +0530 Message-Id: <20200817090209.26351-3-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/c67x00/c67x00-sched.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index f7f6229082ca..6275cb77a15b 100644 --- a/drivers/usb/c67x00/c67x00-sched.c +++ b/drivers/usb/c67x00/c67x00-sched.c @@ -1122,9 +1122,9 @@ static void c67x00_do_work(struct c67x00_hcd *c67x00) /* -------------------------------------------------------------------------- */ -static void c67x00_sched_tasklet(unsigned long __c67x00) +static void c67x00_sched_tasklet(struct tasklet_struct *t) { - struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00; + struct c67x00_hcd *c67x00 = from_tasklet(c67x00, t, tasklet); c67x00_do_work(c67x00); } @@ -1135,8 +1135,7 @@ void c67x00_sched_kick(struct c67x00_hcd *c67x00) int c67x00_sched_start_scheduler(struct c67x00_hcd *c67x00) { - tasklet_init(&c67x00->tasklet, c67x00_sched_tasklet, - (unsigned long)c67x00); + tasklet_setup(&c67x00->tasklet, c67x00_sched_tasklet); return 0; } From patchwork Mon Aug 17 09:02:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 11717351 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 5568C618 for ; Mon, 17 Aug 2020 09:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A119207FB for ; Mon, 17 Aug 2020 09:03:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FyHA8htL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728536AbgHQJCt (ORCPT ); Mon, 17 Aug 2020 05:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgHQJCj (ORCPT ); Mon, 17 Aug 2020 05:02:39 -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 BF49CC061389; Mon, 17 Aug 2020 02:02:39 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id h12so7799994pgm.7; Mon, 17 Aug 2020 02:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UYpUeS1hP1RQ+3Csy0p0MaiO+KURPCHIrOFJB/W4BNg=; b=FyHA8htLUZywOn857O2b3757Cv66ivSRPc9IwjTSfcapfKLmK/RelgXCNMaP5JGqBO i38uxESUktlsz8xJ19dO5x7CAsjIPLSKuwA7DDKokU7BwobiC/Hy55dTY2JN+Tv1DXlS 5QSARaroOX/vXTWtoibB02nZwqnjFgBnywEZmGbdZase0SJmPcAssSaXt2USCpsaUddM U27muHcVhsL/ZkkJxXOUtSzG1E/o91SCNKqbtP6Z1ReiQlRrZxr7yMxHXmrCrNPf/oWy am/DkNreNiPdfDEjWL/BAVSqViWlaub13YdRcoFpNIuFAFp8ryxD9uEx7wFoEJChMQOm UGDw== 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=UYpUeS1hP1RQ+3Csy0p0MaiO+KURPCHIrOFJB/W4BNg=; b=gZciw+3bU03U/V168W7RENyfxt8r6zb6K8K8WwY8QCTArCcVmX8T2pcXkO9bB3Cdzt 2gMlXzmWu/k/WgPc1xfMNnhdvfZx/lnSh0wyRVrwL6Kt7Uls0/peRuBaeqnS7MpXJnvn uwCixYb/zfouG+v5ZGdBV/DgDufDqXSzD/RHiByN7ZSPVxVz7PV4bpQcFxBjqb8yoc5G d5wZ9XyyFjMHi/AWm9KvqqXCvThm1tApv/peCimUD9Vr4nSv5GqUGOZ957dYzMnub84d 46c3S01lpAxl/aawz4H9u4kd+MxnbwNfwVVi5jfAwZ1sC97tk0metJECNHCym5SNr08Y DoJA== X-Gm-Message-State: AOAM5315P9lrB69O6fXHzAKdLyv/dA6Y9XK7zzcYHZ5OCXARalhp2aN5 NDqJpzv1iEN/J1VJi3cFF8Q= X-Google-Smtp-Source: ABdhPJwBt3uRtZb0Uwa2zvB/TmNBTn5F7lU3QEhTXBnLLn/CWY0XT3yl+T3g4A+fKIl3zsP4X/N1hQ== X-Received: by 2002:a62:1c86:: with SMTP id c128mr10680948pfc.78.1597654959309; Mon, 17 Aug 2020 02:02:39 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:38 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 3/7] usb: hcd: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:05 +0530 Message-Id: <20200817090209.26351-4-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/core/hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index a33b849e8beb..2c6b9578a7d3 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1657,9 +1657,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb) usb_put_urb(urb); } -static void usb_giveback_urb_bh(unsigned long param) +static void usb_giveback_urb_bh(struct tasklet_struct *t) { - struct giveback_urb_bh *bh = (struct giveback_urb_bh *)param; + struct giveback_urb_bh *bh = from_tasklet(bh, t, bh); struct list_head local_list; spin_lock_irq(&bh->lock); @@ -2403,7 +2403,7 @@ static void init_giveback_urb_bh(struct giveback_urb_bh *bh) spin_lock_init(&bh->lock); INIT_LIST_HEAD(&bh->head); - tasklet_init(&bh->bh, usb_giveback_urb_bh, (unsigned long)bh); + tasklet_setup(&bh->bh, usb_giveback_urb_bh); } struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver, From patchwork Mon Aug 17 09:02: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: 11717347 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 53206618 for ; Mon, 17 Aug 2020 09:02:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 362C7206C0 for ; Mon, 17 Aug 2020 09:02:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qHKlQ5E6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728595AbgHQJCu (ORCPT ); Mon, 17 Aug 2020 05:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728482AbgHQJCo (ORCPT ); Mon, 17 Aug 2020 05:02:44 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DD1AC061342; Mon, 17 Aug 2020 02:02:44 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id j21so7797700pgi.9; Mon, 17 Aug 2020 02:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nd35gBts6NgtKlgN2lcrX3AbyIcMYWPkE6/ISk0jZVU=; b=qHKlQ5E6ehfBA/hV/XlchuGk9r9+52SaKrqq5Ok0Yd97+uobN4Zyvw7O82ta5goNeL xBfom1nx+gYLXtn94ddvCCxxNFbRp5+n7BpIbqScWc5Sw0JoTpemM2JOk0zZIl1vphfd vYSLMUNFAFB3b/MT+bML4I3ZeMpmF1WsGeUJTD1Qd+02T1Nw/mtUIm+qp3t4ePJJ4B6u BJAPaA5NLPV9itEiWAesNfBSHQtLtJW1M2iXdCwhwUujS7+WjX1iUWUQhsph56doS1MV lLrQ4xwvaLW6IgaxGpHG6qJpY+tYETB2W+EgCO3Y0Xub6NR4XrYDos5cc6O5jw3X9fuN WqmA== 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=nd35gBts6NgtKlgN2lcrX3AbyIcMYWPkE6/ISk0jZVU=; b=p2/GszVrjNrWNuEwN6kD+Fh767gwE9HWIrkDYTxp9RBCQYYKVrwzeLSN9wz6B4///W Mj9KdFLhKGplUjeWE3WCk3XrGtW9BuAgNL+uyrFFiRBL9TqsuLsSto8fvJ5jvyQ+oUC4 57HeMK/fVozCAiKIgijOk1TcDAziqz+sGsvjO2bvYg8wyUKqiINET/KS51bxYt/D3yRy d07SdGjd1FvQqvLy65uWr9huL1hnJQXxsL42jGVhZDPdbpVQJ8MsUxba/Aj3YINORX4b PrAzObjsPoaQX9C026yHvdnIixUEnx9wwRHNH7zILkYBwC+Yx02KUG4QuO8YxewsohwG 9A9Q== X-Gm-Message-State: AOAM531FetSPXlO4fwrEjX5WIn2IeqpK+fi3rKWkc821oHZ9TDC0ahwe 237so6KbfLxYdo8rz/Ru8S4= X-Google-Smtp-Source: ABdhPJzf4Yw256WODaILrOgLYx1TniHaJ4JHn/KjTEA/sb3iaSQaoGjAR+GXmFwEKiXhf2N63ukVKQ== X-Received: by 2002:a63:6b01:: with SMTP id g1mr8932278pgc.192.1597654964140; Mon, 17 Aug 2020 02:02:44 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:43 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 4/7] usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:06 +0530 Message-Id: <20200817090209.26351-5-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/gadget/function/f_midi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 46af0aa07e2e..85cb15734aa8 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -698,9 +698,9 @@ static void f_midi_transmit(struct f_midi *midi) f_midi_drop_out_substreams(midi); } -static void f_midi_in_tasklet(unsigned long data) +static void f_midi_in_tasklet(struct tasklet_struct *t) { - struct f_midi *midi = (struct f_midi *) data; + struct f_midi *midi = from_tasklet(midi, t, tasklet); f_midi_transmit(midi); } @@ -875,7 +875,7 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f) int status, n, jack = 1, i = 0, endpoint_descriptor_index = 0; midi->gadget = cdev->gadget; - tasklet_init(&midi->tasklet, f_midi_in_tasklet, (unsigned long) midi); + tasklet_setup(&midi->tasklet, f_midi_in_tasklet); status = f_midi_register_card(midi); if (status < 0) goto fail_register; From patchwork Mon Aug 17 09:02:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 11717357 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 DF284739 for ; Mon, 17 Aug 2020 09:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7B7620855 for ; Mon, 17 Aug 2020 09:03:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tFFetna8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728669AbgHQJDD (ORCPT ); Mon, 17 Aug 2020 05:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728574AbgHQJCt (ORCPT ); Mon, 17 Aug 2020 05:02:49 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25D08C061389; Mon, 17 Aug 2020 02:02:49 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id mt12so7496612pjb.4; Mon, 17 Aug 2020 02:02:49 -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=fyyx5l8JBWdsh/vzK9XkI9lqTabxVOq8Vrtc0Hw0vUw=; b=tFFetna8jRJGMqAQA4gg5CD4aJnfg7vJVX2XDgITV0TAHrZGa3EqUKCj9X6roVS5ua z/bDFWyUaKt5hZ8eLbEPXauBjLbr7vULyfh2HFpNOrOrHKQspo1GpKhj2CVYSiqlOz5C E1Ty/AgVyY+Jwc7oa/2GIpXxmmuWnm7GKDqOIB5MhOztkcPbFfDxayheFXZrohbg62XB 3YGfCksc/u4epg7xhLM7TDqpQ+iPBG9DZ1GKR8YPry+Cy6xxc3eNwJo8i/lrFtKiW6jo cGlkep4oOA/E6A9HY5up7IdKcLTpd0CCE6MyIWeYwwaubVPlmp8tlZkmdmDxBBQDLqFu FnKw== 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=fyyx5l8JBWdsh/vzK9XkI9lqTabxVOq8Vrtc0Hw0vUw=; b=BXAMmPVCOir40gUPuEMm3xaPMSzHpjvk7YS/qHiGGQl4QPz5AerPZ6eLxDO3tvh749 bVZoIjuP1hstUOHh6TjMfJWy1LiKGnAfB/Rl4HlRshwseh2lqj9TX6LluBil/8Lg61ha YLLJ+OIr6a/onDQ0VdXCycJ18f7hPXciruko3ImJwJ/H3L86uBLM7Ec1QfOIej+u1Rd2 +1Ikf7lF1hUEcuHCRwiGOhKRtyHnbQeTYe+WqR3j2U1ca0j66ZCZSd/rZHgng5klofDJ R1S09bS/4PGOs/UltP8dwYzv0jrsMa53d6EBoRUFiz+wqYU/ZrwpEWTJNbb0ciRdt3lt v/Ug== X-Gm-Message-State: AOAM5323KMiw/FiKY9bteKoYUZeKi+dRqlG2FQ+jhikfATtJ9r70g56F XT0NVBvJnAp9K2GGlP1mzW4= X-Google-Smtp-Source: ABdhPJzhCkInkV1nfo/rOzX+w0Rb6oz49Qjtqes/TFI+PpxRKs02Pp4T3OSKhx5YtGjO6CHHY4rWlA== X-Received: by 2002:a17:902:d715:: with SMTP id w21mr10488997ply.197.1597654968699; Mon, 17 Aug 2020 02:02:48 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:48 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 5/7] usb/gadget: fsl_qe_udc: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:07 +0530 Message-Id: <20200817090209.26351-6-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/gadget/udc/fsl_qe_udc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c index 2707be628298..fa66449b3907 100644 --- a/drivers/usb/gadget/udc/fsl_qe_udc.c +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c @@ -923,9 +923,9 @@ static int qe_ep_rxframe_handle(struct qe_ep *ep) return 0; } -static void ep_rx_tasklet(unsigned long data) +static void ep_rx_tasklet(struct tasklet_struct *t) { - struct qe_udc *udc = (struct qe_udc *)data; + struct qe_udc *udc = from_tasklet(udc, t, rx_tasklet); struct qe_ep *ep; struct qe_frame *pframe; struct qe_bd __iomem *bd; @@ -2553,8 +2553,7 @@ static int qe_udc_probe(struct platform_device *ofdev) DMA_TO_DEVICE); } - tasklet_init(&udc->rx_tasklet, ep_rx_tasklet, - (unsigned long)udc); + tasklet_setup(&udc->rx_tasklet, ep_rx_tasklet); /* request irq and disable DR */ udc->usb_irq = irq_of_parse_and_map(np, 0); if (!udc->usb_irq) { From patchwork Mon Aug 17 09:02: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: 11717349 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 32BA6618 for ; Mon, 17 Aug 2020 09:03:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12EFA2080D for ; Mon, 17 Aug 2020 09:03:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y8e7p5A+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbgHQJC5 (ORCPT ); Mon, 17 Aug 2020 05:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728482AbgHQJCy (ORCPT ); Mon, 17 Aug 2020 05:02:54 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0081EC061389; Mon, 17 Aug 2020 02:02:53 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id x25so7919257pff.4; Mon, 17 Aug 2020 02:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9gjqpRS8olyjc/G08W3tsbKuo7w0JyAKTnFiPDwOnLs=; b=Y8e7p5A+U70fs8zMCX99v4qWd6fhAwzqCgzVw6MybAu0YKzv985Gzz88KVzjlO00kH ZAjoOPBR7uVDqzY14l50NCRxWKxebE4hCuLp3K82NcoayY1F4MmINy2f5odh9eHAndnu C2NiQKq3ADK50JyGQPJa+npJ4re/v4TtPyhWg9Ji4D+RO3dxkLFyhA1P0wFFg7kTBxd1 b7RqHitiCauEPujt1dsnfyTsWUKed/bl9Yh7l8IX1Jvl2G6n9K6la8snK/umY1tdQSgW KDOIL8eRZTWF6bSt4eI8gJuznMohjSDQ+jTZsbLhNXvtsfB7P7kVvBJ+6WNyPH7oaPwN 8b6w== 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=9gjqpRS8olyjc/G08W3tsbKuo7w0JyAKTnFiPDwOnLs=; b=hu76dRLqQQQ7cYCNjUxDfwUB5IQzLxrTDCuG/dBZcI8lZp73S4AR4UqYKtvukn9UxK 8o2y+9DhdDYVs18/jxQqf6AMCfKQXQE7xZllI9RHdID4t3sBKB8H99jgAxzdTQ9xkd2G 7RTZ/v4TeRg9b67NNx8T7pNYavRvaYV8sI9wwzs35yx/NMsU4OFIE2PNq/5ITKl87PFB 3ZiEBV4Lzbsh/33wdnOjvYcF8Sy5WcJK6Y/OC1ntv0gOwkP4GgTaD6/kwKStqgejKMUx sCiA5Fg/3CuM+cXTa3s/hJV4IAbK1gROeqiG1dk3nbinQIT4qKyYUJhZhWicC/RPAXq+ iF5g== X-Gm-Message-State: AOAM530RHXIQZN3/MXNHf4N3XKEDXFqAYRokY+n/YebSvjWtjLhBvh4Y lgp02Uyj4ZYxWTTybSvngp4= X-Google-Smtp-Source: ABdhPJwCbYSaFDUdxe1jOJYWD7q8rFdA3Zk4x0wFc5VcGkSDok1smRFfy3wXDtC7EEtu4HiZJA6q+w== X-Received: by 2002:aa7:9ecd:: with SMTP id r13mr7291913pfq.317.1597654973506; Mon, 17 Aug 2020 02:02:53 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:52 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 6/7] usb: xhci: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:08 +0530 Message-Id: <20200817090209.26351-7-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/host/xhci-dbgtty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c index b8918f73a432..ae4e4ab638b5 100644 --- a/drivers/usb/host/xhci-dbgtty.c +++ b/drivers/usb/host/xhci-dbgtty.c @@ -288,14 +288,14 @@ static const struct tty_operations dbc_tty_ops = { .unthrottle = dbc_tty_unthrottle, }; -static void dbc_rx_push(unsigned long _port) +static void dbc_rx_push(struct tasklet_struct *t) { struct dbc_request *req; struct tty_struct *tty; unsigned long flags; bool do_push = false; bool disconnect = false; - struct dbc_port *port = (void *)_port; + struct dbc_port *port = from_tasklet(port, t, push); struct list_head *queue = &port->read_queue; spin_lock_irqsave(&port->port_lock, flags); @@ -382,7 +382,7 @@ xhci_dbc_tty_init_port(struct xhci_dbc *dbc, struct dbc_port *port) { tty_port_init(&port->port); spin_lock_init(&port->port_lock); - tasklet_init(&port->push, dbc_rx_push, (unsigned long)port); + tasklet_setup(&port->push, dbc_rx_push); INIT_LIST_HEAD(&port->read_pool); INIT_LIST_HEAD(&port->read_queue); INIT_LIST_HEAD(&port->write_pool); From patchwork Mon Aug 17 09:02: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: 11717359 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 54169739 for ; Mon, 17 Aug 2020 09:03:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38E8D207FB for ; Mon, 17 Aug 2020 09:03:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UGys9s0c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728677AbgHQJDE (ORCPT ); Mon, 17 Aug 2020 05:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbgHQJC7 (ORCPT ); Mon, 17 Aug 2020 05:02:59 -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 E2827C061389; Mon, 17 Aug 2020 02:02:58 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d188so7911952pfd.2; Mon, 17 Aug 2020 02:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xXbF1OGSfwps8eIxFqyJWCOGFrRBRoS9IAapxWYH5tU=; b=UGys9s0cH3XJ7ytiyAvyHhECfx/sgE7VT+4dU+PFtuVRKYibSk4ZdfmReJ5RHeo4oB cE77BSIVRi+aL2qPqpPHpFAR1LSBTrzvNNl5+1z2oukApZE2Lh0c8Y3/yCTaGn1btkI3 DvfBXKhyn1mhWjbBF8kHKW4euTK7Ux3RSg5XFcHWLBm6Ex4WbXmFJRsy6oz8LHIem23T s/vVZgJ8dTQWc7edHye0v87zndklTmo3yTfDJa2KJhz3KKYSGaQVeY4NJka4LW2TDcnd io8PK2w/yoaTYclhmldJ4rX2kkhp+HrYmndLi4PUVEPGGhD9ac4NWIc9Y4RAyWFd0HTP 8flQ== 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=xXbF1OGSfwps8eIxFqyJWCOGFrRBRoS9IAapxWYH5tU=; b=t/TwHd8HmtIHs+F7YY2ICaMIAyEfzGNsuk+72JWdY7gu3mxi8qbKwQ7vRc3NT4sGgm 5D061goswTMYEpLiwN9hPe+FZM+Pij22PBQrrmUlQj6l6gBLf8AwbHm1PGjWnCYhIw7I g7UjtIj5f49Pd6q4Kuc4o+JvqXfrXh5UGX++fIB+gJ+GjwfNiL4gP8Iuuxs+jvzftucM t0jcvRdPHDyCHe+4+9zAts8eYbBrPMr2ku+4cBYgVlPqjiKdXyhmM6FGEtyCOAjq9PN7 qnC8PD4XPtd6kHgMYA1KJ0coL8Cs/lAjAZBsY6nD3C1h8GNtbgRIL/ZYsy2NGdoVY+qL ENeA== X-Gm-Message-State: AOAM5311USW/0l7OIp4AryyLL7dGQeSwQTlOBBkZDoARQQqWjqUqBMCP qFdA6mabNDKYpkELFh0gPnw= X-Google-Smtp-Source: ABdhPJxAkXUAop1wEFaah3YAPnjGLxZjtihx6qYBEHA3JVTfQ+jUGc2wTge02f2yvKEBQPSGJto8nw== X-Received: by 2002:a62:3856:: with SMTP id f83mr10808398pfa.35.1597654978435; Mon, 17 Aug 2020 02:02:58 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id f3sm19488238pfj.206.2020.08.17.02.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:02:57 -0700 (PDT) From: Allen Pais To: duncan.sands@free.fr, gregkh@linuxfoundation.org, jacmet@sunsite.dk, balbi@kernel.org, leoyang.li@nxp.com, johan@kernel.org Cc: keescook@chromium.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Allen Pais , Romain Perier Subject: [PATCH 7/7] usb: mos7720: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:32:09 +0530 Message-Id: <20200817090209.26351-8-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090209.26351-1-allen.cryptic@gmail.com> References: <20200817090209.26351-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/usb/serial/mos7720.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 2ec4eeacebc7..5eed1078fac8 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -282,11 +282,12 @@ static void destroy_urbtracker(struct kref *kref) * port callback had to be deferred because the disconnect mutex could not be * obtained at the time. */ -static void send_deferred_urbs(unsigned long _mos_parport) +static void send_deferred_urbs(struct tasklet_struct *t) { int ret_val; unsigned long flags; - struct mos7715_parport *mos_parport = (void *)_mos_parport; + struct mos7715_parport *mos_parport = from_tasklet(mos_parport, t, + urb_tasklet); struct urbtracker *urbtrack, *tmp; struct list_head *cursor, *next; struct device *dev; @@ -716,8 +717,7 @@ static int mos7715_parport_init(struct usb_serial *serial) INIT_LIST_HEAD(&mos_parport->deferred_urbs); usb_set_serial_data(serial, mos_parport); /* hijack private pointer */ mos_parport->serial = serial; - tasklet_init(&mos_parport->urb_tasklet, send_deferred_urbs, - (unsigned long) mos_parport); + tasklet_setup(&mos_parport->urb_tasklet, send_deferred_urbs); init_completion(&mos_parport->syncmsg_compl); /* cycle parallel port reset bit */