From patchwork Mon Aug 17 08:16:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262482 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 C7637C433DF for ; Mon, 17 Aug 2020 08:18:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7B312173E for ; Mon, 17 Aug 2020 08:18:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CpZtowom" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgHQISN (ORCPT ); Mon, 17 Aug 2020 04:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgHQISH (ORCPT ); Mon, 17 Aug 2020 04:18:07 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411A1C061388; Mon, 17 Aug 2020 01:18:07 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id f9so7330292pju.4; Mon, 17 Aug 2020 01:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RCQBB24TVyQgJJKqQrd+pMSwLixAZ8RHZ/Oe1XSH5Ms=; b=CpZtowomUtwba5d+9jG3umtKblXH0Nv9enQMbrOs6GYgS65k2pOGxHWdIWP2HSmvN2 UTdqM9Ncf5dEJKdISwV6uubgdu8uI7cYuG1eQXJn6kbbH8gKtCrdZO07OHnFp4RHnQRr XzQcPkzksCDZYle4I0axA1CnUQMWX652Fy2AFVu32HNSRSw9hOi+fIAKuLBBrELgJXHZ sykti7yWoxKWEDjSPKRiIB3Z6Kse+8MQWiVxR3a2xzpZjSQnMxbI5Jvjg/JdCl31Cd7a 0oU4NiFpQWsjEi6zpSFOYz0olNYeMB+kX3knAyb76mWd2VjY1RAHjESHDDQczHrA6pfR 2C0A== 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=RCQBB24TVyQgJJKqQrd+pMSwLixAZ8RHZ/Oe1XSH5Ms=; b=ZVnEH5q1nH2QVuDZx+n7yk0E+MTx3TVG147CNXYRpDyNBC0MngIzK2senSbxUzmwJ3 CtD06ogBx73LbpHFvlt7kRRwW8vBJw/h4LrLqsq49HiMtCIfyxUwuJfRq/x60j3C5hgR +JHzlvT8WmIixPuOYBCK687L+D+y05ItAXYFPgezdWBqStKAowIE9ho69ygFrmdN5Vou ejf5xY3Zkpv6BfbfSXlL3XUuLPKNtbBqE6dex+Hztn3uuAUD2LzAWY3Lfq3/CdZh6w85 9ECdbfUHyjLpMI/kdVZZ8Eq4bGDl/boSSznFWpTfYBlxA93v8V93umD2gszv+6as6bto d8nw== X-Gm-Message-State: AOAM530xJGi4A4THKiMsaL8/kW/lMEoXuu5bYrX9e6Wc1bmlkV/50Lqj G7AI9RP0EQe+QrmWQCPE520= X-Google-Smtp-Source: ABdhPJwxa56ov/nlIFhSPEveChi/D5g+3jgKhjy/JdPQQGEGTnn9XaevZeRC4yuK/+UJ9g0YArNzag== X-Received: by 2002:a17:90a:ea82:: with SMTP id h2mr7951833pjz.75.1597652286870; Mon, 17 Aug 2020 01:18:06 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:18:06 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 02/35] dma: at_hdmac: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:46:53 +0530 Message-Id: <20200817081726.20213-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/at_hdmac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 45bbcd6146fd..4162c9a177e0 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -598,9 +598,9 @@ static void atc_handle_cyclic(struct at_dma_chan *atchan) /*-- IRQ & Tasklet ---------------------------------------------------*/ -static void atc_tasklet(unsigned long data) +static void atc_tasklet(struct tasklet_struct *t) { - struct at_dma_chan *atchan = (struct at_dma_chan *)data; + struct at_dma_chan *atchan = from_tasklet(atchan, t, tasklet); if (test_and_clear_bit(ATC_IS_ERROR, &atchan->status)) return atc_handle_error(atchan); @@ -1885,8 +1885,7 @@ static int __init at_dma_probe(struct platform_device *pdev) INIT_LIST_HEAD(&atchan->queue); INIT_LIST_HEAD(&atchan->free_list); - tasklet_init(&atchan->tasklet, atc_tasklet, - (unsigned long)atchan); + tasklet_setup(&atchan->tasklet, atc_tasklet); atc_enable_chan_irq(atdma, i); } From patchwork Mon Aug 17 08:16:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262481 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 73D55C433DF for ; Mon, 17 Aug 2020 08:18:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FF6B20738 for ; Mon, 17 Aug 2020 08:18:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rbGPv1Mo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727895AbgHQISk (ORCPT ); Mon, 17 Aug 2020 04:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgHQISf (ORCPT ); Mon, 17 Aug 2020 04:18:35 -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 201B0C061388; Mon, 17 Aug 2020 01:18:35 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id 74so7841528pfx.13; Mon, 17 Aug 2020 01:18:35 -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=McUFqZfFTy7mHwbw8y2LjePaGU9tqMqaDH3Woad5dgY=; b=rbGPv1MoAStGdHictLBw1dH4GZoFIaptVHT/PTQUYarAqwH8jr/NQJpRblNtu8Q41b h5kE3FK0Bcrx3/+Zd6IsTlw5aHjVtw05s4dLWtVo+8g1TVa3DmIZfm5h7PClL9HJLOWp OTSIDh9iY+xzhXKlp3+CuWBnd4nGJLinJzWoIBQ5xoTLALb0n+9o8qX9Ebbj4jGqV2jT q83tfI49OfnTPFbY8Ecv64HoBmGwkwk/Xnvsa93zdxDBXM9nLmfRw4Q+HXL/WxWR8Axb gfANCDAg2XVcS363QcNFYYj/Z8yd6ay5UQWiYipx8c6dkumwh89srhCfyJfBev9nFJBI c/hA== 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=McUFqZfFTy7mHwbw8y2LjePaGU9tqMqaDH3Woad5dgY=; b=JXjvse10SmqZvRwJ31yf2nXk33srcUQsJT7gNkfCOScPMRIxru66X/t/EOv/3pnYPh orMLB4TinZ8jQlOsmC28GExuvJJLQSdiMB5uxebe1u21HWVoPLi7RP42zZwN4SKhsGQy /p8DL05onJS0jfLHjn4fdbm2znzXw/G/eNnr9jU8HA0VXXfZQQie54PahjUz5xGFoUv1 7PZo6gtAZYywx5jvmJ+2xG/CrrJxJwPHw14Z8VSM6L4eDAr4UAkCIzHIw/T9YXao6EmH D29oC0g0olygnd4Ll0KHEjq7geiV/IbhXy82+tS4r1L1HeylMeMZetBv24Jzq9cpnxPU tkJA== X-Gm-Message-State: AOAM530PYGAU3L+r5CXNO0jw+IVg0P/KeKqOwC6fwd5fzO3Vg8r+7nAD FOdHIxgUakE8mlLgsUUN8TY= X-Google-Smtp-Source: ABdhPJz5jQMemPq+r7m/kRK32XCVq2NbmdAqGrkNdHPC5k9KVEpXSa2A/6RTZ0/LD+zMammtHEDMqA== X-Received: by 2002:aa7:96e5:: with SMTP id i5mr7562519pfq.108.1597652314716; Mon, 17 Aug 2020 01:18:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:18:34 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 05/35] dma: dw: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:46:56 +0530 Message-Id: <20200817081726.20213-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/dw/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index 4700f2e87a62..022ddc4d3af5 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -463,9 +463,9 @@ static void dwc_handle_error(struct dw_dma *dw, struct dw_dma_chan *dwc) dwc_descriptor_complete(dwc, bad_desc, true); } -static void dw_dma_tasklet(unsigned long data) +static void dw_dma_tasklet(struct tasklet_struct *t) { - struct dw_dma *dw = (struct dw_dma *)data; + struct dw_dma *dw = from_tasklet(dw, t, tasklet); struct dw_dma_chan *dwc; u32 status_xfer; u32 status_err; @@ -1138,7 +1138,7 @@ int do_dma_probe(struct dw_dma_chip *chip) goto err_pdata; } - tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw); + tasklet_setup(&dw->tasklet, dw_dma_tasklet); err = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED, dw->name, dw); From patchwork Mon Aug 17 08:16:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262474 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 C61F0C433DF for ; Mon, 17 Aug 2020 08:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A338720658 for ; Mon, 17 Aug 2020 08:20:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZPj6GIc3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728154AbgHQIU4 (ORCPT ); Mon, 17 Aug 2020 04:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgHQISo (ORCPT ); Mon, 17 Aug 2020 04:18:44 -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 E39ACC061388; Mon, 17 Aug 2020 01:18:44 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id m8so7871549pfh.3; Mon, 17 Aug 2020 01:18: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=KmEcBHcde06arqa/qnAKRl0EaY2afCtuj8GLj4ZTRM0=; b=ZPj6GIc3bq6Ex5uJOYWUiGSZFLN/814K7fHM5oA+Mq5dpIS8LCQPwVQNUGtj44Ywuf 8JGtsTJ5CYKCtK8MFgtkNaoVPuAzeoHi+Tf3kpf+KX/PviAbimyTxiPKekd25Jr4pMVy UCEnQYTEvlOVJ0m/i6dJ8djGZdkbONwIig2dW9klIJEKOz/te71+Z0SNAVizpQ8BCtCA WFL7ORtS8TH2YerqRUJ9EvA9XeGa7yQV7z9UH/4tqceHCXwSO0uNAaMdNJMJH8OlIb5H U/inY8+aVvTB9Fx/gLIu/Qpk4P+/FpisLIjv90NGEiWRW3fmCAqamLg/CeJUW/Ku0hVg fRaA== 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=KmEcBHcde06arqa/qnAKRl0EaY2afCtuj8GLj4ZTRM0=; b=lASCnhsKP8DQLAvf6i+z2GReozSV3NDJzh3yz7xTtw8L2AfKrrIofII8y4cJBmUjZU 7j+iSThynhTXDpy8dP2uiU3xbSI7IpGHTlSRWIonXxy1zExip9NGh7zeTkrAdQ5bH6uu 24BkViMqCULVmxJUjOm6kJ+JSy32UzLuU1hlnmzs9ykzN6vRc2hW93xD+x4kymUnGuMz ufwxZRzpOvFAtlxGITvinNMzBONZq1jAdgcZ2CFOAW/RvPN3cG5zz6QDP4ZWuwkFERL1 kR8NEN/8Uji9iExbBAVBho6PzSMCMvZ16ln9f7czsk1I+tZNZQHEhw08c4mPMQwLPy8F tA+A== X-Gm-Message-State: AOAM530H16M9DFx1ycgsAEIhW+9OxlthxvSxZ5Br1JnSWNORbHL5Dm6x M3+X8/3VIUcF+8xsvBi1WE8= X-Google-Smtp-Source: ABdhPJzTO4xmXekUKvlKfpAmGwBic+Bzzl9KrxVjZgG/u8ypYaxKauNmxFYJuyl0vzE9Xwqlt1/nCA== X-Received: by 2002:a63:ed07:: with SMTP id d7mr8896251pgi.414.1597652324466; Mon, 17 Aug 2020 01:18:44 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:18:44 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 06/35] dma: ep93xx: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:46:57 +0530 Message-Id: <20200817081726.20213-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/ep93xx_dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index 87a246012629..01027779beb8 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c @@ -745,9 +745,9 @@ static void ep93xx_dma_advance_work(struct ep93xx_dma_chan *edmac) spin_unlock_irqrestore(&edmac->lock, flags); } -static void ep93xx_dma_tasklet(unsigned long data) +static void ep93xx_dma_tasklet(struct tasklet_struct *t) { - struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data; + struct ep93xx_dma_chan *edmac = from_tasklet(edmac, t, tasklet); struct ep93xx_dma_desc *desc, *d; struct dmaengine_desc_callback cb; LIST_HEAD(list); @@ -1353,8 +1353,7 @@ static int __init ep93xx_dma_probe(struct platform_device *pdev) INIT_LIST_HEAD(&edmac->active); INIT_LIST_HEAD(&edmac->queue); INIT_LIST_HEAD(&edmac->free_list); - tasklet_init(&edmac->tasklet, ep93xx_dma_tasklet, - (unsigned long)edmac); + tasklet_setup(&edmac->tasklet, ep93xx_dma_tasklet); list_add_tail(&edmac->chan.device_node, &dma_dev->channels); From patchwork Mon Aug 17 08:16:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262480 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 A67EDC433E3 for ; Mon, 17 Aug 2020 08:19:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85B9A20738 for ; Mon, 17 Aug 2020 08:19:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kVYLm00p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbgHQITA (ORCPT ); Mon, 17 Aug 2020 04:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbgHQISy (ORCPT ); Mon, 17 Aug 2020 04:18:54 -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 C26ACC061388; Mon, 17 Aug 2020 01:18:54 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id e4so7459016pjd.0; Mon, 17 Aug 2020 01:18:54 -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=31As0TImtle4pJMBIPFKRSxatdRKcSvERFzrO8LgibE=; b=kVYLm00pzoz/kYADfRgu3biXEv4rb/ftLTz6v+Mm2Ug1uaoBSCJnXIC+O5/vlEqHEG SoN3MeizX3SsTGtWi6lLT9/XOUnxZn/8BU5hyYewUWLtJfBx1RGXKoxz0pPr7dx+pghg M69hQ46jFRp9eVSk7AR9qrZQAp0f37Kc+9Kk24UnbEqn+oajrWQG3MApns/YsJSZV7qC siz5ss3nuBGRrY6Mk/RvwVMbxpPKrWRPH5w8tLvplV3bADjPVgOmly7i4G9W49hfdmb5 /Y17AISDHxF/rZ0dkCDnZKnr/Mbd4cPQ5DApM8nSF4Yo0pFYNuJi3oYRNJIU6q03IpKG IKaw== 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=31As0TImtle4pJMBIPFKRSxatdRKcSvERFzrO8LgibE=; b=XzhOBVAvXld+CCkSPwN+c3BpLz5CVKDjavq7QSA3kGmAMMCT5VEt2qw9ZFKMuL25BP OVOpLiI59Gkz8fic+egr5ZCZ9p9UbzjiaPwfzBHprSTpdHhLpS7tEb56KuT38zlNDyLc mnwpLuLjoP9NGIuPZWyeKTjfG1Z6maKRS1Ez8TJZqzJ76PqvM67scOYlnGNtgksN76bR 1QqZtVwsljPg7rhlEfCnp3YSfICqNs/QDDSn1FsXFo7SXlpyJkJLeIdTbCvFqmXWekjf LpPQ4W78pxT6kVosNI28glxS6asKVZyvz/+WttvOMDtk/U4Psk878MGI3RDOfrfW4qPY A+Fw== X-Gm-Message-State: AOAM533oaQelse3mQRlYuMdZL8eBNXYMuth0BLP4ebJIeSo4IHnbqvfi UNtJBtuJh8uKMiSkhQmvXrA= X-Google-Smtp-Source: ABdhPJwP0zc4e3EnKYz6OndviVPG8NIAeh1Tmemt35ITvR7gj8KaKxs7FZF0RqsD/VedpkC323b1fw== X-Received: by 2002:a17:902:e905:: with SMTP id k5mr9889863pld.342.1597652333981; Mon, 17 Aug 2020 01:18:53 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:18:53 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 07/35] dma: fsl: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:46:58 +0530 Message-Id: <20200817081726.20213-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/fsl_raid.c | 6 +++--- drivers/dma/fsldma.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c index 493dc6c59d1d..26764bf2fc6d 100644 --- a/drivers/dma/fsl_raid.c +++ b/drivers/dma/fsl_raid.c @@ -154,9 +154,9 @@ static void fsl_re_cleanup_descs(struct fsl_re_chan *re_chan) fsl_re_issue_pending(&re_chan->chan); } -static void fsl_re_dequeue(unsigned long data) +static void fsl_re_dequeue(struct tasklet_struct *t) { - struct fsl_re_chan *re_chan; + struct fsl_re_chan *re_chan from_tasklet(re_chan, t, irqtask); struct fsl_re_desc *desc, *_desc; struct fsl_re_hw_desc *hwdesc; unsigned long flags; @@ -671,7 +671,7 @@ static int fsl_re_chan_probe(struct platform_device *ofdev, snprintf(chan->name, sizeof(chan->name), "re_jr%02d", q); chandev = &chan_ofdev->dev; - tasklet_init(&chan->irqtask, fsl_re_dequeue, (unsigned long)chandev); + tasklet_setup(&chan->irqtask, fsl_re_dequeue); ret = request_irq(chan->irq, fsl_re_isr, 0, chan->name, chandev); if (ret) { diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index ad72b3f42ffa..3ce9cf3d62f5 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -976,9 +976,9 @@ static irqreturn_t fsldma_chan_irq(int irq, void *data) return IRQ_HANDLED; } -static void dma_do_tasklet(unsigned long data) +static void dma_do_tasklet(struct tasklet_struct *t) { - struct fsldma_chan *chan = (struct fsldma_chan *)data; + struct fsldma_chan *chan = from_tasklet(chan, t, tasklet); chan_dbg(chan, "tasklet entry\n"); @@ -1151,7 +1151,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev, } fdev->chan[chan->id] = chan; - tasklet_init(&chan->tasklet, dma_do_tasklet, (unsigned long)chan); + tasklet_setup(&chan->tasklet, dma_do_tasklet); snprintf(chan->name, sizeof(chan->name), "chan%d", chan->id); /* Initialize the channel */ From patchwork Mon Aug 17 08:17:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262479 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 A20C7C433E1 for ; Mon, 17 Aug 2020 08:19:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B5BC20738 for ; Mon, 17 Aug 2020 08:19:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OYFh+2d+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728015AbgHQITY (ORCPT ); Mon, 17 Aug 2020 04:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727992AbgHQITQ (ORCPT ); Mon, 17 Aug 2020 04:19:16 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0178C061388; Mon, 17 Aug 2020 01:19:16 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id v15so7756474pgh.6; Mon, 17 Aug 2020 01:19: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=jWR4tpYKdIgwTfTifXGcZkODpDZhHIDKqvJr9MK44Qo=; b=OYFh+2d+PvKPM1X1rs+IA+8SX7qx1z1ncQwibPS2FwYo+kTpxsmxlZE9XxbUtNm+tv AtBfUUth4VbOKdd2rod3vSx5BrzO6OfIsUX4eNFbo63ls/Un+mZgFuOI9zrd5PSmi0mW H16w2TyJV7ro8jO/jGh4t4forYJtnlH6hrEdr4/bfLh3c7tlqcu7pV8ykwMCV1ujbk1I /vRGMPVCJk6q71CRLDZ896xcZRAOaVw4MLpDpGh/5Rfo8xdzG+956Z1u+uG0lqEebRuf G+wjGGZFdWy/VHbmmvR2INPNPdeEJO0RrFN0fVosHIqm+ZdcpzHMVsoAyb+OwlMi1/EG vONA== 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=jWR4tpYKdIgwTfTifXGcZkODpDZhHIDKqvJr9MK44Qo=; b=fhqJtMJVL9xuntPnTmzc5Mz9U51/5GHSWNqQUCvD9N666dQlKf1+bBS6P9IwzyX7d0 V61QKq7pEXzrJNKdL38X3TU61HFATD8RPTeI7Pt52yVUsHacRD7KpXid94tXeRd9Vbjz /E49H7WYzfKttKx/Q60HwtSrRBsl/hoClv/t7s12ezFzb+pKONBOOcE9GZbUtTOGrROy VyFFvHSnlWSvhBeenV/iajESghFkX3axGlIIZkx1cQt5HSTOELy8yvmcxKLZKKTJajCQ rpyom8LC6ktDmGqBU814FWS8sjFOQgF/2VWJDNe8o17E2DJ5YA0x801z78tKCYtI1VDr Buyg== X-Gm-Message-State: AOAM533t6SmMPO0MmGQtdPgJyOW/p/Ha9PIV7Cr8gijpLqKu6Zugq6Wz gzmCKutg+n9dNZCiaXwPXVw= X-Google-Smtp-Source: ABdhPJzQZQ8jCbyqROLlM27Ni7dlU0vjA+PPip0ZkkUZjaj/KtF/PrsiQ7sLHmgguZb6B+CXPAkl7w== X-Received: by 2002:a63:fa09:: with SMTP id y9mr9461516pgh.0.1597652356434; Mon, 17 Aug 2020 01:19:16 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:19:15 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 09/35] dma: ioat: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:00 +0530 Message-Id: <20200817081726.20213-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/ioat/dma.c | 6 +++--- drivers/dma/ioat/dma.h | 2 +- drivers/dma/ioat/init.c | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index a814b200299b..bfcf67febfe6 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -165,7 +165,7 @@ void ioat_stop(struct ioatdma_chan *ioat_chan) tasklet_kill(&ioat_chan->cleanup_task); /* final cleanup now that everything is quiesced and can't re-arm */ - ioat_cleanup_event((unsigned long)&ioat_chan->dma_chan); + ioat_cleanup_event(&ioat_chan->cleanup_task); } static void __ioat_issue_pending(struct ioatdma_chan *ioat_chan) @@ -690,9 +690,9 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan) spin_unlock_bh(&ioat_chan->cleanup_lock); } -void ioat_cleanup_event(unsigned long data) +void ioat_cleanup_event(struct tasklet_struct *t) { - struct ioatdma_chan *ioat_chan = to_ioat_chan((void *)data); + struct ioatdma_chan *ioat_chan = from_tasklet(ioat_chan, t, cleanup_task); ioat_cleanup(ioat_chan); if (!test_bit(IOAT_RUN, &ioat_chan->state)) diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index f7f31fdf14cf..140cfe3782fb 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h @@ -393,7 +393,7 @@ int ioat_reset_hw(struct ioatdma_chan *ioat_chan); enum dma_status ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie, struct dma_tx_state *txstate); -void ioat_cleanup_event(unsigned long data); +void ioat_cleanup_event(struct tasklet_struct *t); void ioat_timer_event(struct timer_list *t); int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs); void ioat_issue_pending(struct dma_chan *chan); diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c index 8a53f5c96b16..191b59279007 100644 --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c @@ -767,8 +767,6 @@ ioat_init_channel(struct ioatdma_device *ioat_dma, struct ioatdma_chan *ioat_chan, int idx) { struct dma_device *dma = &ioat_dma->dma_dev; - struct dma_chan *c = &ioat_chan->dma_chan; - unsigned long data = (unsigned long) c; ioat_chan->ioat_dma = ioat_dma; ioat_chan->reg_base = ioat_dma->reg_base + (0x80 * (idx + 1)); @@ -778,7 +776,7 @@ ioat_init_channel(struct ioatdma_device *ioat_dma, list_add_tail(&ioat_chan->dma_chan.device_node, &dma->channels); ioat_dma->idx[idx] = ioat_chan; timer_setup(&ioat_chan->timer, ioat_timer_event, 0); - tasklet_init(&ioat_chan->cleanup_task, ioat_cleanup_event, data); + tasklet_setup(&ioat_chan->cleanup_task, ioat_cleanup_event); } #define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */ From patchwork Mon Aug 17 08:17:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262478 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 33322C433E1 for ; Mon, 17 Aug 2020 08:19:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1154920738 for ; Mon, 17 Aug 2020 08:19:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UgrPYIJb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728044AbgHQITk (ORCPT ); Mon, 17 Aug 2020 04:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbgHQITg (ORCPT ); Mon, 17 Aug 2020 04:19:36 -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 12419C061388; Mon, 17 Aug 2020 01:19:36 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id m8so7872604pfh.3; Mon, 17 Aug 2020 01:19: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=Hn4KAQ3gCFoOl9r0ujaoL0SRctsTF3JFLZ2Rz0kI31Y=; b=UgrPYIJbdqsyAE/Fx6gmPFEQMc7zf7xRzMLMRZQ81mNRQ8r/wsHJ5XnwLrP0u+jzbb dl3/wP7rbEMaBGkc9Dqh7I1vj/vWVr3IK/R+KEaSPz4L/YA1WrTHfP/DZkyv+D2dF8YO fGRQUc6xscqzKG31PNgreYX86TUNQz1GEkpBWD/hgEIQ3mOEeU7i4VyvByRvd2vo5xyX ysyJpOD0qtT+rbSeT3efFP9ythU3610pUWwg6Rnq7OGQiNd5+PSg6HNKzwO4+bFpfjUN htIUzpe4CYMH51WkhSfmWhRu+7rfrE6sTreHEqQTr+ON8HSS40dT+eLoYpXYWUOI8X9f utiA== 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=Hn4KAQ3gCFoOl9r0ujaoL0SRctsTF3JFLZ2Rz0kI31Y=; b=glVEqdhiEwsVmQTBz0HGS39ad27gbvJjIiyOEJdJmtaTtBu9VVVoBklpTMjSkSBMqw 1HEYEeZkq+4wkVa4RGfn7n6EUh+9d9sZcRJsyhKaDr36I1vnjHCfiFVRxQv2XjAy+F+v yk1kQz2GX9Q+cvn89bcnwDEjX0cKObiRnZc7ffRGBBzfqGQYMau5uYRCOSgtnBO9337M BjvR5WJkTciGZNAmWaNcqt4Cw0d8FafIwmtGDVDRMnlhp9WPQLB1stPDkuXkD+/drUgw E3AXx0HXLeMPfOC+mhBVTcMnGOmXhkIk06kzPyOiJr8iKp8Lh68d423ZPgeVka351HW5 QfOA== X-Gm-Message-State: AOAM530rjVxRwrceJNkJaG3o3fLBpiuDvOLywjGH+z/2hxfBJRuDH6Mp tfevmR9lJ0lEta2ELIvFz/I= X-Google-Smtp-Source: ABdhPJwKzgY7w0A1JlXR4OuCaZ4g4WLJQtisLZUR6BZuNQ4S9PcFCNNh4aK23T5dkHQTo4ssudR52Q== X-Received: by 2002:a05:6a00:91:: with SMTP id c17mr10263590pfj.151.1597652375645; Mon, 17 Aug 2020 01:19:35 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:19:34 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 11/35] dma: ipu: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:02 +0530 Message-Id: <20200817081726.20213-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/ipu/ipu_idmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 0457b1f26540..38036db284cb 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -1299,9 +1299,9 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static void ipu_gc_tasklet(unsigned long arg) +static void ipu_gc_tasklet(struct tasklet_struct *t) { - struct ipu *ipu = (struct ipu *)arg; + struct ipu *ipu = from_tasklet(ipu, t, tasklet); int i; for (i = 0; i < IPU_CHANNELS_NUM; i++) { @@ -1740,7 +1740,7 @@ static int __init ipu_probe(struct platform_device *pdev) if (ret < 0) goto err_idmac_init; - tasklet_init(&ipu_data.tasklet, ipu_gc_tasklet, (unsigned long)&ipu_data); + tasklet_setup(&ipu_data.tasklet, ipu_gc_tasklet); ipu_data.dev = &pdev->dev; From patchwork Mon Aug 17 08:17: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: 262477 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 12D00C433DF for ; Mon, 17 Aug 2020 08:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D63D320738 for ; Mon, 17 Aug 2020 08:20:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zv4j3ZnQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbgHQITy (ORCPT ); Mon, 17 Aug 2020 04:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbgHQITq (ORCPT ); Mon, 17 Aug 2020 04:19: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 2D7F5C061388; Mon, 17 Aug 2020 01:19:46 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id y206so7845256pfb.10; Mon, 17 Aug 2020 01:19: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=C5F0nnOTh5Z2C3fK8ewqMRIq3Z/HzN1bhDJR1BeVHS8=; b=Zv4j3ZnQEwlXKTmQMcr9yGw2Wg9syVGPoOFVEo88aRFfTusau3D/jPmgBPE/UoEk7W 6hVOMVLjy3IjuqSmajCe4ICoCGHzdbeVf7neS0HcR2YvB15zP0WtFq0EwGdBnKlAumKK pm4gyCCSGQB/BieYkhoO84f8+D2FscxxVCgUc6aTVRfHCkccWQAFyh99LK4NhB4I+ZQy 5lM9ffV8CDoqkPhd7hdzLsDaMzhLwQU/QxUNq87pEqaXMMxpEEWlxDhCCQluK5XBiIpg 8oLWvIoJkd8CK2/7WfDRfvxHktayMAXa1HOW8Vg+seOGKtokTogysyzUUm3IyE76OF9f RuSw== 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=C5F0nnOTh5Z2C3fK8ewqMRIq3Z/HzN1bhDJR1BeVHS8=; b=nVAT/IAd1j6VBhyFsjUs+U7NXWrhfoaKanZfvtf0MMdDokIUxntqy0fKbqTTUg/uMG 8UNyfgeVw6OiJC4pDxcQiP/Oz/dnG/Quk8gow+cU0qrm6Ac5YcLitoXUWCOwdedblnJM +48cNdvONcNs0cBxr23DzIk5g4OVS+p3t93H9MgHhPDxp87XSB+BF3C3KTvkHWO1Ajne E9HUKGDRiIUH5n3pItIox1Mr0s/DCvwPRHWZyW2lTxkWNXgFV9d9XIS/gU+B5cN/EJVY UGS5Dp+I/4KyaVmVi8D/K9Fn5uqq5uX59eny4qBDOV3Zzav+1p/Ch8V6doxvR9rS2cZQ dJBg== X-Gm-Message-State: AOAM531zL/JBK+DC1NhtwPd7uHXRYSGce1DxhD7lPIfHy1A8rG08Vrpz P2wJkrciaLUfjtlOKHvLxSE= X-Google-Smtp-Source: ABdhPJwNz0WCRvYD0EzUq3bpg+5UrV7v8gJCanPc+Hu+vgv/oJ4AIpPuVHmHeKtfyGccvGps8amOKg== X-Received: by 2002:a63:fc4b:: with SMTP id r11mr9016761pgk.342.1597652385686; Mon, 17 Aug 2020 01:19:45 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:19:45 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 12/35] dma: k3dma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:03 +0530 Message-Id: <20200817081726.20213-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/k3dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index c5c1aa0dcaed..f609a84c493c 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -297,9 +297,9 @@ static int k3_dma_start_txd(struct k3_dma_chan *c) return -EAGAIN; } -static void k3_dma_tasklet(unsigned long arg) +static void k3_dma_tasklet(struct tasklet_struct *t) { - struct k3_dma_dev *d = (struct k3_dma_dev *)arg; + struct k3_dma_dev *d = from_tasklet(d, t, task); struct k3_dma_phy *p; struct k3_dma_chan *c, *cn; unsigned pch, pch_alloc = 0; @@ -962,7 +962,7 @@ static int k3_dma_probe(struct platform_device *op) spin_lock_init(&d->lock); INIT_LIST_HEAD(&d->chan_pending); - tasklet_init(&d->task, k3_dma_tasklet, (unsigned long)d); + tasklet_setup(&d->task, k3_dma_tasklet); platform_set_drvdata(op, d); dev_info(&op->dev, "initialized\n"); From patchwork Mon Aug 17 08:17: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: 262476 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 22C5AC433DF for ; Mon, 17 Aug 2020 08:20:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0035D20658 for ; Mon, 17 Aug 2020 08:20:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GLX/Udd5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbgHQIU0 (ORCPT ); Mon, 17 Aug 2020 04:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbgHQIUU (ORCPT ); Mon, 17 Aug 2020 04:20:20 -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 BDF6EC061388; Mon, 17 Aug 2020 01:20:20 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id y6so7139646plt.3; Mon, 17 Aug 2020 01:20: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=Ciey4QNzrHRDVKJ8tzpjEmlmjYecYc8dBp9iK+FHt5M=; b=GLX/Udd5tRebzj17DAsk32nKkuKq6qYgYAA8Ky5wQ5P4cQogSbBbaFIMyGh8Y86VZt wYUU5DgcowgC3uxy73fZRdoZ5KZmLb9uHoM94LbDz7oyNcaenDC5HJl0iStCi8eGMy3E wjthrsKSMZrbEyoXtZyUHaUFFixSuIJ+FpgUUDl31tUNcVYv/LsO4SbO/RWiDQPREHNb zp9rJGwc2w2GrxZ3qcn8QZyrIgYK+TIXdW+2qfHAjnqswD00sMvZQLa5jLG5Wt5sQz27 7v1L8ZouQY+TtruCA3udb7q5lmoqhJjGatDH1tPOIr9cVOnfXykv8lNvKhiyMhUHl0E2 8Gag== 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=Ciey4QNzrHRDVKJ8tzpjEmlmjYecYc8dBp9iK+FHt5M=; b=RCBl7/6bZ+MFmNE0zZ8mI5D8AkNug7b255/RBgd546zyYYjWBzrdLKdqhFt4XzG7Sw tnlqTjo1SCZHg77STlSg63tZHn3+WiQIqiCGK01etMWhvJWgfkUPzGmcTbco8OtZ0NbE oxLJOF+K4dfuRuCkDVcfGKcaaGaWcGJTN9x+A2t38M8kfE+oWRQwYyB2JFu3G6EMPRXi kaJ7TxJHCOY6V4DEG56q5FqqgrBOb3Cp14/RVEnxKjh5+OOA9Zc0UCBb1pO6kf8wKx4D 2/3mTS3mBjIFeUueUwBsNf2lXMh9l5NVxF5QdJYa4d014MiVhx0akDGZ08ztrq0TiMur 6l2Q== X-Gm-Message-State: AOAM533Tkk2sFZ9+HKJN/HCn/otKcxW1dbUX2YOg1vGNBMCGbmbw7OVK GhrkxVNCqTBX9j8Y0sTcUO0= X-Google-Smtp-Source: ABdhPJz0F2US9fqARZfMJyfWp/s0XGl+JzpTQcpPKUV44N0W4/T09Rn8XRozs4MxA4z0xakNHtFzDw== X-Received: by 2002:a17:90b:2092:: with SMTP id hb18mr12054250pjb.118.1597652420174; Mon, 17 Aug 2020 01:20:20 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:20:19 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 15/35] dma: mpc512x: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:06 +0530 Message-Id: <20200817081726.20213-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/mpc512x_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index dc2cae7bcf69..c1a69149c8bf 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c @@ -414,9 +414,9 @@ static void mpc_dma_process_completed(struct mpc_dma *mdma) } /* DMA Tasklet */ -static void mpc_dma_tasklet(unsigned long data) +static void mpc_dma_tasklet(struct tasklet_struct *t) { - struct mpc_dma *mdma = (void *)data; + struct mpc_dma *mdma = from_tasklet(mdma, t, tasklet); unsigned long flags; uint es; @@ -1009,7 +1009,7 @@ static int mpc_dma_probe(struct platform_device *op) list_add_tail(&mchan->chan.device_node, &dma->channels); } - tasklet_init(&mdma->tasklet, mpc_dma_tasklet, (unsigned long)mdma); + tasklet_setup(&mdma->tasklet, mpc_dma_tasklet); /* * Configure DMA Engine: From patchwork Mon Aug 17 08:17: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: 262475 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 67198C433E3 for ; Mon, 17 Aug 2020 08:20:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4139E20658 for ; Mon, 17 Aug 2020 08:20:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N6tTDOge" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbgHQIUm (ORCPT ); Mon, 17 Aug 2020 04:20:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbgHQIUj (ORCPT ); Mon, 17 Aug 2020 04:20:39 -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 A9F46C061388; Mon, 17 Aug 2020 01:20:39 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id u128so7864829pfb.6; Mon, 17 Aug 2020 01:20: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=EzH+Sxo0+kwwV/JFv4Jtew4uUPj7pfAWvGnBJqZX2kA=; b=N6tTDOge5tw8M9NkByFSkZhki08OpnX3cup9whr2OMRwTNmIRwnuxH500ufS6O6oYS 9FwpkqCZmeIIAgtaJ1Po0e7eVnFwKT04tK34TuAMkx9yH6h1dvT117uPFsIWWPThMxiP HKnxvP/bZCTY5ufO77byooN31q+rQ+5XdnI7EQ13QfikscWEvjP1FEsd4KmH1Mm2gIZA Bft6yyJObH0zEcNyrbgq8c5WQKWK6LBXQeDLKi5gSODm5B1wfSlDPsvT0o84CfMWqFYL v27valKSh6+yD8503cTOqT4+5Gk24FNFTz6tNnXObVLwcejLDdkz9xxUMbDiCIG0p+O6 Fr7g== 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=EzH+Sxo0+kwwV/JFv4Jtew4uUPj7pfAWvGnBJqZX2kA=; b=qWn7gfS0fsPk4fIUzt9hPLKFI9tnZZAfhHrJBz2EheYmv608LYIBZYWHZ7h40oMN8v i1O3ueX9fxtzNiNQ3u6GKwPkK54aaDjdCDurvC3e+ThzsIcL3HuYTJFL/nink63TXaoI vSUpcR+JdDcgITG7mPcwqrxKz6DQD9aJ6gXMhZdTdaDiGUIO9w9Rpp/tvzmh9YniKY2G hEe0NH8RdWp3KLguPffXdwlSCOCdFZzAE4hSIkgZJsbrjjr5nrzL8kp38xghlsH57KjA hCimA6OSYyQOQXCaWJfC9p7N8Jklo4vCnzr5QrVQ2Vv2tP7xlrq8BGEqQ4JORn9F3HLE VMkQ== X-Gm-Message-State: AOAM5303hy23fI9IZfGvERv5XSbuDv6lIMZm+KhKXlmvdPnJI7Fyg3jR +Pj6Sj9mPNE5IGZEn+IYLvQ= X-Google-Smtp-Source: ABdhPJyEDiiZcn2swD/FpmaQCjF3kpL10RdAb85gFToheYdre6qGu2gKaqG6UhP4EQqqRrv6fRYNDA== X-Received: by 2002:aa7:9f8a:: with SMTP id z10mr10836424pfr.176.1597652439296; Mon, 17 Aug 2020 01:20:39 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:20:38 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 17/35] dma: mxs-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:08 +0530 Message-Id: <20200817081726.20213-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/mxs-dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 3039bba0e4d5..6f296a137543 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -320,9 +320,9 @@ static dma_cookie_t mxs_dma_tx_submit(struct dma_async_tx_descriptor *tx) return dma_cookie_assign(tx); } -static void mxs_dma_tasklet(unsigned long data) +static void mxs_dma_tasklet(struct tasklet_struct *t) { - struct mxs_dma_chan *mxs_chan = (struct mxs_dma_chan *) data; + struct mxs_dma_chan *mxs_chan = from_tasklet(mxs_chan, t, tasklet); dmaengine_desc_get_callback_invoke(&mxs_chan->desc, NULL); } @@ -812,8 +812,7 @@ static int __init mxs_dma_probe(struct platform_device *pdev) mxs_chan->chan.device = &mxs_dma->dma_device; dma_cookie_init(&mxs_chan->chan); - tasklet_init(&mxs_chan->tasklet, mxs_dma_tasklet, - (unsigned long) mxs_chan); + tasklet_setup(&mxs_chan->tasklet, mxs_dma_tasklet); /* Add the channel to mxs_chan list */ From patchwork Mon Aug 17 08:17: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: 262473 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 00641C433E1 for ; Mon, 17 Aug 2020 08:21:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CCD0220658 for ; Mon, 17 Aug 2020 08:21:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iMJgXHft" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbgHQIVO (ORCPT ); Mon, 17 Aug 2020 04:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgHQIVH (ORCPT ); Mon, 17 Aug 2020 04:21:07 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D5FBC061388; Mon, 17 Aug 2020 01:21:07 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id v15so7758514pgh.6; Mon, 17 Aug 2020 01:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2u/40339c50ypFs7M618Prb7hCf6hscGSknPACX7w9w=; b=iMJgXHftMkSl4iNyizZ354moFN14rzQi5QK+tsbFIeiCkQVJgOcb4cFOkDwqwHn8p6 RW9U+l9OAhcSuILZYFOEuHFOfiufeK7Muf76t7X5rfoJNJNRY9aI7JyxEmfsE4MKJzI3 oKpRg2L9JOBnMg7DKsTu7pgeUWYEUQsofw1NXS6KesdoB2kjZfjXKQdqb9de6VUvzjj4 fSUgAq/rbcI1IEyjk9wHzfEFF8akM/JLknmS5KMWJOYvYsn5zf/xIPvEZgLADDg6rXAo 6QgNrVRH6d+Qs05Jy11I6QzJS2SlA5B/7I4XrIw3CArYIMUWUYvQ4ZPSbabLMjncdi+6 6EVg== 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=2u/40339c50ypFs7M618Prb7hCf6hscGSknPACX7w9w=; b=VfBhAf7OxOOpKOBLruNBZyE21mahhO1jlyiUE5bFRswJeRcn1WjdwPjp5suFGFHNKT XzGC/8pGPGZPL5RsHE4uihzf8ss9ig8b6AcHM3WC5woAnjGsVeGiyVxqEhFdLQUvLOUJ RjsAtBqPU0zEu/AvGN8Tgmm0b0w5arJlOftWTzXhhsIl/qHMiRI8Y3vt3qnwivp5pSuT uUlfhABYKSACdfQJG8kCFgZ5+OMHTbw330hvjtn4/mnrnCLQrXgsrnIn/vMPMQSnfr2o kyaE+4bOxBPYy2bMMJdR77cgsMGk2HXIkaXXH4/krDm5T+mH+uqZ1Ft6fWxRjsIqavG7 neMg== X-Gm-Message-State: AOAM533OeIKkzPCcrrF7p/FKK0nEl13dL+QKL3M624do9hYBrPWuYSHR 268wxlvPqHPwrSRBp4aKWl8= X-Google-Smtp-Source: ABdhPJwsXsOO//FysPu6rGzdVl2xfR2M5Qe2SU66dgM2Vu9dNZn8EtINnA+NMrA0VuD5J6Ua73aLqQ== X-Received: by 2002:a05:6a00:91:: with SMTP id c17mr10267047pfj.151.1597652466999; Mon, 17 Aug 2020 01:21:06 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:21:06 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 20/35] dma: pl330: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:11 +0530 Message-Id: <20200817081726.20213-21-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/pl330.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 2c508ee672b9..5599d350ec79 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1580,9 +1580,9 @@ static void dma_pl330_rqcb(struct dma_pl330_desc *desc, enum pl330_op_err err) tasklet_schedule(&pch->task); } -static void pl330_dotask(unsigned long data) +static void pl330_dotask(struct tasklet_struct *t) { - struct pl330_dmac *pl330 = (struct pl330_dmac *) data; + struct pl330_dmac *pl330 = from_tasklet(pl330, t, tasks); unsigned long flags; int i; @@ -1986,7 +1986,7 @@ static int pl330_add(struct pl330_dmac *pl330) return ret; } - tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330); + tasklet_setup(&pl330->tasks, pl330_dotask); pl330->state = INIT; @@ -2069,9 +2069,9 @@ static inline void fill_queue(struct dma_pl330_chan *pch) } } -static void pl330_tasklet(unsigned long data) +static void pl330_tasklet(struct tasklet_struct *t) { - struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data; + struct dma_pl330_chan *pch = from_tasklet(pch, t, task); struct dma_pl330_desc *desc, *_dt; unsigned long flags; bool power_down = false; @@ -2179,7 +2179,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan) return -ENOMEM; } - tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch); + tasklet_setup(&pch->task, pl330_tasklet); spin_unlock_irqrestore(&pl330->lock, flags); From patchwork Mon Aug 17 08:17: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: 262472 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 BDAAEC433DF for ; Mon, 17 Aug 2020 08:21:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9725B20658 for ; Mon, 17 Aug 2020 08:21:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rqX/O6h8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728207AbgHQIVe (ORCPT ); Mon, 17 Aug 2020 04:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbgHQIV0 (ORCPT ); Mon, 17 Aug 2020 04:21:26 -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 2F550C061388; Mon, 17 Aug 2020 01:21:26 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id x25so7873254pff.4; Mon, 17 Aug 2020 01:21:26 -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=dvX6FlWRqibGpy5qHiY9CD/HZDa4GdoItaD6hrOhnJQ=; b=rqX/O6h8qAd/dpn+JctX6LgY5uudHkjGG9VkbS3cy03GAhbVo2lbpKtH9yM8eLV/RQ E11vvSqgQML8bl4nCCgMOlthyv5Mr/UGHYPY+DruP2yrfpAnN77AvSIZutoswYCQWzjv PR0QHfu1kIatmrl0v2HUdpUvZq2eEouj7FTMKrEK7b06anDW96TsSwQsbyASLjF9iz5T Az86MZWloCjWnB8VRhgNVFUmbvFs/XodWt9vkPZMuRx/BPwUf80emnpwsmAl/Mg4G/zN Uhob0gmb+pwKhovQtl+zK6hasDdGQ1+HFzr/J8BRhasUJlc/M02cHMvSH4Ev2rP9hdu/ 3CYA== 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=dvX6FlWRqibGpy5qHiY9CD/HZDa4GdoItaD6hrOhnJQ=; b=oHMtNhNIrq+iq0T2y+QbkV/1RA3f/knB1htbuncXhMgpTMvZ9eiBWfF1L9vMNm4p5+ nWyZBSrvEueXKL0SG0h0W+YPDRkinm9IL9MrsL8ZTbCvqKAopfAzA+RTxW0YVCbLcXbk 5vX1Jfmr1LVCfLFTGcmCwKfwaPMng8qhLxBC9cURWwmhOjUmVCs9sJ2TirSFDwXCaMP9 MN9Arit+nXKLjUDVE3jIIqH3LvSYWyXepP2SXl2Q5Ys7GRB91FacfeS52gFXu6npnAkb G9PGtHgNiben8kRtrcoHc7slhKApT1bXpz6bNVkfbj94p+7w4IhkafFEOtu4vyojolCf GKWg== X-Gm-Message-State: AOAM531YQkP6tjVFDRP2EGpyYVcrLW9PbibDo0+/izWA8cRxSAsDlC7s fngK7oBsIQHpYT1HhkqGTJs= X-Google-Smtp-Source: ABdhPJyzYdcL9n1eXaLOXLnH3937UeGl4OMGwZ1XGWANR3WtM8FkSL68n8dAz52LrCPevc3ZARv1fA== X-Received: by 2002:a63:ed07:: with SMTP id d7mr8900878pgi.414.1597652485719; Mon, 17 Aug 2020 01:21:25 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:21:25 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 22/35] dma: qcom: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:13 +0530 Message-Id: <20200817081726.20213-23-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/qcom/bam_dma.c | 6 +++--- drivers/dma/qcom/hidma.c | 6 +++--- drivers/dma/qcom/hidma_ll.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 5a08dd0d3388..8ba7a8f089c8 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1075,9 +1075,9 @@ static void bam_start_dma(struct bam_chan *bchan) * * Sets up next DMA operation and then processes all completed transactions */ -static void dma_tasklet(unsigned long data) +static void dma_tasklet(struct tasklet_struct *t) { - struct bam_device *bdev = (struct bam_device *)data; + struct bam_device *bdev = from_tasklet(bdev, t, task); struct bam_chan *bchan; unsigned long flags; unsigned int i; @@ -1293,7 +1293,7 @@ static int bam_dma_probe(struct platform_device *pdev) if (ret) goto err_disable_clk; - tasklet_init(&bdev->task, dma_tasklet, (unsigned long)bdev); + tasklet_setup(&bdev->task, dma_tasklet); bdev->channels = devm_kcalloc(bdev->dev, bdev->num_channels, sizeof(*bdev->channels), GFP_KERNEL); diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 0a6d3ea08c78..6c0f9eb8ecc6 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -224,9 +224,9 @@ static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig) return 0; } -static void hidma_issue_task(unsigned long arg) +static void hidma_issue_task(struct tasklet_struct *t) { - struct hidma_dev *dmadev = (struct hidma_dev *)arg; + struct hidma_dev *dmadev = from_tasklet(dmadev, t, task); pm_runtime_get_sync(dmadev->ddev.dev); hidma_ll_start(dmadev->lldev); @@ -885,7 +885,7 @@ static int hidma_probe(struct platform_device *pdev) goto uninit; dmadev->irq = chirq; - tasklet_init(&dmadev->task, hidma_issue_task, (unsigned long)dmadev); + tasklet_setup(&dmadev->task, hidma_issue_task); hidma_debug_init(dmadev); hidma_sysfs_init(dmadev); dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n"); diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c index bb4471e84e48..53244e0e34a3 100644 --- a/drivers/dma/qcom/hidma_ll.c +++ b/drivers/dma/qcom/hidma_ll.c @@ -173,9 +173,9 @@ int hidma_ll_request(struct hidma_lldev *lldev, u32 sig, const char *dev_name, /* * Multiple TREs may be queued and waiting in the pending queue. */ -static void hidma_ll_tre_complete(unsigned long arg) +static void hidma_ll_tre_complete(struct tasklet_struct *t) { - struct hidma_lldev *lldev = (struct hidma_lldev *)arg; + struct hidma_lldev *lldev = from_tasklet(lldev, t, task); struct hidma_tre *tre; while (kfifo_out(&lldev->handoff_fifo, &tre, 1)) { @@ -792,7 +792,7 @@ struct hidma_lldev *hidma_ll_init(struct device *dev, u32 nr_tres, return NULL; spin_lock_init(&lldev->lock); - tasklet_init(&lldev->task, hidma_ll_tre_complete, (unsigned long)lldev); + tasklet_setup(&lldev->task, hidma_ll_tre_complete); lldev->initialized = 1; writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG); return lldev; From patchwork Mon Aug 17 08:17:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262471 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 00FDFC433E1 for ; Mon, 17 Aug 2020 08:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C388120658 for ; Mon, 17 Aug 2020 08:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pkHoMNTn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728245AbgHQIVx (ORCPT ); Mon, 17 Aug 2020 04:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728226AbgHQIVp (ORCPT ); Mon, 17 Aug 2020 04:21:45 -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 EF117C061388; Mon, 17 Aug 2020 01:21:44 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k13so7116417plk.13; Mon, 17 Aug 2020 01:21: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=uH6lh/wm+k3oIhHiZx2SeVnKtHemKJugMwQhBtWwEsY=; b=pkHoMNTnBvBUY5wBnHq75aCKuxAgQAtFGnNZutY84jkzUGpyGZ6d/Lyt+P9feDGCmy oi5lOvVO7mwSRWBMI975qjlEqiWyRj9sLI9IKUYbo5xLFi2aEMIgvbIPHMNpl8I+S56X BDvNmlJ4DNOKPp2eTtWU1pi1nr9KPOFq5KQuJ4DW5r0Rz4og/KIwz3sgnQe5PVxdOedv BUTsFgaLQY4W7NY17bprObegQF47stPp4ILtIK9vzrJjv58M+JSJjtbLV01fLk+i/0Ff ZXGZ2N9nBxreCbE0WDGBaJrhwsSYKbjj/dkdz/u7S3PIm3OE4MnmO01ap+pIF614uhqQ GOgg== 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=uH6lh/wm+k3oIhHiZx2SeVnKtHemKJugMwQhBtWwEsY=; b=WszQ1NocWyOngqMdPgwoAE2VfyOMLL7TGgDPLgHFnru6MQJiKPtXM6AxYUdhBoNTRf zUND0KFbV5ZneWRVxmaQDMVNpRRXnMMPGhzx5Bl7UXzg0Az2+8OU1NCsInaiCGNVzFER dERdSTtzUHwGPzSh2zvx7WVcvf4RFWLoP9jujiFUcVBJotcwuZXfDTQSR/gGM1lnShb1 ppjvB1vjCERsyGNmI80+tRA78XiT87sD5hW+7oiuUVQh2jdA2cFkju87mV5Mc8jPZkqc XTUzSMOqbQKY9QqXltinRfUGYKRMEcc0pAICOADK/tOVWXyfkKUsS1e2/+EOTAXNH8NS r3kA== X-Gm-Message-State: AOAM532bZFT7quhBmvfM3LcFW55wOiHWd2vrkkJIIncko/wlZy3P/6OX cdBmQbhJwPAFisgJeYIHCIc= X-Google-Smtp-Source: ABdhPJyAiC+gLop7N7yDKbnn4HN8Ga+G44y9G0wc3Fi3VEqVxz0aWSYAszxNuQ4brCXqCbddv6Jlvw== X-Received: by 2002:a17:902:a412:: with SMTP id p18mr10268881plq.3.1597652504569; Mon, 17 Aug 2020 01:21:44 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:21:44 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 24/35] dma: sirf-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:15 +0530 Message-Id: <20200817081726.20213-25-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/sirf-dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 30064689d67f..a5c2843384fd 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -393,9 +393,9 @@ static void sirfsoc_dma_process_completed(struct sirfsoc_dma *sdma) } /* DMA Tasklet */ -static void sirfsoc_dma_tasklet(unsigned long data) +static void sirfsoc_dma_tasklet(struct tasklet_struct *t) { - struct sirfsoc_dma *sdma = (void *)data; + struct sirfsoc_dma *sdma = from_tasklet(sdma, t, tasklet); sirfsoc_dma_process_completed(sdma); } @@ -938,7 +938,7 @@ static int sirfsoc_dma_probe(struct platform_device *op) list_add_tail(&schan->chan.device_node, &dma->channels); } - tasklet_init(&sdma->tasklet, sirfsoc_dma_tasklet, (unsigned long)sdma); + tasklet_setup(&sdma->tasklet, sirfsoc_dma_tasklet); /* Register DMA engine */ dev_set_drvdata(dev, sdma); From patchwork Mon Aug 17 08:17:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262470 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 73829C433E1 for ; Mon, 17 Aug 2020 08:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D6CF20658 for ; Mon, 17 Aug 2020 08:22:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i0K2xoe6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbgHQIWM (ORCPT ); Mon, 17 Aug 2020 04:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727937AbgHQIWD (ORCPT ); Mon, 17 Aug 2020 04:22:03 -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 AB053C061388; Mon, 17 Aug 2020 01:22:03 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id bh1so7122823plb.12; Mon, 17 Aug 2020 01:22:03 -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=ScSchtGkwbuHnxQx7iSsqRyAzIGJLK/PgYB9DNEv3wQ=; b=i0K2xoe6D97BPwpwRK9Bh8AmH4RkiEpDe127j8GQnyPUIu90NxEYUKf2ZHVd5KtzTL NF3Y2fB1vWs/vlujrnGz5RsfEq0VAA0E6HuZJBVgo4f+4aW5ElwqdkdPxwRLhVQ0ZGnV 0m+tA+pHZOvQLIHsUpEFQQPETdoeGVun3IWoKQDFb5d9T+HEpOGZqwPSXibEdWt9WIfb 8sY2pHRmZqtyU2+vBXTmpjtHjkaep4il3F0TSQJrSsrQmxt56VjhWI0bUIj02LHAv8LG l4MvZEBNifnlR6R76r/NT0SEoXYAfFf68rs+ZPOkXWlMhXG3sd6ixpORdSvaiGqIB99e V7aA== 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=ScSchtGkwbuHnxQx7iSsqRyAzIGJLK/PgYB9DNEv3wQ=; b=tfQcW3a9ieIjPZvu+gj61PYWp1hm1pmcSx5tMlpRbzdppPxg7bzw66nm1T6ALlc6bk eGSYlB3gpzHw6XFLhQxHBcSZoY4CW5oyWSGFn6QUNU7n4/S/CmzcDJ+gGrbRqu5cCqer c8RWhyJCo/GQosgGdG/Gjg0VCOThDxJIU7wNzCDjFVgDo0D+RE5NFOaVtiSZ8z2yBWmN 73htKg6f2CO++sS0MZBPICzmLzHMvwITrpwrsLFYfiL6lK/nAjEXG1VfadPi+h0XBa2+ qgUWVt3cO/YLPQneGM5FppkPzofgHsO4GUcuIa/Os/uYdxDSefEXxIYjrZOF3K786tfm fOWg== X-Gm-Message-State: AOAM53196+Dk8tuTBamLEKgoWlm7TbaFaUaZfHBXqhTDIzQpXC56MxQi 7BdyvAcONyfYJwEgfK+ztHs= X-Google-Smtp-Source: ABdhPJyd9hITb+tghZ3TwtqGp09qIUQSVnYpI+TEsezUWXwAhph40aYGEYGOpiAwvWfVEY1OHJX9zA== X-Received: by 2002:a17:90b:1493:: with SMTP id js19mr10563329pjb.223.1597652523277; Mon, 17 Aug 2020 01:22:03 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:22:02 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 26/35] dma: sun6i: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:17 +0530 Message-Id: <20200817081726.20213-27-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/sun6i-dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 06cd7f867f7c..f5f9c86c50bc 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -467,9 +467,9 @@ static int sun6i_dma_start_desc(struct sun6i_vchan *vchan) return 0; } -static void sun6i_dma_tasklet(unsigned long data) +static void sun6i_dma_tasklet(struct tasklet_struct *t) { - struct sun6i_dma_dev *sdev = (struct sun6i_dma_dev *)data; + struct sun6i_dma_dev *sdev = from_tasklet(sdev, t, task); struct sun6i_vchan *vchan; struct sun6i_pchan *pchan; unsigned int pchan_alloc = 0; @@ -1343,7 +1343,7 @@ static int sun6i_dma_probe(struct platform_device *pdev) if (!sdc->vchans) return -ENOMEM; - tasklet_init(&sdc->task, sun6i_dma_tasklet, (unsigned long)sdc); + tasklet_setup(&sdc->task, sun6i_dma_tasklet); for (i = 0; i < sdc->num_pchans; i++) { struct sun6i_pchan *pchan = &sdc->pchans[i]; From patchwork Mon Aug 17 08:17:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262469 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 7A1A4C433DF for ; Mon, 17 Aug 2020 08:22:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5909120658 for ; Mon, 17 Aug 2020 08:22:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tYWB4U4C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbgHQIWi (ORCPT ); Mon, 17 Aug 2020 04:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728284AbgHQIWW (ORCPT ); Mon, 17 Aug 2020 04:22:22 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CAA8C061388; Mon, 17 Aug 2020 01:22:22 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id 128so7761134pgd.5; Mon, 17 Aug 2020 01:22:22 -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=MNsn+KIrzPWCkkACLUaTpczD1K+bZF0NZOkHpu9iBlw=; b=tYWB4U4C3lwkJ7KzspGsY+JnaAbBB4RFJjtsDwVaVyquMo6llfLpsyP9HNjqx1vAIN tNns+ubKbtrgwB4oggj7I3Zr83JcvEl+SgLdMcnPMX23O9iX5y4bFVvsMkM84xtU8b7/ +Eh/zZcvnTl7hVw4au6Uev5ggpg/tW4J7GN+Uv2rTa2t1u4AqO7pManPuCNVvB9LU3CW xn3yfjrJR27u4ykM7g7HngBfdPPCgD0Wdpw9gMFztIGBvAlNoqEESuj/91CBWAIgmrhD BUcxlVmTEeAchaVIIZw8ber5GPLfmV+DsiDN1Bc37D+zA8Gm56gHJ58cUvd+8mo5wY81 yhlw== 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=MNsn+KIrzPWCkkACLUaTpczD1K+bZF0NZOkHpu9iBlw=; b=KAlLfcexm+UcEMNVZz5L18G2Ofa6fNJfuTu88CMF5UV+QhdI7TbrNAIpZYmjXryg9D qubEzXaGPWyxFCuOlF+9BswpIiOua9dQZ4IwifhBDIOOh4ghgjhFNSMsw0UGSHuchAIz UPYBfulTZTUnHwKOYGr8Y6NMwTuzPX6LMThP+sy7WR1+EmvYfU3SKfTO2Vdnu+DiBpzy oeg3fZl34UtWuH1DghxN7oDJ9BooDFejHLj7mVhrHpRgbQxZ1hk4RHsZn/uEi5VxWuW6 WDxDwS1nPqKZEXPmD5H2OsWZPiDs7piFlYCGCdNjlzt9o/a6WAmlRYsTetbjPsVBOG6f UIsw== X-Gm-Message-State: AOAM533nO1xT+Nb7ApblnIDe/QHOrsjGxbK3rBQ03pKY5D0wh7GahNxV YpAbHAycnYCF2CtclaGGTXc= X-Google-Smtp-Source: ABdhPJwip8+ZBfBIF2rZWZD4jUDBwY6tGIUOnI8p5i+Ag2NB9ZORtoqizmkvtq5iIYQRR7kPC5mbcw== X-Received: by 2002:a62:38cb:: with SMTP id f194mr10567474pfa.243.1597652541981; Mon, 17 Aug 2020 01:22:21 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:22:21 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 28/35] dma: timb_dma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:19 +0530 Message-Id: <20200817081726.20213-29-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/timb_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 68e48bf54d78..3f524be69efb 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c @@ -563,9 +563,9 @@ static int td_terminate_all(struct dma_chan *chan) return 0; } -static void td_tasklet(unsigned long data) +static void td_tasklet(struct tasklet_struct *t) { - struct timb_dma *td = (struct timb_dma *)data; + struct timb_dma *td = from_tasklet(td, t, tasklet); u32 isr; u32 ipr; u32 ier; @@ -658,7 +658,7 @@ static int td_probe(struct platform_device *pdev) iowrite32(0x0, td->membase + TIMBDMA_IER); iowrite32(0xFFFFFFFF, td->membase + TIMBDMA_ISR); - tasklet_init(&td->tasklet, td_tasklet, (unsigned long)td); + tasklet_setup(&td->tasklet, td_tasklet); err = request_irq(irq, td_irq, IRQF_SHARED, DRIVER_NAME, td); if (err) { From patchwork Mon Aug 17 08:17:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262468 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 9862DC433E3 for ; Mon, 17 Aug 2020 08:22:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7769920758 for ; Mon, 17 Aug 2020 08:22:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S2U5GXmo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728349AbgHQIWu (ORCPT ); Mon, 17 Aug 2020 04:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbgHQIWl (ORCPT ); Mon, 17 Aug 2020 04:22:41 -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 A781FC061388; Mon, 17 Aug 2020 01:22:41 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id l60so7449626pjb.3; Mon, 17 Aug 2020 01:22:41 -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=qnSx2Xs+5F55vipJ1GlRPOngMDb///4cheR/5/8gimc=; b=S2U5GXmo7ck1ZKahunFhTHxDXIlZOzEOfz2Ldo3lZV7wXaGbijFjmYJ6y9GPe7JEsb Zn0a9L4YvyzqdxmEdh9mSRBc7jpS+mRrU1u1MIJVwQLetIacicrbdTW87QgABnCSr4TR 9+WfoJ7On1pmQAwDIGbyc5OKqz+7QW1J46cDvWGHmvKts/B91ywfzpGgmAM7C1gBjgNh sBwomzHfku5xWTvFJdYd8tXQQ5ErKNGJFOxhZ401NpR/uznNn/kfbHAabowljDvIo426 jFeeopQuofHpn5V6pqn99ZwpbE4Cs7WtzeyZm8YPRzvgxsRXtBoKAJtFxKybqvNmw93E kH6Q== 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=qnSx2Xs+5F55vipJ1GlRPOngMDb///4cheR/5/8gimc=; b=SYUZlkG9UbPdJ3dYJ7pfn3Bwh/MligjpyiS/VrGjDjtQa2LT5YlJEoFgGX1LlR31lq UepK3lxkj4Q1zd/tq7dJ09P85z83PaZ5liU6BQzBhYUoGzscunQEpTm6qTUg/qmTOyYx lxrjXRgqPpOmazYXebFj10fzmH5oBdSA6pv9n7OihtWA/J9InUx+SrpjghB6mCHJ8Oq8 PLsX8aNvXizrzZTLxQoa//Ye7B2LUP8ULEcE7fZXV0C0SXKzDzRomlvAKIkRF1cep1B1 xMspoar9pWlhLvJyrn1qvFuK1XJeCiJVtY7E9nLEBBV3aWnXT7+dTbDxOJhFonsO3+eZ lz1g== X-Gm-Message-State: AOAM532LAhtgIvgPh1NoKgkC8BglpL/kDdVeHhToZ85bPrlhT4jeR+Io oGQ0b3CMoyMKDknY7tBVcP0= X-Google-Smtp-Source: ABdhPJzg5CA1taulVojf7+8vPbJsAwASHRozrU6aj+DjWYr3Cf2FaYf6IONr7tFFIkdkCyLlL5Anow== X-Received: by 2002:a17:90b:2092:: with SMTP id hb18mr12059879pjb.118.1597652561292; Mon, 17 Aug 2020 01:22:41 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:22:40 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 30/35] dma: virt-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:21 +0530 Message-Id: <20200817081726.20213-31-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/virt-dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/virt-dma.c b/drivers/dma/virt-dma.c index 23e33a85f033..a6f4265be0c9 100644 --- a/drivers/dma/virt-dma.c +++ b/drivers/dma/virt-dma.c @@ -80,9 +80,9 @@ EXPORT_SYMBOL_GPL(vchan_find_desc); * This tasklet handles the completion of a DMA descriptor by * calling its callback and freeing it. */ -static void vchan_complete(unsigned long arg) +static void vchan_complete(struct tasklet_struct *t) { - struct virt_dma_chan *vc = (struct virt_dma_chan *)arg; + struct virt_dma_chan *vc = from_tasklet(vc, t, task); struct virt_dma_desc *vd, *_vd; struct dmaengine_desc_callback cb; LIST_HEAD(head); @@ -131,7 +131,7 @@ void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev) INIT_LIST_HEAD(&vc->desc_completed); INIT_LIST_HEAD(&vc->desc_terminated); - tasklet_init(&vc->task, vchan_complete, (unsigned long)vc); + tasklet_setup(&vc->task, vchan_complete); vc->chan.device = dmadev; list_add_tail(&vc->chan.device_node, &dmadev->channels); From patchwork Mon Aug 17 08:17:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262467 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 EFD09C433E3 for ; Mon, 17 Aug 2020 08:23:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE1CC20658 for ; Mon, 17 Aug 2020 08:23:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f59rLF9L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728352AbgHQIXF (ORCPT ); Mon, 17 Aug 2020 04:23:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgHQIXB (ORCPT ); Mon, 17 Aug 2020 04:23:01 -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 DF017C061388; Mon, 17 Aug 2020 01:23:00 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id g15so3234892plj.6; Mon, 17 Aug 2020 01:23: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=7u/2cva1X+qYdcICcawfSm0XBYmeJIpXUg7S7BH2D4c=; b=f59rLF9LjolBojqbq/4JZGmfTXfEB+L96JJR9sacgtiSRQCZmed2VTEnSkjAUt3iLB w/CU1vEzDqLYh6XIg2WSNADktWvdNBKn2HeP4voucqqQo6X5tBUAG1GWk0uHcS9Sk944 eppkXL7ASmU5QX23DnDbEarDozMgPpH5h5Pvonb551x/R0/i4389N8qyjrdQo1t5X9b/ 02CdnExPI4JZqLrGE5kfU9ufVBAByyKy5qyOu15io4OADxiiqJzyEza0y6eh4US5yfco QebJgojxUVzKtCua81hbXP/fyxvhvIGuJgcJgiUDqtLgzR2onZ7kvjwSlqeB2Gv2zetV s/zg== 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=7u/2cva1X+qYdcICcawfSm0XBYmeJIpXUg7S7BH2D4c=; b=Wq6v5FoR1LQ9GAy2DItSsr6zv5xqAjDDgcqZ9jBD7RArLy/BcPOZx8vBrpCYFaGAWH tNaW6xpsPf06ZikWMmDFb1+djTIx4c+0CZb3Ynd7byjN6DluXmUddzLNEBKI5QFD/u5R j5u26LorBbWKidRqii60ojg/yWW+zo33dkxHAbHRi84kqtkpGuOvwsYHeMAFikSKRY/D YwuzBQADZUxIgQSuWxO67uwekUGyjWD8dWiCevoDGKRaoDfNe96kRO7rKaA9gpsswOqU l4O6Lvp+u6RnuQCQ1AMZ0k8aD2EeAToDUOUAyd71mLXVQ+HX5LXJyJexvoclx9NVmTYm A9bg== X-Gm-Message-State: AOAM530VNF2Tj/KZBBafW7de2Q5NiRJEMOO9J97XRjD43SIyLn2U/INo GV+ZL4s6wvkxsyeP0FY0ElA= X-Google-Smtp-Source: ABdhPJwV6kPES4OsAR2RefOiq3Oe3pIFKfQA1x69JuKv8ue6o8uHXJFpGG1kbvkdTWOg1UoHvjLCpQ== X-Received: by 2002:a17:902:7c94:: with SMTP id y20mr3269952pll.309.1597652580480; Mon, 17 Aug 2020 01:23:00 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:23:00 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 32/35] dma: xilinx: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:23 +0530 Message-Id: <20200817081726.20213-33-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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/dma/xilinx/xilinx_dma.c | 7 +++---- drivers/dma/xilinx/zynqmp_dma.c | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 5429497d3560..48aa78785f4d 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1046,9 +1046,9 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan) * xilinx_dma_do_tasklet - Schedule completion tasklet * @data: Pointer to the Xilinx DMA channel structure */ -static void xilinx_dma_do_tasklet(unsigned long data) +static void xilinx_dma_do_tasklet(struct tasklet_struct *t) { - struct xilinx_dma_chan *chan = (struct xilinx_dma_chan *)data; + struct xilinx_dma_chan *chan = from_tasklet(chan, t, tasklet); xilinx_dma_chan_desc_cleanup(chan); } @@ -2866,8 +2866,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, } /* Initialize the tasklet */ - tasklet_init(&chan->tasklet, xilinx_dma_do_tasklet, - (unsigned long)chan); + tasklet_setup(&chan->tasklet, xilinx_dma_do_tasklet); /* * Initialize the DMA channel and add it to the DMA engine channels diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index ff253696d183..15b0f961fdf8 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -744,9 +744,9 @@ static irqreturn_t zynqmp_dma_irq_handler(int irq, void *data) * zynqmp_dma_do_tasklet - Schedule completion tasklet * @data: Pointer to the ZynqMP DMA channel structure */ -static void zynqmp_dma_do_tasklet(unsigned long data) +static void zynqmp_dma_do_tasklet(struct tasklet_struct *t) { - struct zynqmp_dma_chan *chan = (struct zynqmp_dma_chan *)data; + struct zynqmp_dma_chan *chan = from_tasklet(chan, t, tasklet); u32 count; unsigned long irqflags; @@ -908,7 +908,7 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev, chan->is_dmacoherent = of_property_read_bool(node, "dma-coherent"); zdev->chan = chan; - tasklet_init(&chan->tasklet, zynqmp_dma_do_tasklet, (ulong)chan); + tasklet_setup(&chan->tasklet, zynqmp_dma_do_tasklet); spin_lock_init(&chan->lock); INIT_LIST_HEAD(&chan->active_list); INIT_LIST_HEAD(&chan->pending_list); From patchwork Mon Aug 17 08:17:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262466 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 B3D83C433E3 for ; Mon, 17 Aug 2020 08:23:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93C8F2078D for ; Mon, 17 Aug 2020 08:23:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V6/1sUEY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728378AbgHQIX3 (ORCPT ); Mon, 17 Aug 2020 04:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727773AbgHQIXX (ORCPT ); Mon, 17 Aug 2020 04:23:23 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94145C061388; Mon, 17 Aug 2020 01:23:23 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 189so7125042pgg.13; Mon, 17 Aug 2020 01:23:23 -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=FY/yCtkR8zuQxnB1ct+rZA02HMp31w5fOwHETAQ8JTM=; b=V6/1sUEYrVGxUbYI5Mw0RPVY2l1DNf9AoBECR8rJv2FS5zpCQ4vRaGm3Fg3pj0EWMs ICd3A9AIogbTBN5xCLrvRE5XzkjMP/8069uNKQxhxmnjMaIZgycsLiFa7QsQpNyn7uoD JY/v3ZlyjbcMD7nOpsqwN7V9LxYfpo+e9jGCGGXB1yMrZPjCZFFH0A+wtxceSwYSPlYy gg5rNMQWHmTaRWDNmsmwqSFuWgvJzPFkDAVW0kFfXBKMw2Dbj0owdE6nJR6/N3abx/Tf fZiKxpIrNr0c1ECdQJgRN66qOVRjrqsxAOW5BbmpeuYHhLb1v99+tEvslnWKYePr7n/+ Z9ow== 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=FY/yCtkR8zuQxnB1ct+rZA02HMp31w5fOwHETAQ8JTM=; b=majmIT3KMTwcHNOjHzSbO78dHg8xnUWJ6/Yeb33d0gmmyU098iYZyqI2oXpcrxb/JD Aj+GtZDOW6wqWf8x5n2zyWxSoa6mpdHj9/nokDhV+K6L7/gIeZapoi96vxZqt0e4zlIV jchU2uEJT+87YiDPrCosKuUgcYzNs6CImScR6lkhuaJRz7gpz6pcjv69317gKRb9tc5a qdmKEFtapxgwWWRoasMuIgOVITCiTNwdiHbyKaq+NbgnYeffKqcWnE+VC4lOe4wd0RpS /JyBfjakaCKYTb/J05KNZZUs2tWepS+E4yvOjjSFBzAB+fYfORk4soTYAi2lpJA6mI6p kMug== X-Gm-Message-State: AOAM5335X1yIYv7rmYLjJNKzAeSoYz3vVvdQoZWu0+l6D4+Y5WxNytBz /TRJFBv+cVGyre7YBLWPoPs= X-Google-Smtp-Source: ABdhPJw+C+LHXjo2QNGKQK9LRY0Ze/kxlofPgLmIl9c1IL5T30PTyN87aaiVYIql2jWjMWTuoSRDQQ== X-Received: by 2002:aa7:96e5:: with SMTP id i5mr7573327pfq.108.1597652603195; Mon, 17 Aug 2020 01:23:23 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:23:22 -0700 (PDT) From: Allen Pais To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, baohua@kernel.org, mripard@kernel.org, wens@csie.org, thierry.reding@gmail.com, jonathanh@nvidia.com, michal.simek@xilinx.com, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Allen Pais Subject: [PATCH 34/35] dma: sf-pdma: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:25 +0530 Message-Id: <20200817081726.20213-35-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.com> References: <20200817081726.20213-1-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: Allen Pais --- drivers/dma/sf-pdma/sf-pdma.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c index 6e530dca6d9e..a2d91074bc6f 100644 --- a/drivers/dma/sf-pdma/sf-pdma.c +++ b/drivers/dma/sf-pdma/sf-pdma.c @@ -281,9 +281,9 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc) desc->in_use = false; } -static void sf_pdma_donebh_tasklet(unsigned long arg) +static void sf_pdma_donebh_tasklet(struct tasklet_struct *t) { - struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg; + struct sf_pdma_chan *chan = from_tasklet(chan, t, done_tasklet); struct sf_pdma_desc *desc = chan->desc; unsigned long flags; @@ -298,9 +298,9 @@ static void sf_pdma_donebh_tasklet(unsigned long arg) dmaengine_desc_get_callback_invoke(desc->async_tx, NULL); } -static void sf_pdma_errbh_tasklet(unsigned long arg) +static void sf_pdma_errbh_tasklet(struct tasklet_struct *t) { - struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg; + struct sf_pdma_chan *chan = from_tasklet(chan, t, err_tasklet); struct sf_pdma_desc *desc = chan->desc; unsigned long flags; @@ -476,10 +476,8 @@ static void sf_pdma_setup_chans(struct sf_pdma *pdma) writel(PDMA_CLEAR_CTRL, chan->regs.ctrl); - tasklet_init(&chan->done_tasklet, - sf_pdma_donebh_tasklet, (unsigned long)chan); - tasklet_init(&chan->err_tasklet, - sf_pdma_errbh_tasklet, (unsigned long)chan); + tasklet_setup(&chan->done_tasklet, sf_pdma_donebh_tasklet); + tasklet_setup(&chan->err_tasklet, sf_pdma_errbh_tasklet); } }