Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2132143pxa; Mon, 17 Aug 2020 01:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgEXBKRfV0K5uQRCzBbxX97awnbrf58iHiZr6n5kXdx+1IhKdnbpoXwhrSZjerUDLOVRmc X-Received: by 2002:a17:906:e115:: with SMTP id gj21mr13685995ejb.505.1597652754761; Mon, 17 Aug 2020 01:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597652754; cv=none; d=google.com; s=arc-20160816; b=LgXI0s4G6Cke/S6648ETJlFf+FsbM/JvTYaeW1Zqsaoump4o+e08SfzOoDI7SEhYhg 8g3y5yAQExjxi2t/NOoOLN9Xcco0YcoHfh31nsOy0mN+vneeCAgxSxg5RKY7XoKJ8/kS cwRgvblTBwlZGd4WSjbaEUfT4vdAT5V4sAzEALtwjV31CgnYBlly0sarceQgRLGAw1sa scq+yFoYx7TlSpesV9zISQsgtZ7l+0n3zZVOKp/u1OcYhjNqvlCnBu9FF/2rf6A15rWH xpA4qyGTCTRWWECGOs0hLes/ZigiiDaxGP8OTdzXzyQs7Yhz3frrOLHHK9dgghrFu/UP Ul3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=7u/2cva1X+qYdcICcawfSm0XBYmeJIpXUg7S7BH2D4c=; b=BS7owz5RZmFj2oZ0yaTM3spYvYq1vRBcLIveZerBil7wKyv1MkD6YY1bY6i4BMbWhd UizV28uYBhot82eIEw3Y5tS3GtuAbqWwqhgxxExNvCF6Im1o8ZnMJ5BMPljQ5Ul45PSa BvsOnx+io7qqkFuhTS9/Ualf0TgcsSqoFs0YLtqfhjauHCYh2mQ/s8nBSmooZAsbYU35 2IKb3uxPRntZl/rp0rYCHo6Zgn66hSuR+DhvdfODGU5/I53mxqtnPiGCQrRwN2eIaMoD ORTV4fsVAz+9BCQi8ia2tMuUyxR2LgJbzdcEnc4iwXn+FMvvlEpeNPylCKaBNo5j0Buy lbjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f59rLF9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yc15si1396730ejb.413.2020.08.17.01.25.32; Mon, 17 Aug 2020 01:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f59rLF9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbgHQIXE (ORCPT + 99 others); Mon, 17 Aug 2020 04:23:04 -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-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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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); -- 2.17.1