Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2130943pxa; Mon, 17 Aug 2020 01:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymLZUKGbjqog6QgoiY1Ywpb95Uj2SHGag9CtylgZ6hWY2zj5u00sos+Y6tD7dhYz755Bm2 X-Received: by 2002:a17:906:5612:: with SMTP id f18mr14598789ejq.225.1597652568360; Mon, 17 Aug 2020 01:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597652568; cv=none; d=google.com; s=arc-20160816; b=eJrwDutVAe4qMHTEJ94iyDAlmQUGNBaP26GOD+c+nw4JPMbXhYdVzoJ4EZ/pQebtsX 6lgB64pjLhqYbZDEA6Xzc+e4lAbNRVdzmZTgueyo4Bh3dPTqd3MMXwfD/4mmZAKljXMG A94YViveP3CBGIrigvZgQbKJirKeeEfSdz/2gsfzuJPRb2feSrM4mc5lzgy3ekfh/OjS HEjZKhEz6gsR8j5vdrSan64pB60QrwMKL7E0NHGylO3uLedaVkjORu/7wCM6ZpL79QZk 2ykPDE9Fe/WWshKH19Na+OV0yEA1Uy9EG0pc9CZhEvduGsuwpXBqJalfJmoFUrtpZVSe zang== 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=Jvxuy1l/tmoRx6ToQ9/CnHSagxvVLNtLIuN2aBXKG9w=; b=hqbmmre6YImCusCHS8djpmfyz7sRxiqEwLnoK7yvb4MHOBEJEf2cah2Ax1FpaKEMYg PwEaOADxvp1nenWZoANVzY1l1Ek7vXp651GPMkrW9fm9Ed+oZUSi3/wyq/LNTq2EK7UC XbtYP+MvwJ93J4owHp56J1B7DbamwGbtQB37nGO3OA0YrN7UigHxwuL1i3QzQrTyOtWK rR1KXnu6oUqCaljueqCXIslepx4e0WN5mc2B0QKLDPOjKq5Th1AUaHH6Qnk5pD5wJqgT OF1bw4FnhSfPTaFIcaCu8Egl1K0p0KJlzjitnKFNU2rOGGHwgNgOdO7hnKWdjVgxFyMv vf6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inUl3Adk; 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 by29si11014555edb.452.2020.08.17.01.22.25; Mon, 17 Aug 2020 01:22:48 -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=inUl3Adk; 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 S1728059AbgHQIUQ (ORCPT + 99 others); Mon, 17 Aug 2020 04:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbgHQIUE (ORCPT ); Mon, 17 Aug 2020 04:20:04 -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 6BFEFC061388; Mon, 17 Aug 2020 01:20:04 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 74so7843283pfx.13; Mon, 17 Aug 2020 01:20:04 -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=Jvxuy1l/tmoRx6ToQ9/CnHSagxvVLNtLIuN2aBXKG9w=; b=inUl3AdkFX0a6b6fmByIUWU8g/ZSMLhnjh7NyMEcA3Bu6SPtvSONgdI8zsNQTCHqbz 34awZ74cNxWmqvN4Y52URMl2mQeyPjNOOadpCzm8PGhUDavMOhJ7ETOj+hBQGQ4BneQl 7mNFK5k0ae85WFZcEufTK6g9mAuO8PDMAnJgR8VsaF7ApTpDDlJsX3Y/+Vc8pe0OBSBi kGteehuwn5DYsN3eunz8qI3beF+ivdCN8BMk+M8JgZT562JxoDbfc9np/bM2LF24qXdv p3Lp6f3CUT7KIhVgYvOlxNIcw1VqGF9CIIHbF9bIPC6GlwQS7RDDoeUItSSFAI9tgz8C RAIA== 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=Jvxuy1l/tmoRx6ToQ9/CnHSagxvVLNtLIuN2aBXKG9w=; b=RmxaLD2N0K/JvrImMX2r7A4QDNADNzm47YAC9gh5hOMI95ylVLwsWFMYeMTh021oOv pC3g3KfHx4ZH6nI2P8gdJAd4hc5040jIvbsZdqHO25d/IjwdBVwG/dTmeCm3WdcmRMlT beXykiFD6/r1S+7nPFIP3bG5/pod9rHt3+WFjm2fK+hLyC3ym/1N9cRSesUoL3s/f0IY DntuFWZO1y+BvSNNTGK5fPCYFDw0lC9J+6E1cHoZQcsGSTv+Kaf4kC/oodHGzqoOeCXN dLKDHuZb4/xIJUlfKhVYC9UiA3ThrsBLrPiMA2cOGQywAee9MFz3SS7LqO8NLO8BgT8X EuIA== X-Gm-Message-State: AOAM53098m4es9hMuySdyRQ7P5mk8IM4x1qeqFOASKCs/y/qA7TJFky6 oy6z2qhkXTMj70PNDHRqYBY= X-Received: by 2002:a62:1614:: with SMTP id 20mr10662690pfw.258.1597652404010; Mon, 17 Aug 2020 01:20:04 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id d93sm16735334pjk.44.2020.08.17.01.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:20:03 -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 14/35] dma: mmp: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:47:05 +0530 Message-Id: <20200817081726.20213-15-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/mmp_pdma.c | 6 +++--- drivers/dma/mmp_tdma.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index f42f792db277..b84303be8edf 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -873,9 +873,9 @@ static void mmp_pdma_issue_pending(struct dma_chan *dchan) * Do call back * Start pending list */ -static void dma_do_tasklet(unsigned long data) +static void dma_do_tasklet(struct tasklet_struct *t) { - struct mmp_pdma_chan *chan = (struct mmp_pdma_chan *)data; + struct mmp_pdma_chan *chan = from_tasklet(chan, t, tasklet); struct mmp_pdma_desc_sw *desc, *_desc; LIST_HEAD(chain_cleanup); unsigned long flags; @@ -993,7 +993,7 @@ static int mmp_pdma_chan_init(struct mmp_pdma_device *pdev, int idx, int irq) spin_lock_init(&chan->desc_lock); chan->dev = pdev->dev; chan->chan.device = &pdev->device; - tasklet_init(&chan->tasklet, dma_do_tasklet, (unsigned long)chan); + tasklet_setup(&chan->tasklet, dma_do_tasklet); INIT_LIST_HEAD(&chan->chain_pending); INIT_LIST_HEAD(&chan->chain_running); diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 960c7c40aef7..a262e0eb4cc9 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -346,9 +346,9 @@ static irqreturn_t mmp_tdma_int_handler(int irq, void *dev_id) return IRQ_NONE; } -static void dma_do_tasklet(unsigned long data) +static void dma_do_tasklet(struct tasklet_struct *t) { - struct mmp_tdma_chan *tdmac = (struct mmp_tdma_chan *)data; + struct mmp_tdma_chan *tdmac = from_tasklet(tdmac, t, tasklet); dmaengine_desc_get_callback_invoke(&tdmac->desc, NULL); } @@ -586,7 +586,7 @@ static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev, tdmac->pool = pool; tdmac->status = DMA_COMPLETE; tdev->tdmac[tdmac->idx] = tdmac; - tasklet_init(&tdmac->tasklet, dma_do_tasklet, (unsigned long)tdmac); + tasklet_setup(&tdmac->tasklet, dma_do_tasklet); /* add the channel to tdma_chan list */ list_add_tail(&tdmac->chan.device_node, -- 2.17.1