From patchwork Mon Aug 31 10:35:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBA981667 for ; Mon, 31 Aug 2020 10:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A26762098B for ; Mon, 31 Aug 2020 10:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="INHVEXyG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgHaKgK (ORCPT ); Mon, 31 Aug 2020 06:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgHaKgJ (ORCPT ); Mon, 31 Aug 2020 06:36:09 -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 BDCF1C061573 for ; Mon, 31 Aug 2020 03:36:07 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id l191so377629pgd.5 for ; Mon, 31 Aug 2020 03:36: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 :mime-version:content-transfer-encoding; bh=JUgypnrklX+WS7+RXf4i6hKrqncDmin14CiCTmnSXgY=; b=INHVEXyGK3jfZBuTZCRxHjaIQ0jdu/qreXdbfEw77K6rJLJjftkKE3Qmh3ICSuzXQm IXKoZka8AOBaJPjsP8zcDRWfBn7so3C6OxccPq1bEwifXjoIW0mZO4K62oySFzsiR6tQ q6axvu8cGLbdR+hKhgskCViG3JMiezK7ZrZNaSNl1PMaDjdMBrbiCGFAA0ojNsf2Ke6t Z/pqH2YRipFEDC4TRZS+tDV+SEdY+L4SsMOMz4WWxh/56AR+mBrgsqq+EYLAfrrmvJCB IfCIV9+EEWwp66htX3ccBNrgZUxWsEEtQmXpKcOeQ/gBLcYIwpJ8w5etY7mNsXhTTW01 Oj4g== 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:mime-version:content-transfer-encoding; bh=JUgypnrklX+WS7+RXf4i6hKrqncDmin14CiCTmnSXgY=; b=sVN8hG8j1b360Qt6vtoMfbGodx2UNJPkzkv5bJsoTlSX0FEIgvhpdVkbHVwtvfZSWU 8M2IeX0gA+aNZWar/rPRmggGasW6gki5E8Bz36vI2G2l2wQG2MwtjRQI5I0awASVaXa4 3c9aDgwvis9MNrZhnP2oq8pjbWr73UjnsOBcdhWZptxvxGQIDkClrb1vJOQ9+8KB/iJc xtSA5O4x96A1GTggQBwYaKGzdZS09/V71NrQnc/vwyE9W7nz2jG6ezuwnSyPZgf8uWsu 4DsNWAkc8xbGia6ExO2rN4czsLPJGAuYOUod5nld2LNCCzdlHl9bdMU7IlrXlHvnJohM VO7g== X-Gm-Message-State: AOAM533oGrMUMVGeOR5UQ4cVQ/7z5msrTeFz5ySjL35btieO8CcPUISW aZ8hxlqTjKsiTWcpeYHf1oQ= X-Google-Smtp-Source: ABdhPJyVbV4zVpFb9T/9pZB7C0Kz/GFw8J6lyPf8XSBAB0LLLvoR59uQ/U5Gp/AdEI6+VMeH2RhEJw== X-Received: by 2002:a63:1b65:: with SMTP id b37mr763669pgm.453.1598870167423; Mon, 31 Aug 2020 03:36:07 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:06 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 01/35] dmaengine: altera-msgdma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:08 +0530 Message-Id: <20200831103542.305571-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/altera-msgdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c index 321ac3a7aa41..4d6751bf6f11 100644 --- a/drivers/dma/altera-msgdma.c +++ b/drivers/dma/altera-msgdma.c @@ -680,9 +680,9 @@ static int msgdma_alloc_chan_resources(struct dma_chan *dchan) * msgdma_tasklet - Schedule completion tasklet * @data: Pointer to the Altera sSGDMA channel structure */ -static void msgdma_tasklet(unsigned long data) +static void msgdma_tasklet(struct tasklet_struct *t) { - struct msgdma_device *mdev = (struct msgdma_device *)data; + struct msgdma_device *mdev = from_tasklet(mdev, t, irq_tasklet); u32 count; u32 __maybe_unused size; u32 __maybe_unused status; @@ -830,7 +830,7 @@ static int msgdma_probe(struct platform_device *pdev) if (ret) return ret; - tasklet_init(&mdev->irq_tasklet, msgdma_tasklet, (unsigned long)mdev); + tasklet_setup(&mdev->irq_tasklet, msgdma_tasklet); dma_cookie_init(&mdev->dmachan); From patchwork Mon Aug 31 10:35:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE5701744 for ; Mon, 31 Aug 2020 10:36:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D64592098B for ; Mon, 31 Aug 2020 10:36:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IVJAEmUq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726472AbgHaKgP (ORCPT ); Mon, 31 Aug 2020 06:36:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgHaKgO (ORCPT ); Mon, 31 Aug 2020 06:36:14 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B352C061573 for ; Mon, 31 Aug 2020 03:36:13 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id g6so2748417pjl.0 for ; Mon, 31 Aug 2020 03:36:13 -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 :mime-version:content-transfer-encoding; bh=aTuqGydsLjCuiYOr0kdtMvVN8c3zKMVJf/5YH2LpKyw=; b=IVJAEmUq+LOciB2x676YkDyPKLszYWKVMgGx9bHF2JVbhg4ylw0hh/XiI/MyV4ms+6 78oaxzmyjNr7uURby8spcUPui2UssM4MeUq6G7hjXjV+1tjUnug2OSUcvk7DR1603iDw fjXSdoBc3YRJacTF0Xh3sSIWk95NiXEzYWi0roEl0pwibVi4eQq3cs+5PWT21ej3CfZ2 xiXyScJF5VI70EkYq9kZMy+0Wkbt2w9ZG8uga47ZP10FCouOAmbkokYtdKwFRgpLVziw l42gqFkSGlwb566FQLMnGSm2XCzlzgC3XaG+HbOtONN+ZPGjZ26iZnBJtIzkV9uSMtZI zfFA== 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:mime-version:content-transfer-encoding; bh=aTuqGydsLjCuiYOr0kdtMvVN8c3zKMVJf/5YH2LpKyw=; b=WCvM5UQa3yUMdA/MiNToR/HujIJv+dKyF8eGP1A20bdTe41KN/jJOOM6p5pLWvnwyv oLX9Svz6UFw5cxnZm0TQOvMqlyVW2tbOkckgSH7JjVBm8mWkoSKqQcYDNHygRDzvFHpV qcDfPlI6ynjigxEtK1sg/UX47t0VMkHOd+39ijXvY3FBv4EskOsYe5JlkQG2/1uK6bDY cn7bOuO5r1S31fE6muVzlxGwo5IrhnzwXvGsvmPm31jX908tuz9KWf+vUKG5j4C959eC v4NPl4WXbcshg+/hi/3BsT6iMfaLz09jABKMgywBpGxtZyyU45UKXaglRiuCW2dYCUrz fNrA== X-Gm-Message-State: AOAM530OYDFWRVS4sm7eXE0OxmeMEUYu+I+pEgY6vsqKBELHthTxzYbv WinLn/qNsEZxk8/VfFnSJXM= X-Google-Smtp-Source: ABdhPJwWs1TaeZptDBNq+I0CH5fJ1zZtTF1avr4rwgFesSK46dFFy0fRoc0a0ydm+NQw5XdtIRNUzQ== X-Received: by 2002:a17:902:b7cc:: with SMTP id v12mr582507plz.105.1598870172755; Mon, 31 Aug 2020 03:36:12 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:12 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 02/35] dmaengine: at_hdmac: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:09 +0530 Message-Id: <20200831103542.305571-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D833109B for ; Mon, 31 Aug 2020 10:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9E7520936 for ; Mon, 31 Aug 2020 10:36:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="py7Vau2e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgHaKgW (ORCPT ); Mon, 31 Aug 2020 06:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgHaKgU (ORCPT ); Mon, 31 Aug 2020 06:36:20 -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 D9038C061573 for ; Mon, 31 Aug 2020 03:36:18 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t11so2828162plr.5 for ; Mon, 31 Aug 2020 03:36:18 -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 :mime-version:content-transfer-encoding; bh=vrypxtxNCzZ22dGNluZ8L/tSH2Sb1as0JwtAxE7h1tM=; b=py7Vau2eIghhsMPCzq+54esfCF/uwJmVXwANmAlwka4v+f78deTKi1hDzvggUVL83I H7hXreU3Yv1KxEcRILS9x8o1xpG8BAVQcZIEWMrcyUiHL8I6cjnAFQtZyXqp0FleOeJC WAUzMx53bgqPozxR+FDn/woztDAvm1J5HUJVIIT5pE3euSJN+m9pstaKfRFl06/evr9k m2olwXX5IQ7QDuW/FVat9rG3RZYOq2BuJv8/w4JtTAAV7VzuU+HfrCcebdQY7z1uOqt2 HiYGg/wLNzR89YszdMkBcuLTu/ISEYDlBLj0xliwfoIBFI7GriNSPMpC2SoZQlAyNUs1 CbGQ== 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:mime-version:content-transfer-encoding; bh=vrypxtxNCzZ22dGNluZ8L/tSH2Sb1as0JwtAxE7h1tM=; b=AHgJNvhXlMSZb7YGyaFlhp+DdpzMbf1gv8OJtcFo+GxMlP3lfedoJy86Y7lE6Rwn4W ZHEMxGqBXwe7a0ywZi+ap6lUdGH/eebce57oolCceopagz10r9bJGfHntpydGTFJCLX6 ahBc7OPKArxkfKAOJHOpywmW/pbcOvNphFY/Iu3+MD00Qsf4yxAjGa0COE50xUxZB+t9 ucB06n3GeUZHNysBGdidDHuyhTxRvU9s4TIFF/k4PR4OPiDm9IzFaGS6SfihHyVMPbbE jTn/pQA/FATN/JL322yyRRWCzkSkK/8BavL4u7dPuhVKf/3M8+njd0uiSAAjxvRwA0tI IFkA== X-Gm-Message-State: AOAM530mvoBC2aBbVUe45XiPMmcxqs2uOVyRBlZ/nsMlkPh6+144HX+7 hu70ngaaPK29KepaGrobPyg= X-Google-Smtp-Source: ABdhPJyATjy8+fE/clBgva7xHRKnI90aLJGMdrCyb1YF9jJJ2eu83iCIfp4jfvBhpNUOlAx51GZT3Q== X-Received: by 2002:a17:90a:6e45:: with SMTP id s5mr799907pjm.12.1598870178455; Mon, 31 Aug 2020 03:36:18 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:17 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 03/35] dmaengine: at_xdmac: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:10 +0530 Message-Id: <20200831103542.305571-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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_xdmac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index fd92f048c491..3b53115db268 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1613,9 +1613,9 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan) /* Then continue with usual descriptor management */ } -static void at_xdmac_tasklet(unsigned long data) +static void at_xdmac_tasklet(struct tasklet_struct *t) { - struct at_xdmac_chan *atchan = (struct at_xdmac_chan *)data; + struct at_xdmac_chan *atchan = from_tasklet(atchan, t, tasklet); struct at_xdmac_desc *desc; u32 error_mask; @@ -2063,8 +2063,7 @@ static int at_xdmac_probe(struct platform_device *pdev) spin_lock_init(&atchan->lock); INIT_LIST_HEAD(&atchan->xfers_list); INIT_LIST_HEAD(&atchan->free_descs_list); - tasklet_init(&atchan->tasklet, at_xdmac_tasklet, - (unsigned long)atchan); + tasklet_setup(&atchan->tasklet, at_xdmac_tasklet); /* Clear pending interrupts. */ while (at_xdmac_chan_read(atchan, AT_XDMAC_CIS)) From patchwork Mon Aug 31 10:35:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0330B109B for ; Mon, 31 Aug 2020 10:36:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E03E92100A for ; Mon, 31 Aug 2020 10:36:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tIfN7p5y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726249AbgHaKga (ORCPT ); Mon, 31 Aug 2020 06:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgHaKgY (ORCPT ); Mon, 31 Aug 2020 06:36:24 -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 41E6CC061573 for ; Mon, 31 Aug 2020 03:36:24 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id m8so355978pfh.3 for ; Mon, 31 Aug 2020 03:36:24 -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 :mime-version:content-transfer-encoding; bh=k44gMsX07XTMlTArd+3SB33+vAZam0V8KHCa0v3YAqE=; b=tIfN7p5yPRwLYNy43YSm97eEi+rTGTbsKKHhh25nMQsOXiarZA2QYk2BLqbxbgEBc+ Jv5qregrinD8QGZUvD06aw7tUhbJeMNGeVQ9LDUy1rwNc6ZbjcYa7iSU7w5h9Szk9XRG Q+VUvEKU2pBjqkZbQ3COl015baiRG7QQnqeq95SglGs++4jrUUduDUvJ+lhqmjKQg322 s61xQhc8wqsH5LXr/hL+KZkze3pbvDI3NdH+Qr18LUACQwmN6wpsGTzjXEiE/Cq3tgTM UNZngdL929n1J0EkkNXY+c88qYdBIawKlkFrh1JUNSY5ZTMT1AZfxKNhGI9A1SL8ETcs LF1w== 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:mime-version:content-transfer-encoding; bh=k44gMsX07XTMlTArd+3SB33+vAZam0V8KHCa0v3YAqE=; b=jHCNQ4m8Zp95BHRxCfb5mvI+eY9kM5wOUYpRliQvQXgORBUgxLse71jKE5nA5ZbmGs 3VEBs0FNQmZuCkYx28slTFj1ER+i6kMAvJ0DyGXqfNflJf5aJpgUqTPfjZbvGvEyweP/ 1MQk36TBaOqn/JmYS48ER7a1q476a+YFmPXsbtlXtIo1hUUaTZp5DfVkK/NCupW72C6F abscMZeoIsZ6ny74KEyDV1KQn15sk4t3pv4bkkvZs8YtchlwO6PdYwI+w5DHKo0vhmXs lm14uVVnxxV41xw9ydBGGQ86Gp0Cg+2GEDlDPZHXZR0PI/NUw66nGBgDuXIreR3K1VcN GcWQ== X-Gm-Message-State: AOAM532lz38Ckke6eYgzipFqgW1056br5XTIJb1BRVHx7wtPZMBXs4hj So1TCu4UnIApuBDkjeJn7X8= X-Google-Smtp-Source: ABdhPJzqFlTGEOqjLxgtatKtcihhrImSLRYMM6dUKSWgDcNv33V/dconxicZdGP6tK4+ADurY3AiLw== X-Received: by 2002:a62:444:: with SMTP id 65mr788657pfe.86.1598870183859; Mon, 31 Aug 2020 03:36:23 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:23 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 04/35] dmaengine: coh901318: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:11 +0530 Message-Id: <20200831103542.305571-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/coh901318.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index 1092d4ce723e..95b9b2f5358e 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -1868,9 +1868,9 @@ static struct coh901318_desc *coh901318_queue_start(struct coh901318_chan *cohc) * This tasklet is called from the interrupt handler to * handle each descriptor (DMA job) that is sent to a channel. */ -static void dma_tasklet(unsigned long data) +static void dma_tasklet(struct tasklet_struct *t) { - struct coh901318_chan *cohc = (struct coh901318_chan *) data; + struct coh901318_chan *cohc = from_tasklet(cohc, t, tasklet); struct coh901318_desc *cohd_fin; unsigned long flags; struct dmaengine_desc_callback cb; @@ -2615,8 +2615,7 @@ static void coh901318_base_init(struct dma_device *dma, const int *pick_chans, INIT_LIST_HEAD(&cohc->active); INIT_LIST_HEAD(&cohc->queue); - tasklet_init(&cohc->tasklet, dma_tasklet, - (unsigned long) cohc); + tasklet_setup(&cohc->tasklet, dma_tasklet); list_add_tail(&cohc->chan.device_node, &dma->channels); From patchwork Mon Aug 31 10:35:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0322A109B for ; Mon, 31 Aug 2020 10:36:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E001F2083E for ; Mon, 31 Aug 2020 10:36:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mxSEz49P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726081AbgHaKgb (ORCPT ); Mon, 31 Aug 2020 06:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgHaKg3 (ORCPT ); Mon, 31 Aug 2020 06:36:29 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CA2DC061575 for ; Mon, 31 Aug 2020 03:36:29 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id n12so370804pgj.9 for ; Mon, 31 Aug 2020 03:36:29 -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 :mime-version:content-transfer-encoding; bh=KMv70IDUEMQUzl056A1NNcLWNKMQwzUiTFHNxBzdUH4=; b=mxSEz49Psv3VicLizI6aM+uQCHlFi0MF5j/ERdm5sGHe1DzyRFwThQ+0BdZeTPM3Eu z+aUNWfPR+m5koI7e5pPVDLMctw+P86dChuQWMu+oBCJ900eC5zXmtSEO+Ea+SEhpjWH R3gtC5+zlUpfNukKZjP2euy+egubmWOFkA2LjpHzYvatLnatbLyvjkwYWB5BqvdkMPeI jIRQVmkV40AKwGiAX2c8lyTPOGDtqDcD/FCLugkqtVi7VKQuquAz+9yS1nwrCsU6R6Rd UJd23GlgEjZHZ/fbjXROvLXpVJln7cYDVYD4xqudhECF99RuL23uFZ0xO/o+aPJEk4vr dQjg== 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:mime-version:content-transfer-encoding; bh=KMv70IDUEMQUzl056A1NNcLWNKMQwzUiTFHNxBzdUH4=; b=a3F9rl1fQFAa+nVyTZBzoc4WcAP4b4iuy71n+rhnWTX/G2w0VALzuxdzqr1d5oEc6T TYp9Glj5L7Ym9awyvTJXCOEJPkL2smCP8YeY1a07q8QG2lQ0hzmYcjkgxjW2j9K4T3oM rV3cAW5R+3sAb5VUIzvkpEwSeiXPFP/qrSq5e+McVLFAcMe+jv/yr5LzQVVtDmrHHpPM a/NEOzCinlas6d7MvY9rN4p3+sUuj/lOH1eKxToIorTQt+UtUv4uIZm+1/pG+iqTXMQv QAPGQyPm9pujM5sn/HYZQO1uJqADnOie3FkuNHX+G36IggEiYWcH1JrRxK/h+Dj7uT4t JJEA== X-Gm-Message-State: AOAM532mdjFmrezj+cRzpz0PpW7ubAsU03FUKh1aXFVTBaDq7Z8Bzlo8 oWKRiukn9Dm1mAcrLWyDI2I= X-Google-Smtp-Source: ABdhPJyqCVXaAIrvRWmMbakWoHG7Y7+5RSu8ZvRpmVAlX9bS3v4Gzxq6kXzS2J3ABMxg8Tjt2mfTtA== X-Received: by 2002:a63:4443:: with SMTP id t3mr780100pgk.9.1598870189197; Mon, 31 Aug 2020 03:36:29 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:28 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 05/35] dmaengine: dw: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:12 +0530 Message-Id: <20200831103542.305571-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746051 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0119109B for ; Mon, 31 Aug 2020 10:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8BBE20936 for ; Mon, 31 Aug 2020 10:36:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aw8mLuLW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbgHaKgg (ORCPT ); Mon, 31 Aug 2020 06:36:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgHaKgf (ORCPT ); Mon, 31 Aug 2020 06:36:35 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC720C061573 for ; Mon, 31 Aug 2020 03:36:34 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 5so380082pgl.4 for ; Mon, 31 Aug 2020 03:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4UF96c6tilIEXEsA4F4M1+JIF6S4A/ycLHEkv4/aigc=; b=aw8mLuLWoSHXQs21woSjLv4K91w5Rx0SUJaqI8CuQQe19KnUsu1TGOMQLOwm+pXQ3j Fl1Z3Er+cmXBero6k3I2hLv6fM9PipW5iPp4mMcE4wSm6AvzRCRRMhvNsnEMPn+4SdBA ndLli2ogyLcBoFBIr9aNZkwgZxRTjcu0cB3wFQmTwbxwpV2b32QvCTb18jD0xBieaWbx whWevUR4E2m4txLtaPWVmk+Gg9NRwnobsEFzLHX/rUFgMj65f9GNBsSpIkRJMw15KrGc Kqr1CRyjDIjXxw9LWDlGAWGtiUQShNsjJlr4Tjn/K0DiVDzRtFwMTemmlEvFZ3GuLqhY gI4Q== 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:mime-version:content-transfer-encoding; bh=4UF96c6tilIEXEsA4F4M1+JIF6S4A/ycLHEkv4/aigc=; b=ShWxiAMRzDz4Xf9fPQ+mmskckvtvfeZe7OESOQmvpy+kZSJ+DPT9K2ayspwHX/Evq5 BKsUveeY4IrMV+ryUE6UekqwwSduBBulCxPgBRSuSimSjKG2AtqXuvVtbX6I54Anughn KIbs5gENS8fhADaAFYejJkkrFhnDGj1E5U5fbXHXXpg6lbBwCtphwjRaxWhrulD8+X/w MCUEOUt6vDDEhQzN6ldXxfgn1fZYUlSQWzbKXNp2Iz1oihP4HsNgHcN5g89winWapg63 jCn6Bbyobamw+WvHlQ9VB0w73ZxsnSphm41bXXddM0fIlab8r/1E3OQVCLZN67u2DCax I0ug== X-Gm-Message-State: AOAM530WjR8pkJO/uvY1M7rHA2ONgB6f8OXZdrcWHfyT9FWlWZSI3ufU /WIiUxkNXhEkauuYvynX+wXrArFfi+D20g== X-Google-Smtp-Source: ABdhPJyl+6Jtj2LXnHqNeCZzStqufMzktJWY0UqLMUZaedf6qY7ZXwemZWLoVeGgFV2Skgfrs15lKg== X-Received: by 2002:a65:66c6:: with SMTP id c6mr769819pgw.206.1598870194543; Mon, 31 Aug 2020 03:36:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:34 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 06/35] dmaengine: ep93xx: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:13 +0530 Message-Id: <20200831103542.305571-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A87B1667 for ; Mon, 31 Aug 2020 10:36:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2002D2098B for ; Mon, 31 Aug 2020 10:36:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QCOJcXpd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgHaKgl (ORCPT ); Mon, 31 Aug 2020 06:36:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgHaKgk (ORCPT ); Mon, 31 Aug 2020 06:36:40 -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 1BF94C061573 for ; Mon, 31 Aug 2020 03:36:40 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id nv17so2913476pjb.3 for ; Mon, 31 Aug 2020 03:36:40 -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 :mime-version:content-transfer-encoding; bh=Z5wsYyfm7fM3LtIoiLq6ovDcEJAfgMVeGP9t+wnye3g=; b=QCOJcXpdXZsZHxkkIqK/jQkjPCgSlxOOKVGBAQk680cYEU0wFfawo3V6CBRBh4z4Dw 1oiZxYjJ20aJybaAH9OMKqWzERx144zjrPNWbeuvbR7X12vwJR/mIOuGIPdf3Rm+TgY7 fadvRjeZb78o5bzaRGKSqe//XBRbAAzbPOicETZ/3X3eIQ/S1Osf0lT7LnriIVQ9oRY5 yuspLVaCvsO0EcJyk6/6PTXc23Zc3XXzZo4AvUK4XEGn8mIFxwNaS7h5AkXc2XhnkEGn x9UsoylGDjewSgSyHPkx3qRcUMrUw8vqwUp/qhI3c514U7OUx8WE7LxpCosGf99V865S HX2w== 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:mime-version:content-transfer-encoding; bh=Z5wsYyfm7fM3LtIoiLq6ovDcEJAfgMVeGP9t+wnye3g=; b=ASX7fY1eD3h3NkgbIf9lI3va+zPrwOtNwsKSIWGWYh7K3EaXSSXe7CYLUQ3HaLcvTB QfX+l/gK6KdkknjWkfviif49LzJB8AIlClpVi2NbheoDoTzjQtD08gvbeP+EaffQN1St fBZJUZSDrvoi6XAiWxfbPt5kUHVz2kuC980lfYLO3PTgGCD1n6kWsB8kdXiv2q3L7OhW 2StK6EhTDMmsP+D3d+VbCJC8lffYEgIb5HLGjJe8G6hdJV3r8ipk67eL3eAzDFTh5nWE geYKtg78HluhAfFemZcj3tvDZvdaWB3IO12AejTe2p0afqY2SwQnrxfw/HXprDQDpWtU MQrA== X-Gm-Message-State: AOAM533JZwFeiQLJCrhD8vwcxEd4iOwO/PRTrGdhMIC1umrlr6aPcdkF 8g1TZFkpZ32Up//FH22wug4= X-Google-Smtp-Source: ABdhPJxCVoKcWKJ9Z2QnI25AbLYsqI/au7cS/sPqf5gyVvEmM7WOocaqCvAc06oJGNr/cUjGvaWiFA== X-Received: by 2002:a17:90a:5aa2:: with SMTP id n31mr774170pji.33.1598870199702; Mon, 31 Aug 2020 03:36:39 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:39 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 07/35] dmaengine: fsl: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:14 +0530 Message-Id: <20200831103542.305571-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 e342cf52d296..0feb323bae1e 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 31 10:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45E29109B for ; Mon, 31 Aug 2020 10:36:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C6502083E for ; Mon, 31 Aug 2020 10:36:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fWYI4R3B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726204AbgHaKgs (ORCPT ); Mon, 31 Aug 2020 06:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbgHaKgp (ORCPT ); Mon, 31 Aug 2020 06:36: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 16D52C061575 for ; Mon, 31 Aug 2020 03:36:45 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id a8so2836778plm.2 for ; Mon, 31 Aug 2020 03:36:45 -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 :mime-version:content-transfer-encoding; bh=Wq3OAA05Kkqf9o/BX5uLXvcYXIy2kW0ifbKYiZ0Coj8=; b=fWYI4R3BZ7qC37XBCN42a3qBKv5yt1FS05tHq6nSfvlX5N8ltwn2RWgbV1kekwGBBt LQiYJjOGKTxZuc0h9mRG1V7W0aP/AsF3kURNnlo2loYFOezUlPpRy7T7ec3PaZJDn/Mk LAuP++ucdlvofE/41kxE9522+ipUwMooY8XqyQBNXfdVpbTGDrs1guGa/41FCQKng8NQ 5GDrxkSFAbj6yPeZRKraLfiCE47r5FIv3rPxH7GgM7Tyl4eMT+nLrWJhbn1ujbgeF7Mj lMw1lUdHrQes4jXdMT2amMX0c6a/Dt+Gxg3jEepWXlJr0OeogZbp0k7DOPLBQY5VBtBU EgsQ== 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:mime-version:content-transfer-encoding; bh=Wq3OAA05Kkqf9o/BX5uLXvcYXIy2kW0ifbKYiZ0Coj8=; b=bIBN6+xVH/Dst2Au0bXyzc+i1GqCIHj1TgNjPdFDv1rlWU7eN5LliLTAENfDMcOpGe nssDbpGiVOS0IC0+R25wK32ONGbSfLUjFQDHVOoZMmvJ3zTF5ck7ewLW+ln4XfP47x7V rPzola6guH4E+TPg/b2g7dBikySuZw/D1iJ53f1wLyCX98Qe6Fb1o+CZ2a7ntSbDHh3r r+ZnEgWIkPcOEhtHMvpR0+/hV/17RhSko9++3IqvJJjZTKBham9gO8e8Be5ZwtkJ9U+2 EwTM/CK8jSkYWkOhDSPmy9CTRJdufQ1vb35n6mgk1YJL0bHRkO9fRXTqh34m6HHsDM28 1Gww== X-Gm-Message-State: AOAM530XIJOIjAjafeKpc8Q44c+HnKiSclTBhz7x8Hzzj+KFVEZQqcEy pNN72GaeHFKJK2O8JzBbNyw= X-Google-Smtp-Source: ABdhPJw1HtSTtyJ4HnF1/COWzae7icQQ9kF9xfV72WE1eTogMGpHQ1u29uOumR1FCevHQ/yAmMoDNA== X-Received: by 2002:a17:90a:bc96:: with SMTP id x22mr848465pjr.164.1598870204722; Mon, 31 Aug 2020 03:36:44 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:44 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 08/35] dmaengine: imx-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:15 +0530 Message-Id: <20200831103542.305571-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/imx-dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 88717506c1f6..04c24be2b2d9 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -613,9 +613,9 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) return 0; } -static void imxdma_tasklet(unsigned long data) +static void imxdma_tasklet(struct tasklet_struct *t) { - struct imxdma_channel *imxdmac = (void *)data; + struct imxdma_channel *imxdmac = from_tasklet(imxdmac, t, dma_tasklet); struct imxdma_engine *imxdma = imxdmac->imxdma; struct imxdma_desc *desc, *next_desc; unsigned long flags; @@ -1169,8 +1169,7 @@ static int __init imxdma_probe(struct platform_device *pdev) INIT_LIST_HEAD(&imxdmac->ld_free); INIT_LIST_HEAD(&imxdmac->ld_active); - tasklet_init(&imxdmac->dma_tasklet, imxdma_tasklet, - (unsigned long)imxdmac); + tasklet_setup(&imxdmac->dma_tasklet, imxdma_tasklet); imxdmac->chan.device = &imxdma->dma_device; dma_cookie_init(&imxdmac->chan); imxdmac->channel = i; From patchwork Mon Aug 31 10:35:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746057 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 425B71744 for ; Mon, 31 Aug 2020 10:36:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B77B20936 for ; Mon, 31 Aug 2020 10:36:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QRQiyrvf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726472AbgHaKgy (ORCPT ); Mon, 31 Aug 2020 06:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbgHaKgw (ORCPT ); Mon, 31 Aug 2020 06:36:52 -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 64115C061573 for ; Mon, 31 Aug 2020 03:36:52 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id g29so385058pgl.2 for ; Mon, 31 Aug 2020 03:36:52 -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 :mime-version:content-transfer-encoding; bh=gSZRlybSosr68du+S8eouqXuhNTnABdaSjfdYOwaFI8=; b=QRQiyrvf9uM+yK7JyBGjBZFOcNFQ8qVGtkhuNBRHW7O9vZlwo5p45rRUMA6Q1g/GcK Tz2TDwPZJKO2rJkcRlc7kNsJ6nNh11O/WEgwwINLltd3C/FxioVHcfwjHknIqdyURyYO zsgZb3O6/KPi5PghcoDdlC82Aft7BgUjv3BPdeIy2v/nVr50VIVlj7uOmqm/Bkypz50G Y4KtuNcCD7LoWguAdzFAps7pUWmPLLWrpz2u9KslPNzROnyjFZ329Z+/4AeAo0nBBQCn /tgNQCHycjmjwEOo9OvwLDbvZbIyJpPWH190JmKTBSKv+4MpXY5kuyNX2QABIaW0f6tI OgZQ== 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:mime-version:content-transfer-encoding; bh=gSZRlybSosr68du+S8eouqXuhNTnABdaSjfdYOwaFI8=; b=MxroQVRmGX7sd9PGhPN5ITwk1MmAJdSrcefstLjq2sblJD+BrBzR2U9lNalv7AwDIF 0vCmzmQIGYF6D+Kq/+1vXKJc8YI1oeA8YBDzP5cKXnv6ifOO7ENEileQBPucGE9MohUc 6MQ5c7sso1QP0SVmqRdJx2IzY0LBt7SegZtIR0wKmuycxy+TqjeFf476/+2GZur10zKw uBmGkNuGSvaXgVewojZhJfJrNsS58KFB5PQ8uNMmsJ6TdZCLjwAIaka7KtWVAafoqr7t 601iqme0aaHkXSgqb9h6Tc0jgdJlLap87mcpq6zPNzP1P/ZgzzWv2MobSmF9xFk+HAjD mL+A== X-Gm-Message-State: AOAM530dh8k92AStR5VObnZSnYXdxwhJm8x6JeIF3Gzn2ZhAn8ZAKRrC UdbcMZBqQGE7T2hcGzLdljI= X-Google-Smtp-Source: ABdhPJwdH1ely4yn6Q9Ct01gYnMkPrud3bt+h5qbhZGTEo4qES6yvTZUGP4s/Xn1j5w3R9biDZXufg== X-Received: by 2002:a63:475d:: with SMTP id w29mr705459pgk.287.1598870209848; Mon, 31 Aug 2020 03:36:49 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:49 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 09/35] dmaengine: ioat: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:16 +0530 Message-Id: <20200831103542.305571-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Acked-by: Dave Jiang --- 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 31 10:35:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746059 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1824D138A for ; Mon, 31 Aug 2020 10:36:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 018C120936 for ; Mon, 31 Aug 2020 10:36:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bQghudm3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgHaKg6 (ORCPT ); Mon, 31 Aug 2020 06:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbgHaKgz (ORCPT ); Mon, 31 Aug 2020 06:36:55 -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 716BCC061573 for ; Mon, 31 Aug 2020 03:36:55 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 7so366066pgm.11 for ; Mon, 31 Aug 2020 03:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b1zOgcujLWbmq9DLHM2msso8Bm5fmlkU6E9gfDFZC/8=; b=bQghudm34wAhJ9eXnlaKKvSelpuCiWdosz5Su5DqFpuyIRo6u3zT7TvaS6fp7kHQ6y nW7KHqsDNPM3zbJUzBzO+X1objPNf9vmO5hQFjB4m629qaCI1ppZc3xJVyuXapPh3JZx Y6ueM0Z++3VuEb4eZoYKVXHEUEwPVAVpq7ndz6MEYXptUGldV1vmb58T4kb4o8CLM0ff 5qoGl2/PjTZj9gzkkq8TL6swq8Y9Ui4HiCpocOquw4YM2bm5J4RJYHD/snYUB3faXVVX 0TyZhSEh486ckP1fQW4XYVT7Tzz0dP46l6xjOFOOwr/+mCAS7DLQ+WKzZzIY9dkL2uKX rNeg== 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:mime-version:content-transfer-encoding; bh=b1zOgcujLWbmq9DLHM2msso8Bm5fmlkU6E9gfDFZC/8=; b=bwlebyBhiJebOB1xj82hBgHCGFzOzW9Sab44ZIy511mWIhWAg3S/AcRvGd/wKNvtu5 qU2kLp7jGrcmXgRJtv9jdchRmqkOQ5DuRhSX6qnpWssrZ1Ix3cwEyUCgjJ0t8dcYekjc 4O7wPVAmmv1bdLVaXDw7qzXPw6uC3VY3fzeLGUM9pLmfMklqMG13DU7CfRSa2DI2QJ0x m2nZ5Vo//AjNhunpDYOpfDXcL1RoXmLPAgjFjKoJpbD4qwE2wuU94zaAdNQ5z6jXAt5q sf3o5K9Z891u+CAG9WH91pTM1Egc2b2DGpxb8c7frLukJGX/DkiVuYv2ukyp4Uy0ekg2 /YSQ== X-Gm-Message-State: AOAM532+XBk199kxAQqm9LBFd+wMWdj2GFHWY+wB//VtvC6YJh6n86uO JyJWgXfjYsTSHfty7NoQEFo= X-Google-Smtp-Source: ABdhPJyxHCMXnrStp099DZx/ik9QAZFysvDoJK2v1mrO//tyCDI6whKe54xz3QAs/odzIkDP/VvKQg== X-Received: by 2002:a63:4c:: with SMTP id 73mr778954pga.286.1598870215113; Mon, 31 Aug 2020 03:36:55 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:54 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 10/35] dmaengine: iop_adma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:17 +0530 Message-Id: <20200831103542.305571-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/iop-adma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 3350bffb2e93..81f177894d1f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -238,9 +238,10 @@ iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) spin_unlock_bh(&iop_chan->lock); } -static void iop_adma_tasklet(unsigned long data) +static void iop_adma_tasklet(struct tasklet_struct *t) { - struct iop_adma_chan *iop_chan = (struct iop_adma_chan *) data; + struct iop_adma_chan *iop_chan = from_tasklet(iop_chan, t, + irq_tasklet); /* lockdep will flag depedency submissions as potentially * recursive locking, this is not the case as a dependency @@ -1351,8 +1352,7 @@ static int iop_adma_probe(struct platform_device *pdev) ret = -ENOMEM; goto err_free_iop_chan; } - tasklet_init(&iop_chan->irq_tasklet, iop_adma_tasklet, (unsigned long) - iop_chan); + tasklet_setup(&iop_chan->irq_tasklet, iop_adma_tasklet); /* clear errors before enabling interrupts */ iop_adma_device_clear_err_status(iop_chan); From patchwork Mon Aug 31 10:35:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6DE65138A for ; Mon, 31 Aug 2020 10:37:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 570BB2098B for ; Mon, 31 Aug 2020 10:37:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k92LWmh0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726517AbgHaKhD (ORCPT ); Mon, 31 Aug 2020 06:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbgHaKhB (ORCPT ); Mon, 31 Aug 2020 06:37:01 -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 04C6AC061573 for ; Mon, 31 Aug 2020 03:37:00 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k13so2807598plk.13 for ; Mon, 31 Aug 2020 03:37: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 :mime-version:content-transfer-encoding; bh=F2FnoBqi5NH706AoRxBmENjM5xfxPQEIU49AcdTrV8I=; b=k92LWmh0iXe/RIX+VUg33GvTZ5+nhFcUjf7V9ZmKTh5/XboYDXlV+BlnyyiBRJ4B70 AFNvaOCl3E4MOkpWo8k0jw8CVAXWDVBeuhjjqmnEZ/r9+auHGXlYq4/Sa9yKM/9He4tn pmJeO6pDhpCVEXFhA2LNmf/MaR0J6Cr8EbX9Gqgd/8B5y9DUiGxLmedrWCoV+zoEbRHx 5pHHZmBW+N6xDUgLjBeka/VlCX4xsfUl8juLaQ/DqpOVAX/vqg2KY+vQGqM4CRoBkI6z 5TIGYEbhQOLfeSS/mbn6vm4KLOcZSLgYFBAiWetAkJiif7YlEfzyWYM+A+7SaT06OUpM WNsQ== 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:mime-version:content-transfer-encoding; bh=F2FnoBqi5NH706AoRxBmENjM5xfxPQEIU49AcdTrV8I=; b=PBRBVMj6X1dLGWVhtEjnS/WEmkdojS9iktlZ+nmomwmqnxAU4ZYmS6lQhX2oH3FewZ eVlSCJiAWA7f/MAtSQGLWbyHnpIId1svqdnEN+qhoLC9TC8S+MPD/xUXxzH2woGuNR1r cuUGLzEwbXHWTUDX7f2UbWGyyn8tEAKPd1kbmseJnYWkt3/sNf3tmxSBgOH9lOYqwDzT pimecbMNDCj/t8yl5Agb203e/adTDvSmBREnkKKajSMFqvnW36HtPYSnPPlDKXTtrDdg /Iu0c62RbmZkglth8f7nXuPCQU2IBI4YBEnzNWfWZ1J1e0qAAZWRY2JuH20EJP4RdjJ5 BIyw== X-Gm-Message-State: AOAM532M991qqWhFVeYiN0kvTBJAePVlSYo2mf7cRS4UQJoMFyRNlpv5 TXx2Ql0+tOq27FWGGwJdia0= X-Google-Smtp-Source: ABdhPJw80wRV5ua3sfGR1EMfQjbNW6Ft+ksuFQFki1qi5RfaWPgjKddjb82B8qsae1bbfPEpqw+2rQ== X-Received: by 2002:a17:902:fe02:: with SMTP id g2mr557710plj.315.1598870220333; Mon, 31 Aug 2020 03:37:00 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:36:59 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 11/35] dmaengine: ipu: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:18 +0530 Message-Id: <20200831103542.305571-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746063 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C2CC161F for ; Mon, 31 Aug 2020 10:37:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3577020DD4 for ; Mon, 31 Aug 2020 10:37:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VtyenePq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726507AbgHaKhG (ORCPT ); Mon, 31 Aug 2020 06:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgHaKhF (ORCPT ); Mon, 31 Aug 2020 06:37:05 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA362C061573 for ; Mon, 31 Aug 2020 03:37:05 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id 2so2909443pjx.5 for ; Mon, 31 Aug 2020 03:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mfpjLNeOMh3AoGlg/cBm2M9s7xEKtrK1kYZxmXAugcQ=; b=VtyenePqOxdhV0MVVlPJdQsA5HGnCipKBOLgf55Qg16/+dl+xSYlgXASps0s+9Dvxz QdKC4WCNGJL4D/CjFMPvEW4qVyMIspXh+UvcPTOk/tyPS0AMOR1p4dIU43W+2xGivU5x vkHNCs9r+sL0n6vTcc3t2LWhLkTp8i+Fa5YDvqILume7AlAnz3at8k+vSE5LlkBLgPU7 rehwyWe2/yglt2T6J5jqeYTbM7Y39em9herNEislQt/UWKCGOOiaIpetFacSXAv02gfk 3gkj3yDTit1RGmRW7sQRxSGTTw2K+sI6bJvQVzdiCnj9eR0jkyaapZPeT1tq97pVKiMU 1c0g== 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:mime-version:content-transfer-encoding; bh=mfpjLNeOMh3AoGlg/cBm2M9s7xEKtrK1kYZxmXAugcQ=; b=JVtVM40H2DV55BOq/M0tUw2Iq9K5KxSeaxQsJl2jF+a69r7dUW2aHKIyuOmfVgGNR6 m+xvHSmCbDEVZH8ano6MZPK2lgtTw4UDTkwUrGz8QBECJeGZn6K/OdpnD8xZej5MSwWn VBB2oqirahwd2WGP+ZI+3MjotnXFVMkQuRLHCQ6UZrFWHkrwln9UTM9PFI3oJs5Wf46J I4Squ4ReqsXCy4H06oXZw5SUkWllmytdEsxoE8w4IA1TVBqgtzRfojY27EC0QCjxF4V2 8tFVQchae97BghfooFV2WNLdsgy9tFhzE+tM7VEK5p0gt4mkd3b2s0Au6rx5bQ+mVy5N Dz8A== X-Gm-Message-State: AOAM530TqKFDEuRontmugh3JT03DAIjGGpXESAubLQFXVaipyvo/aL6K BpbA6erkr96fPAc2gZlOZJM= X-Google-Smtp-Source: ABdhPJwWeR6Cjg7zGdL/hzwkStfpTHSapfNK41kJSIDQLcmt+7A/ZkHKU5y+zPvFqd0fwYsQMfzZKg== X-Received: by 2002:a17:90a:39c8:: with SMTP id k8mr829436pjf.19.1598870225542; Mon, 31 Aug 2020 03:37:05 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:05 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 12/35] dmaengine: k3dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:19 +0530 Message-Id: <20200831103542.305571-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746065 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39F14138A for ; Mon, 31 Aug 2020 10:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23EA020EDD for ; Mon, 31 Aug 2020 10:37:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bkJMTsVE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHaKhN (ORCPT ); Mon, 31 Aug 2020 06:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbgHaKhL (ORCPT ); Mon, 31 Aug 2020 06:37:11 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BBCEC061573 for ; Mon, 31 Aug 2020 03:37:11 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id v15so376869pgh.6 for ; Mon, 31 Aug 2020 03:37:11 -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 :mime-version:content-transfer-encoding; bh=Bcs8JsY906p9sVQx2Y1h6Mu+4edvE8Y3MxMSl8WvT/o=; b=bkJMTsVEhzR4tT17N5NgVTQn2p+1TckdpLKu6xioPCmpD5vcN8dW3H4uxEB9ROA6I4 fsoMLAjRQ/s8WrsfzQZ/V+RvkbZqZvJs27fhX2uWAK02agIb9kLwUAraoeAtARFOmGu5 IrHGOZcvOnj0mjOqr5e8WKthn6PiubSe72HrSKe1fjEQ2MfCqwxFC0na6fV1KYJXZalF L8tbTKA3usq9B5a+kcKYKnj4hEoXn/rhT2owVk/zNrUuxz75j+9g4JLYS6b5ThEblnLz EBAoAL9EMdntyEwe/2lJL61yE+n37osjaZ0M7v2xOQICLqTTVFmli5rDYAqwDUYXgJMT qPzw== 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:mime-version:content-transfer-encoding; bh=Bcs8JsY906p9sVQx2Y1h6Mu+4edvE8Y3MxMSl8WvT/o=; b=TVWgNEREz/vaTKUPD25kPzabvElbzYaD2/tPeJos9XU7lbfmFnpf43rXas2Q3vi4Vc juoAvddzwoYxEElKYUa/Zho3uoaTfUWaVpAlMpi6q4j1t1PeuTCI/XNWyH1yLuC1n6an TfpMMdIk8PaaSDBgh5ZD99+Pcvj0WnRvmTks2j8idK3pEYRqQXRkHVgNdZyGH7UjfBxl wvKJ6NdEHRQyVxWXDbLGNZTy2qLHpvd3GE8cGtNKLolpASALneINgtJMmIPCGu76QbSM Rf+qM2DhM5VS7L18lo/HeVNr0Pac5snJH4jrYi+v05bLkrb5GVsiXsEjlXrWYqY7rsQO C6YQ== X-Gm-Message-State: AOAM531ta6x8RtO/aI72+gt6ghTCrMfMmCCLsPz+dNIvi44nW4MzWoWa FzKrbmQEmbUWICZmLYEApIQ= X-Google-Smtp-Source: ABdhPJzvlWTvpJ5wdKyCdlUzVwHA6Hev8H6cupedYynmMPDjc1dUJrT+aUEOFnYA7w3HjLnPW/4tvg== X-Received: by 2002:aa7:9aa4:: with SMTP id x4mr631149pfi.141.1598870230766; Mon, 31 Aug 2020 03:37:10 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:10 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 13/35] dmaengine: mediatek: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:20 +0530 Message-Id: <20200831103542.305571-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/mediatek/mtk-cqdma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/mediatek/mtk-cqdma.c b/drivers/dma/mediatek/mtk-cqdma.c index 6bf838e63be1..41ef9f15d3d5 100644 --- a/drivers/dma/mediatek/mtk-cqdma.c +++ b/drivers/dma/mediatek/mtk-cqdma.c @@ -356,9 +356,9 @@ static struct mtk_cqdma_vdesc return ret; } -static void mtk_cqdma_tasklet_cb(unsigned long data) +static void mtk_cqdma_tasklet_cb(struct tasklet_struct *t) { - struct mtk_cqdma_pchan *pc = (struct mtk_cqdma_pchan *)data; + struct mtk_cqdma_pchan *pc = from_tasklet(pc, t, tasklet); struct mtk_cqdma_vdesc *cvd = NULL; unsigned long flags; @@ -878,8 +878,7 @@ static int mtk_cqdma_probe(struct platform_device *pdev) /* initialize tasklet for each PC */ for (i = 0; i < cqdma->dma_channels; ++i) - tasklet_init(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb, - (unsigned long)cqdma->pc[i]); + tasklet_setup(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb); dev_info(&pdev->dev, "MediaTek CQDMA driver registered\n"); From patchwork Mon Aug 31 10:35:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3376E138A for ; Mon, 31 Aug 2020 10:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CA8320936 for ; Mon, 31 Aug 2020 10:37:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hngzz/vp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgHaKh3 (ORCPT ); Mon, 31 Aug 2020 06:37:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbgHaKhQ (ORCPT ); Mon, 31 Aug 2020 06:37:16 -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 63CB5C061755 for ; Mon, 31 Aug 2020 03:37:16 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t11so2829180plr.5 for ; Mon, 31 Aug 2020 03:37: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 :mime-version:content-transfer-encoding; bh=tOTI1twXkR9IST37RK4t1NWadLD5UjwHaqtPbpGaV5Y=; b=hngzz/vpDdBMejfS7dkv8Y2KTe879hj3q+vK+GU5pRWgBjR1DTkeyy9QtIi4IxzBNe GLK12RGsHJciSM4ci2Btz3fQX1qXRdnZGe/QM/cpkGrm/YTwA7so2SbOj9QoiXEbi1Fj 42653u59nIoCNpi/RoEYXQrKNxF5aNcOhPYthSK59RK9Jb2FV5QHWTAdJqVKCrLCUPuj fM/TU4GpbmXGBJRCfqnVL2Df3MknR4HeE9ehixXHBHdrXJ8jIwDg8mCFA0hU3WXbTlLr M4gQ65iwQIjLu6zDYG0vXCdqOGquz9qJ+C3a5UuHuUzasNWBdHR9DTOApeZP4G6QVqDk klUw== 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:mime-version:content-transfer-encoding; bh=tOTI1twXkR9IST37RK4t1NWadLD5UjwHaqtPbpGaV5Y=; b=STOmpLkoUfBvUg448guHQYgFcsVJ/9va6gdCWkz2TlcpDu05jdS2YuvAuvqPgI9vNe mc5rgl36HzDTKCpOa1MabkpdHs3B7euMqZeqPSEgU96SAOvrWcRKvsszOv+nCMi8cgYP FeoMwzZr4cV+FkhkqnkiHPzahc4E82zNBxT6/psrGESQTT0VNiie4LscCG4LmoCjIXQa MyGUr7zr5d3o6TE9b6Efoz6V2DnrEm656fd3ZVMkQeL13zev+NFi2RMg2vtYJTmBve5e QqRieq15PT7Y//FlRL/ld0bLIjoBa7p+dqzQf2zzIj0hSlBNHeELFKDe8sO5ztVyTV1u 8ygg== X-Gm-Message-State: AOAM533t5vSYk54AKepIBm+PuhBRhKVja+yzKa6Gz4ZgBKM1jCvh+7Mr xWRemYtsrSYBtkTfRBsjApc= X-Google-Smtp-Source: ABdhPJw7k9FOSDCeHu2T1iadTJtQZCQmdo0QD3KOBd+tErrN8DzZGP9fig5YZnHnS+uz545VLFeM0g== X-Received: by 2002:a17:90a:f28a:: with SMTP id fs10mr744943pjb.219.1598870236000; Mon, 31 Aug 2020 03:37:16 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:15 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 14/35] dmaengine: mmp: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:21 +0530 Message-Id: <20200831103542.305571-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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, From patchwork Mon Aug 31 10:35:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746069 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D046161F for ; Mon, 31 Aug 2020 10:37:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3609F20936 for ; Mon, 31 Aug 2020 10:37:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LJ3F7FEx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726142AbgHaKhZ (ORCPT ); Mon, 31 Aug 2020 06:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbgHaKhV (ORCPT ); Mon, 31 Aug 2020 06:37:21 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DE64C061573 for ; Mon, 31 Aug 2020 03:37:21 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 31so362686pgy.13 for ; Mon, 31 Aug 2020 03:37:21 -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 :mime-version:content-transfer-encoding; bh=1SRn9uG6B6BHuX88/+wpU7YnuoHcjOxEDg5HXyA8SPY=; b=LJ3F7FExYdmyKfhyFY9hHlzygRjO7ifLUZUkgatICduxzlAkQ0KsKZAvb1+pL+5+Ji gEg3vWW7pH5G/kwabOcTtb+RiJ5Iuw6gaMfCwEtw+p8oIPUrRUsUzeepc9hxAvadUUk0 psGZUbQhJogqUo5yPPMX10U/Jpia7swtUL488l36ojho6rqTjykCZ4ErxzUHQXXIC0d+ 6xj7VmZgFE+Q/5RBesODCeX46o+H1Y0bi03jShisMXbkIFVyccpaEe3BJw2LHxxXutJF gCxqo2xn2IvxAml2eztzMx97DnwiOz05xbgf3Obc6sOImvQp9XPdlJ2LVDpEnGFUAMqM 95tg== 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:mime-version:content-transfer-encoding; bh=1SRn9uG6B6BHuX88/+wpU7YnuoHcjOxEDg5HXyA8SPY=; b=LTEYGFTWLFxGoTxt/fXe7rvcd+BLoi5qoZQn6AR6seLAOjgd3XXt6kL9XULBZERQHn z23L38MbvkJlwXhLzs53SlAR5VEL/0oU4AwsCPuvuMYgtGjRvSV6fgAK7vc0ghnEgJ1D 4p+Ni1za9+s2/aeJD4qAkNhpcNoEqJZ1kYhrfNhnNymTLFqbu0X0c+5LBu8EWrgZvrWc ORh98Sj/C+j2KXlKNj0qoBvVMNP1z97WMlSZxMJPsNghNioXJtz1ei9RfBdxvVpEENEx yM4YRpl3AI8demq/3DxrdASYsz/N9FWj/eFb1GPaeUu/wMm3y21NhhNS25h7Y1qKEK2T oN4A== X-Gm-Message-State: AOAM5300sbOquvlZyEzVOV9492WBkgjNNjUcQLmkwLIup++i3C3O4Z8X 1xrcAwyUeiv9+Ut/CV/y/sI= X-Google-Smtp-Source: ABdhPJxq1FBSUE4p8fbyExQ6+pxerVoM31FAmuVNGQrDJfI7GT0BEOhPD2E/VojCoTdwkJxZquXBxg== X-Received: by 2002:a63:33cf:: with SMTP id z198mr784281pgz.348.1598870241223; Mon, 31 Aug 2020 03:37:21 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:20 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 15/35] dmaengine: mpc512x: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:22 +0530 Message-Id: <20200831103542.305571-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8852D138A for ; Mon, 31 Aug 2020 10:37:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72C9020936 for ; Mon, 31 Aug 2020 10:37:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MQyEA9/7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgHaKhi (ORCPT ); Mon, 31 Aug 2020 06:37:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbgHaKh1 (ORCPT ); Mon, 31 Aug 2020 06:37:27 -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 E07AFC061573 for ; Mon, 31 Aug 2020 03:37:26 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id q1so2747952pjd.1 for ; Mon, 31 Aug 2020 03:37: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 :mime-version:content-transfer-encoding; bh=3YQfJ+Sb0Q5/2M2e0heN4P//qipJlVXjh7n6mVCID2I=; b=MQyEA9/779ut0htXTcYvI5VFs1Tdz9xiEN9mEFxUNzn9O0fm1KveFOdThZga4bpHJU J4BdB0o5IJnEsSX77vNyHz/DTE4JJuBH1o3ljMOAtn7Ly7bM0KeSyXR/kupYcwmgEyEQ paBhNBj811e04fmye3L18DsYm4e/KSlDJrV6+i0c9Mj+sy5/yz9vnTJuugeR6JV1Lm2b 86u2Bi444gUq49RcdOH8d7fE2b2DAoDV1K7+qMlACtLnrHb7G4ywBjcUB/bX7G5tYonf wKOfFbSjamj8remMAbzNQXdebBjBUdtwNy4mxtXVpA6LWUdcdcvSqwSU1dp0ijXE/UUa +nww== 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:mime-version:content-transfer-encoding; bh=3YQfJ+Sb0Q5/2M2e0heN4P//qipJlVXjh7n6mVCID2I=; b=ErNIL24Mhik+0TKDyLpByhw/zbIiDQKOdP/GCKZeLBKX9vqbQVZXwZvz+yQR6tIwBc d9PLdLKm7TMc2WY1EumiXWTsje8KDZDh+0B52icMgc/jfHCq4I5JpZf4ZvZk+xdWMzqr 91FJ6uCXRLEi9BSimgzVSbTYsTynNkCkehL1LXXDFN0VM/xsIEZs7ve88xpkNB19EZf1 6Pby81n9HggZWsFh8a6aEiIIghgVISkKi/lUnyXbye2I0NVOU4Y56HjrS+gRteo8yD1B 6NRCEJbXCJGQlnwOSAg8GZJZsStb7QHXEMmQ373w0RppafHZGe458v53K/HhQzpD5v7Y Hrtw== X-Gm-Message-State: AOAM533gcTkVobg2gNMZWwRsO/OD2PfDd2BulCNtFIyVyD79bRkHCS6M ZIsn1rPwXklUp2KUDu4XRy8= X-Google-Smtp-Source: ABdhPJyIzXh4jnJwAt13ZHTLy+A2PmL7plvF8w1Q8Y2ufyENs+NFdWiNqimko0msQg947NQ0Ar1+RQ== X-Received: by 2002:a17:90b:885:: with SMTP id bj5mr739857pjb.133.1598870246454; Mon, 31 Aug 2020 03:37:26 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:26 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 16/35] dmaengine: mv_xor: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:23 +0530 Message-Id: <20200831103542.305571-17-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/mv_xor.c | 7 +++---- drivers/dma/mv_xor_v2.c | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 0ac8e7b34e12..00cd1335eeba 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -336,9 +336,9 @@ static void mv_chan_slot_cleanup(struct mv_xor_chan *mv_chan) mv_chan->dmachan.completed_cookie = cookie; } -static void mv_xor_tasklet(unsigned long data) +static void mv_xor_tasklet(struct tasklet_struct *t) { - struct mv_xor_chan *chan = (struct mv_xor_chan *) data; + struct mv_xor_chan *chan = from_tasklet(chan, t, irq_tasklet); spin_lock(&chan->lock); mv_chan_slot_cleanup(chan); @@ -1097,8 +1097,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev, mv_chan->mmr_base = xordev->xor_base; mv_chan->mmr_high_base = xordev->xor_high_base; - tasklet_init(&mv_chan->irq_tasklet, mv_xor_tasklet, (unsigned long) - mv_chan); + tasklet_setup(&mv_chan->irq_tasklet, mv_xor_tasklet); /* clear errors before enabling interrupts */ mv_chan_clear_err_status(mv_chan); diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c index 9225f08dfee9..2753a6b916f6 100644 --- a/drivers/dma/mv_xor_v2.c +++ b/drivers/dma/mv_xor_v2.c @@ -553,9 +553,10 @@ int mv_xor_v2_get_pending_params(struct mv_xor_v2_device *xor_dev, /* * handle the descriptors after HW process */ -static void mv_xor_v2_tasklet(unsigned long data) +static void mv_xor_v2_tasklet(struct tasklet_struct *t) { - struct mv_xor_v2_device *xor_dev = (struct mv_xor_v2_device *) data; + struct mv_xor_v2_device *xor_dev = from_tasklet(xor_dev, t, + irq_tasklet); int pending_ptr, num_of_pending, i; struct mv_xor_v2_sw_desc *next_pending_sw_desc = NULL; @@ -780,8 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev) if (ret) goto free_msi_irqs; - tasklet_init(&xor_dev->irq_tasklet, mv_xor_v2_tasklet, - (unsigned long) xor_dev); + tasklet_setup(&xor_dev->irq_tasklet, mv_xor_v2_tasklet); xor_dev->desc_size = mv_xor_v2_set_desc_size(xor_dev); From patchwork Mon Aug 31 10:35:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63D28161F for ; Mon, 31 Aug 2020 10:37:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B82C20936 for ; Mon, 31 Aug 2020 10:37:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Llbt895g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgHaKhj (ORCPT ); Mon, 31 Aug 2020 06:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbgHaKhd (ORCPT ); Mon, 31 Aug 2020 06:37:33 -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 27D6EC061575 for ; Mon, 31 Aug 2020 03:37:32 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id l191so379270pgd.5 for ; Mon, 31 Aug 2020 03:37:32 -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 :mime-version:content-transfer-encoding; bh=/q+jN7eUmJ+jsCxGtL0suK3XAr3/P3hSWNfyxsfbPD4=; b=Llbt895gSsADzv7hOlLR+iGFUpfoxdk5EoKriMvfkYPegqllHMm3fbUynhh0BLI4Q8 r6L2Ekasc6x1AY7X42PVOWFFuCHJ0uWS+QAG1/qmwGkHiKUxsQokrDHwtuByhLIjRZ1F x3gbD3T0zmBqgOBqnYRvL14LH2sNlQl8r1RETUVuYoLDp6WBn63q8a+iNPRWG54kQV0V JG9HlhbICqn6jbHYqEK5AD1ObDzQ5SbHKd1OyB+cHoX0gYVvgX4c3vg6yNAswTGU+YzZ xv8STlWyafiJtTvgUFR8DKXvss2lHw1DZawBSd3fh6WyU5nx1xx/ltlV8EEHoEG3KlRA SLsA== 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:mime-version:content-transfer-encoding; bh=/q+jN7eUmJ+jsCxGtL0suK3XAr3/P3hSWNfyxsfbPD4=; b=q8HwPQfub0QI0vIVkNlSAC5CO/iPwJPOLajObWy2RtzpX8NLn0l4kxYembFS8kSRoT 8njNytVNGBnqULYR5vgzYkDtlfSMuhIcoBI5IVazdk5kN3etmospvc9iG6JEEb+75W06 55opBCJN24L5QaUBmUtZVwuNu4rtfH6RMwyOmfQRR8YG9XrdWp7wOLkDYyp4WpTFSLv/ F4tYNsGHvFoLt8++AFR7+UYWTSH8aA9Tocz3N6TU3ZO3lb+zbqC7SLGzsMZsbgdjDi2B UU/LitN7/JXseqXJW+u1aLIk4uPQ7c/0p32q22mBSDQoUjJIE0sY1f8UaQUa0nbHAyU+ G+Bw== X-Gm-Message-State: AOAM532BCP+tni4FKK+D8tman1dbPJn3Nvs6lO0YuJMVEkfAPAOqooX4 ZtNoDLMp3uvJ6Aa96IVtR60= X-Google-Smtp-Source: ABdhPJxkCZFVDUzS4GunkEvuf2ibzAtVT2E6yA2AAklLnQM+rb/gQBkkKFvokjVM4cecwYB1DhxtNg== X-Received: by 2002:a62:5212:: with SMTP id g18mr756641pfb.8.1598870251777; Mon, 31 Aug 2020 03:37:31 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:31 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 17/35] dmaengine: mxs-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:24 +0530 Message-Id: <20200831103542.305571-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8F41161F for ; Mon, 31 Aug 2020 10:37:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 908352083E for ; Mon, 31 Aug 2020 10:37:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EpQCSmBV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgHaKhk (ORCPT ); Mon, 31 Aug 2020 06:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgHaKhh (ORCPT ); Mon, 31 Aug 2020 06:37:37 -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 62A0CC061755 for ; Mon, 31 Aug 2020 03:37:37 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id 5so381287pgl.4 for ; Mon, 31 Aug 2020 03:37:37 -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 :mime-version:content-transfer-encoding; bh=ZZYdafVz5V8oniNxBBRSsVonTbPwIZcuQC3+ufpV9Xk=; b=EpQCSmBV6hx5qH4Ktm7KK9nPZt00x9+0YrRHR/bRM+PB9gONq3BS/duPLTz4bTFWyu HMKY6VHnoweXmQYvKplDqiEXWeL3dDqqXF+E0cYQGy0AbTDxZjYN2ecgEOw8czxR2twj FiJZFU2yv8tVp5Uaidav9Q6gs6/t4dtnp+YekSWXqobW+dyZ/urTQvWrOWa+AAhVKd17 PWdBfUoWJmyJIKIsBc2PJpulGmsmiHDc5/2MUSCJYbB4vbeCtG8SL1yo7dChDm20YD7M ZOtcTOQDPa7jt7qpZyc1R9lg7or1ZNEPK/GmsFVufcQox4XMTr4Ia0eo7+jA8LwMricC VifA== 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:mime-version:content-transfer-encoding; bh=ZZYdafVz5V8oniNxBBRSsVonTbPwIZcuQC3+ufpV9Xk=; b=FeVKnbu5VL7zoLh1M7nJAK7pI+8cKuVivOd1iFf6Z1jrYnhn5H4Dpkrb9m6AF3WajF IKMT+H9Uo+tj28+WvfayKBYRGkVfbuI25WrdkXKjvQF8RSfNIop/3WAzpcuG5PAHtP7i GCzxSx8DTyAzeldCLhDMnCXAHFcuhz6Km8YvY0ueufk76qurj/kbmhA3mRMV9BbsmO+C +4t6lzXnIoZ1lQJD3C2HjuXtI44wjVVpMJ4UfT1acwberY4t+1NNa4ktxEvxHbLDlHk1 hui3GHvYtO64X572PFsZe4HiyOpumh7uwlyguYP4zL1hCp3sldXwFgYkyHQKZ84aOalm FW6Q== X-Gm-Message-State: AOAM530Q8XQZltP9BWkG3YqBEZfbh+aqtoFuf0OFNP5yC2BAGCxNmH6j tEctbMOMJeiFMDjKPNpv5NLryitaDeqJ6g== X-Google-Smtp-Source: ABdhPJwWZPLL3bZXY2IQigXynHJ+6gdL0FEIFoog4XUvJlulD30Hcbhim5iW4MS7O4Amg/OY+ADC/g== X-Received: by 2002:a63:5b05:: with SMTP id p5mr59670pgb.154.1598870256984; Mon, 31 Aug 2020 03:37:36 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:36 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 18/35] dmaengine: nbpfaxi: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:25 +0530 Message-Id: <20200831103542.305571-19-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/nbpfaxi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c index ca4e0930207a..9c52c57919c6 100644 --- a/drivers/dma/nbpfaxi.c +++ b/drivers/dma/nbpfaxi.c @@ -1113,9 +1113,9 @@ static struct dma_chan *nbpf_of_xlate(struct of_phandle_args *dma_spec, return dchan; } -static void nbpf_chan_tasklet(unsigned long data) +static void nbpf_chan_tasklet(struct tasklet_struct *t) { - struct nbpf_channel *chan = (struct nbpf_channel *)data; + struct nbpf_channel *chan = from_tasklet(chan, t, tasklet); struct nbpf_desc *desc, *tmp; struct dmaengine_desc_callback cb; @@ -1260,7 +1260,7 @@ static int nbpf_chan_probe(struct nbpf_device *nbpf, int n) snprintf(chan->name, sizeof(chan->name), "nbpf %d", n); - tasklet_init(&chan->tasklet, nbpf_chan_tasklet, (unsigned long)chan); + tasklet_setup(&chan->tasklet, nbpf_chan_tasklet); ret = devm_request_irq(dma_dev->dev, chan->irq, nbpf_chan_irq, IRQF_SHARED, chan->name, chan); From patchwork Mon Aug 31 10:35:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746079 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FCE4161F for ; Mon, 31 Aug 2020 10:37:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A3C820936 for ; Mon, 31 Aug 2020 10:37:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FP1XLmh4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbgHaKho (ORCPT ); Mon, 31 Aug 2020 06:37:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgHaKhm (ORCPT ); Mon, 31 Aug 2020 06:37:42 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3ECC061573 for ; Mon, 31 Aug 2020 03:37:42 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id s2so2740125pjr.4 for ; Mon, 31 Aug 2020 03:37:42 -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 :mime-version:content-transfer-encoding; bh=1KOhGV1Rna4c8s/7Lc6zFb2hqJM7f3JOucj0osRX2mU=; b=FP1XLmh49SKsQdgFA/KV/CVEf1OMK0D64hIO2OIAWerQLl6IbiHaUdqR6LDjLS7sF2 fEiD0RFk+SKc6tbN1SQ3ykOyNetgpepnp+Rr4fRp0Y67e9xyr0cz2GkeGDHrCvYGMK7A VtPbkKMgqn6Ucq4ZwDDfyw+ox4CHsbqz6O2RNm80ryepITEW57TUIcd/OyJdtW5Cj10x u/gfUZ5i7w+8amOjOu+Ocd6fK9oUGPZ0P0//L+8O1yc25VvagJsj1/NnLAtCG0Vaq2J/ wvqG0GJP3XdNqKPjwLmpENNTbwsD5URQFpYp3GMORmX0yiZkw9nXiIdbrm9PzbVhxy/5 yK3g== 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:mime-version:content-transfer-encoding; bh=1KOhGV1Rna4c8s/7Lc6zFb2hqJM7f3JOucj0osRX2mU=; b=JzhiDpfkg/rtZfP4ct7Xs+QaEbYe1gKPtUNLtVg43E5BaETFHQlUj2VNNxbrSTtOfN tY0KvAYr/euYfaM81DaoN2BL0bPfTuQgPewE31GmJKkGZnbObdaLThZyXSQmaEwudq+D NCgYB1SvHhimNJEWryWTkm/ZaJdXclaJTWTMIfLf++HJ/5S3gEvjtlWom4HB81C7WABQ /OI8jopwyYP3PF+mYdhuRxubLFyY70BALdKX1SQjXrDOlZSdSpzGxSOuLpiT8pGCCgex 8PoZxk/NdkBH/ZwLCwyC9ofx5aPaNqvMYnp504jIya0jBDvzwZgpikLKhcedDMgG2CtN A/LA== X-Gm-Message-State: AOAM53069oftgEox+9lC4O1WWSOiCqYmE2lldaaZcThNCeXhK0YTd+pT f9T1rzRAlBJl6Rh9Yyl2akU= X-Google-Smtp-Source: ABdhPJxsHA3TH3WFQh7A7mGufWk+zLjdcdhEGZYQpBF0PlbwRz94R7je6suPipG4l63CJxRZ1++zKA== X-Received: by 2002:a17:90a:bc96:: with SMTP id x22mr851901pjr.164.1598870262330; Mon, 31 Aug 2020 03:37:42 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:41 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 19/35] dmaengine: pch_dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:26 +0530 Message-Id: <20200831103542.305571-20-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/pch_dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index a3b0b4c56a19..0cd0311e6e87 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -670,9 +670,9 @@ static int pd_device_terminate_all(struct dma_chan *chan) return 0; } -static void pdc_tasklet(unsigned long data) +static void pdc_tasklet(struct tasklet_struct *t) { - struct pch_dma_chan *pd_chan = (struct pch_dma_chan *)data; + struct pch_dma_chan *pd_chan = from_tasklet(pd_chan, t, tasklet); unsigned long flags; if (!pdc_is_idle(pd_chan)) { @@ -898,8 +898,7 @@ static int pch_dma_probe(struct pci_dev *pdev, INIT_LIST_HEAD(&pd_chan->queue); INIT_LIST_HEAD(&pd_chan->free_list); - tasklet_init(&pd_chan->tasklet, pdc_tasklet, - (unsigned long)pd_chan); + tasklet_setup(&pd_chan->tasklet, pdc_tasklet); list_add_tail(&pd_chan->chan.device_node, &pd->dma.channels); } From patchwork Mon Aug 31 10:35:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746081 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C401B138A for ; Mon, 31 Aug 2020 10:37:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD1F520936 for ; Mon, 31 Aug 2020 10:37:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OhcaK6N2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbgHaKht (ORCPT ); Mon, 31 Aug 2020 06:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgHaKhs (ORCPT ); Mon, 31 Aug 2020 06:37:48 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EBB8C061573 for ; Mon, 31 Aug 2020 03:37:48 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 67so366443pgd.12 for ; Mon, 31 Aug 2020 03:37:48 -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 :mime-version:content-transfer-encoding; bh=YUhAC5YxMZoBlpymep0zvE0KP2mCOGeZ0UjdaDRAwfA=; b=OhcaK6N2hlgnk1Q2RrjBmwQZfGYXDSKvCNe8ItIwvle/YB1K3eQ/1ZDkha93CJIBwK jzWVbMCPFZd46I7ivlX/k+3Bm7iELyKhayoXe23pbbHB+zHto/j6wXk+XblC3a4z3cvw eOpBT1BL81QnJVyPsMcEZKgToWWas72B/ajhIkojImw42XRjgU3FVmnEceynPg6HFCHI WaOLy+P0aOdEdkYYsAvLQWmbPYyDe0kNZ0Ua5x3TueRf81Ky4fl5Dp7+eSYOeCHspThx D1K7xmkhauI5isockYTtIdrY6gaqK69R8iCvF++n2AWwqoPFQp3Xx9/Ync+RhqNhkUO6 MRmw== 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:mime-version:content-transfer-encoding; bh=YUhAC5YxMZoBlpymep0zvE0KP2mCOGeZ0UjdaDRAwfA=; b=W8paNI5jhIxQVQvb8RiDL18xs1Dw0xK3uvu88BG8hJgOzSPyHN/rmhemyq+lM5MbHo EAYObQjlPrAvBiETuq7c0TW0IEmVdSfECpsw7LcV9r+F+lfeuY+SHnK04nKLOfNsrMf7 naq3cALzS6frWZXBYZC0SPwikAQUBEvtb3F7HBG6fQfbFMT3i9Hth9n4UhXyPRT6aiBG 2OsvDox5W8HYS5+BP6HSnYh2801DAU7DdbcBY0Ia3tggNfqEPsVKS3gPHbtzW/o6HNFA QziNc5XMeSvP45IuFZeSLyXkBBY5QBvqWQnXE01L4CE+OAwO/uKXp6bqZD9t1iy+QX3J 72NQ== X-Gm-Message-State: AOAM531e/pIGYQAwYLmGyAyBKE/5NP4fy778N6qwFaNYLHz/UpLXtEI8 0lQLMb7rUBcK3X5L3sZwIt4= X-Google-Smtp-Source: ABdhPJzMekwFdMDsENSZ2EmotS3+AWdDzVQdcapISxsO2LfcrowaTtddxmetzle+lvfmbpIVjVhCJw== X-Received: by 2002:a62:6dc1:: with SMTP id i184mr748687pfc.57.1598870267634; Mon, 31 Aug 2020 03:37:47 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:47 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 20/35] dmaengine: pl330: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:27 +0530 Message-Id: <20200831103542.305571-21-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 9b69716172a4..1e9a38139aa5 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1576,9 +1576,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; @@ -1982,7 +1982,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; @@ -2065,9 +2065,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; @@ -2175,7 +2175,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 31 10:35:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746083 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC953138A for ; Mon, 31 Aug 2020 10:37:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4C222083E for ; Mon, 31 Aug 2020 10:37:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XGKHgCAq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHaKhz (ORCPT ); Mon, 31 Aug 2020 06:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKhx (ORCPT ); Mon, 31 Aug 2020 06:37:53 -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 43998C061573 for ; Mon, 31 Aug 2020 03:37:53 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id v15so377747pgh.6 for ; Mon, 31 Aug 2020 03:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X4SDrq7HnKkUYae0qk/zKfsqOWvUrO0HJ9v060n8FOA=; b=XGKHgCAqH1AmLGsk2vERDFvjY6cffH8ZE+0VmOgGnDC7wDEyc9FeXVQSEi4NNW0NXj 9gfJcfgHqA6B8r2Fb/YnDAm4FTuMyFELqq7Utzvn28Rrei6qGs5Qhn7SbsD30j5lFbSD xpNBCYcFW6wRhlpQk5T381bjBmK1HgBQfh86B/xNLjVxmLdOfrIpcv9th7aRE5esPqrT w5AZ6PrDb+c+EUrJN4+fTtWGRgC9OnODS/Hw80V7I8/Pk5nVlmjYyuVLYtO3QxrclN2X /IkiayudOkpsh/q9bhU2/p8TZYjpPYC0KGSGCnkmC24sDaXJWvP0HpGb0WlPFfNww5ng 7ICg== 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:mime-version:content-transfer-encoding; bh=X4SDrq7HnKkUYae0qk/zKfsqOWvUrO0HJ9v060n8FOA=; b=rtCzjx8Jxet3hfIzasMlX3/ddNCSbR2lNrGF2YP0iUGHg9nQPa4ozsxsui6+NxEoUt GYNVgKsJrpIIz2LPxin7QRWiBuZ8QjO3JHP8b03TgfTE7AMnxoqj2xq+aRgAx215z6Um qs8blUasQP2E5PQFrhnGJnTApEvTG+/u2whVYAjHbAhuhfedhkrNJXssxpP9LBklCt8X tNgeMW/glY/AD5JMjLHDyGKzCb7p2LL6cN1Z9Y0aeymCfqJkhwrn4qo+EoJR3a7J0a7U O8oliDX+YE4dqruf/kizbINnrGgPFYfM4UDo/tnlTzWOsTKU0CdJ+B414KPnhU3AR3zw 1fKg== X-Gm-Message-State: AOAM531zol/HqE9ev1hN5SMKRW1DUGku3pPvrt4/uv7b7l1CR7IVwvDP QlxZ6lnxoCAAW6eiWqeX578= X-Google-Smtp-Source: ABdhPJy4OAFo1nT+fncGlLYNh7Tynxq3TiYwxvHeSW3qPKDW1Ts8/4VSFqeknQNs0Y0QQwjHPbnvKA== X-Received: by 2002:aa7:9aa4:: with SMTP id x4mr633254pfi.141.1598870272867; Mon, 31 Aug 2020 03:37:52 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:52 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 21/35] dmaengine: ppc4xx: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:28 +0530 Message-Id: <20200831103542.305571-22-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/ppc4xx/adma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index 4db000d5f01c..71cdaaa8134c 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c @@ -1660,9 +1660,9 @@ static void __ppc440spe_adma_slot_cleanup(struct ppc440spe_adma_chan *chan) /** * ppc440spe_adma_tasklet - clean up watch-dog initiator */ -static void ppc440spe_adma_tasklet(unsigned long data) +static void ppc440spe_adma_tasklet(struct tasklet_struct *t) { - struct ppc440spe_adma_chan *chan = (struct ppc440spe_adma_chan *) data; + struct ppc440spe_adma_chan *chan = from_tasklet(chan, t, irq_tasklet); spin_lock_nested(&chan->lock, SINGLE_DEPTH_NESTING); __ppc440spe_adma_slot_cleanup(chan); @@ -4141,8 +4141,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev) chan->common.device = &adev->common; dma_cookie_init(&chan->common); list_add_tail(&chan->common.device_node, &adev->common.channels); - tasklet_init(&chan->irq_tasklet, ppc440spe_adma_tasklet, - (unsigned long)chan); + tasklet_setup(&chan->irq_tasklet, ppc440spe_adma_tasklet); /* allocate and map helper pages for async validation or * async_mult/async_sum_product operations on DMA0/1. From patchwork Mon Aug 31 10:35:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57BB0138A for ; Mon, 31 Aug 2020 10:38:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 402C32098B for ; Mon, 31 Aug 2020 10:38:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DcVx9Y6x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgHaKiA (ORCPT ); Mon, 31 Aug 2020 06:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKh6 (ORCPT ); Mon, 31 Aug 2020 06:37:58 -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 9CCAAC061573 for ; Mon, 31 Aug 2020 03:37:58 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id j11so2815078plk.9 for ; Mon, 31 Aug 2020 03:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1kndVuf3XgQoygeCo+RpOK5304Nin4tEnJh5Xe+1hjc=; b=DcVx9Y6xIpRyheS8BHhXfLOWVGOO6q3Y36PHXL7B9mAwlDOb4S5DRfeL9Lv13mtB9M 0IZ03+VFfUR/SlGAiIELc4BVpX+XM8wUjcLrCx57sHxxyKBC29bLfQT4XEme6zwfugT/ Or8g8PI6ugcNIpfHPbPzWShm6ETk335Pl65BTrzyoKwiATGHYBs6GkoA2VRuU0gSpnn7 DibJgkL5ucKU/0iERqOsOE0qw92+tYAyk7EdcKbkeeLL8fex0tf2Pmhbg+jDFTPsvtvN nWKlrTZCfkkeuX569bm+OX4IK1h7DnFB7WJJuw9oOnEZ0bAD4rYvD1R/CV0iMQPu7T4Z nTUQ== 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:mime-version:content-transfer-encoding; bh=1kndVuf3XgQoygeCo+RpOK5304Nin4tEnJh5Xe+1hjc=; b=He39/3fnt4VB1mPUIQFDFElku9S0SvcfOiK0phSY7r2GB+mcfEECNft7Tr5qzthXzL C+W5ecrFAIctCTI1gffKxKh4fuHftoDP635oDV8HNjvkbICl9xN8JmSC80bBiZF1/t5R iNPA8ZqLOFSOFPUlLr7ZBpbQQxzMINbQPvH9MEzvciyRcrEdoRo9VGGlBF7nwOdwOnRH Z3H6SezlKzvcpdAWQh2bJ4XuPfYLO1aMb/meAbbaM6afDz3P/VlSwBVHjY2XWU4uySbb uDooh+HOPeqwtTcTKY/idGgNb7SZn9QOwPhACA+nkflF72S2BeICxfrj1+vdilyf26og lF2g== X-Gm-Message-State: AOAM531tTXT91BDi+0orc0vDXIfpunxJdvB2icFzUWyj2aYSZJhjByJh CxChu4NLVq94FOjSthSk7RU= X-Google-Smtp-Source: ABdhPJwYriKWqWI7yi3pwRgEQA7PD5OrJhnz7ZkJoQ2ZsIEogkBD4L6D6wE0KXSzCxXv/QRS9Fp61w== X-Received: by 2002:a17:90a:2bc8:: with SMTP id n8mr783250pje.189.1598870278146; Mon, 31 Aug 2020 03:37:58 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:37:57 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 22/35] dmaengine: qcom: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:29 +0530 Message-Id: <20200831103542.305571-23-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746087 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72B38161F for ; Mon, 31 Aug 2020 10:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BB742098B for ; Mon, 31 Aug 2020 10:38:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eLsXeKCD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgHaKiH (ORCPT ); Mon, 31 Aug 2020 06:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKiF (ORCPT ); Mon, 31 Aug 2020 06:38:05 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5D14C061573 for ; Mon, 31 Aug 2020 03:38:03 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id v15so377926pgh.6 for ; Mon, 31 Aug 2020 03:38: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 :mime-version:content-transfer-encoding; bh=kF+5EmzIgniC513FnlQyviv1/SMov1djoUiBbesv88w=; b=eLsXeKCDI0V0cyOpFx3ZzYgcYmcxQ5kSyMvOhCXvABN/XmKDN15X/op2AwonJQvAT/ JUdhSmfR9JqwdzExHFUToh5zzbBc8Nf+vMoI20w7hTS6IgULA/ruQYVb0yC5/xAcmUnD mVCu6l4OGbXRd9d/SchDJRXzKQ3uQTadHJ8iGGFEKP/F+3caRe1pVPWrRQRelTfHSyYN 8AibhBqqUrwN9cQtT1xMSlNgPnF3aRH62a9smc+Ey7vwZ6TjQl3y6K06AjKZNC04CB8K sP72OjqLU5hJ77JHMeLxqXoJn2WgVPcOZG6G1hIH5QC8zXtHd/uTTITvGW1EuPe8nUGE Fn8g== 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:mime-version:content-transfer-encoding; bh=kF+5EmzIgniC513FnlQyviv1/SMov1djoUiBbesv88w=; b=NAqFXmrVRATfceD23zrXzhf+untdxYf5eBw1LyErTv8sY5zrfi39Qk/WbZKryWmNLu 5cq5uqfZJgorClNeKNyTLVVf/4t6zMU57po5FzriX9dgikUT4qXHaCJG0PAmAX6vfd4x stB6UZYqxZAPgpbDyMfLbsRX0GBHVH4X7tIbW80C7YMhCxKUqK+4MT5P6QUOjAqNLeY9 O+msiyMV01aSOmzYxanbqRplVOhwvqO3ld069/jRJSyZUVo+lPThGK2tJRRdAyph934j 7X28YvVJDqPPiY3q4Us5Yk2DnD1XNIxuC6YEgvc+u2DvIsNZWR5DrlYTFlewmlTlKj99 HZhg== X-Gm-Message-State: AOAM530jgv7ZSNS0WO9mW4H99ZeqRATF8WnZi9QKe5mIjTVxtJwWsaVT qQ42w8mNXKT2aWnDFRx55uU= X-Google-Smtp-Source: ABdhPJz74vTVxahk2jNr1WhuNGIT1bMHOzSNHX6Pj7PnkCUF1jvxxOkPok6D6INCGzHrdnvQAZx4+g== X-Received: by 2002:a63:c904:: with SMTP id o4mr685986pgg.99.1598870283427; Mon, 31 Aug 2020 03:38:03 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.37.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:02 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 23/35] dmaengine: sa11x0: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:30 +0530 Message-Id: <20200831103542.305571-24-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/sa11x0-dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index 0fa7f14a65a1..1e918e284fc0 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c @@ -323,9 +323,9 @@ static void sa11x0_dma_start_txd(struct sa11x0_dma_chan *c) } } -static void sa11x0_dma_tasklet(unsigned long arg) +static void sa11x0_dma_tasklet(struct tasklet_struct *t) { - struct sa11x0_dma_dev *d = (struct sa11x0_dma_dev *)arg; + struct sa11x0_dma_dev *d = from_tasklet(d, t, task); struct sa11x0_dma_phy *p; struct sa11x0_dma_chan *c; unsigned pch, pch_alloc = 0; @@ -928,7 +928,7 @@ static int sa11x0_dma_probe(struct platform_device *pdev) goto err_ioremap; } - tasklet_init(&d->task, sa11x0_dma_tasklet, (unsigned long)d); + tasklet_setup(&d->task, sa11x0_dma_tasklet); for (i = 0; i < NR_PHY_CHAN; i++) { struct sa11x0_dma_phy *p = &d->phy[i]; From patchwork Mon Aug 31 10:35:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0267138A for ; Mon, 31 Aug 2020 10:38:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 857BA20936 for ; Mon, 31 Aug 2020 10:38:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o/J4NkKp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgHaKiN (ORCPT ); Mon, 31 Aug 2020 06:38:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKiJ (ORCPT ); Mon, 31 Aug 2020 06:38:09 -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 2CD67C061573 for ; Mon, 31 Aug 2020 03:38:09 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d22so355791pfn.5 for ; Mon, 31 Aug 2020 03:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M2redf3QtPNMUj6PMpxlDcNyjHYnRscVHIcuwYgV2R4=; b=o/J4NkKpQwaFWev9oTqZPnFiRYqyasTek85/uxBF5CNjMvzdGRpDX5ht5zGoHogweH xeY13sSlr1GUoeu//y1xVFbxM1dmKLdu0LavCHR4aqrqPtCLHr7sK33NrtHr5aS4NlXO bY0n6ieK08IApc85P7PDnhw1SSdoFthavccLOj9Ze/L0Fq4qGcjH7ytwvldxZEqXJqIP R0b+t3WIhfXvc72qEazy6/yGn54lVjiyDUr8TzQCEOgmTg8PL4kGvYA71eZUm4sScPFB PI0FFu8vqPjXafJGl+zKElkcsTgCiUmyxjgBaDEtsqhFUtRDvd0Aj19HbADhFxAv2rmd g70g== 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:mime-version:content-transfer-encoding; bh=M2redf3QtPNMUj6PMpxlDcNyjHYnRscVHIcuwYgV2R4=; b=spTFaWJiToB1mSCxB0peO8Ayy5TxPnlZlc4ka6k8iZTUS0ElcUuTC6DDRd51ly2N8U To95wqWdihhfttzVqW5XEgZvdS/HAAV/oZttJG+Gb1vh/lGj+1imZSs0M+K4xhMzg9Px 72yPMyNuZ7/bzF0ilr096ArESQUf4szuPEBqdSw8E6MmIcbuO+AOxiUjDuAEKSIilRR8 IVyLmthoDOlsUDPlR1ybEmLL2OPV3khqaSNp4kf2wboT2sBNUI3E/KGlx8w/eEjkrUw4 QDVUlZ7NL9kAsuikyco/8EJVdVAoi88Y2Q4X0ZdOVjlhMsiPs3RHtuKrgKwmgjVAjUWZ +Q1g== X-Gm-Message-State: AOAM533nhtyP4Fpb76yTsB3JW/1R7kfejUphsDaQnKE6FCOGDr3dUwxy az7zQJGvETl9TjlAYwFO1NZNHRx7MpVoFw== X-Google-Smtp-Source: ABdhPJww+wnxIgZFS1i2LbfT4meonbDdfNuCij2flhXvXjJB1qUg7S34lTnv7WTdU9m5TpGWpODB7w== X-Received: by 2002:a63:7a5b:: with SMTP id j27mr747231pgn.78.1598870288742; Mon, 31 Aug 2020 03:38:08 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:08 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 24/35] dmaengine: sirf-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:31 +0530 Message-Id: <20200831103542.305571-25-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746091 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49D1F138A for ; Mon, 31 Aug 2020 10:38:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3176720936 for ; Mon, 31 Aug 2020 10:38:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aEeSH/zD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726507AbgHaKiP (ORCPT ); Mon, 31 Aug 2020 06:38:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKiO (ORCPT ); Mon, 31 Aug 2020 06:38:14 -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 64083C061573 for ; Mon, 31 Aug 2020 03:38:14 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id i10so388597pgk.1 for ; Mon, 31 Aug 2020 03:38:14 -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 :mime-version:content-transfer-encoding; bh=3EjQWuA4o0fFlB6s6vdr8ocrryUZe2bpIMOhyKU6Di4=; b=aEeSH/zDZ113mPFb8CdOlajdrmf4eOx8Z0Rk8DCUZMVwT/7tkkiDSK8qKreJhoGBNt NjsgE+VaMl4G9luGfl7AmthPFe9R6ug/gQUgMP0K4uO2WfwViMQo2XOVAgdJogZT6GAj edfu5Pclgcv43jOe5AXmI7t2R5DzbHVZhbDpT2lJbggexMezSu7CVMscYuL1j8+WfaTy s5HvCFbDUdX2Ct2xCR8WziM4bSzAeJaTAYlk5KcsSUV2CWguhLckki66TGWDcNjEbPv0 cbQSVXIPyl2m+vFLVbThL1TRYY6SVaIVHzDGHftlHaZ+xpKyWRvF0jANzT/SzUuG/3Bn 1LYg== 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:mime-version:content-transfer-encoding; bh=3EjQWuA4o0fFlB6s6vdr8ocrryUZe2bpIMOhyKU6Di4=; b=Jm+FBiEzuDICrQ1m2/ldAF1jwp97RlwaKhjRBdAty5yOcxoCGBAYltZWZWDBnYk95g m/aw/VkUfSUXRa0hLbWEWr7z60NXezVquWuLKl3neRdY8iKheOwuX1ycPibEOclh+kON ZNzY30KzZktZL8k95nzsf+T0OQv7arO44jd6DX/8nTGWp7HtG0GXGwatbVt4dKRvDbKW ILFcH4tC9QeyWMUfqdRb9D3UtgR4x+IH2XxTAPQFIHH2OjF5ZyNWl41Pe+kmc48IEfLf njHdKBJNYK2hscsVecDpsg6GVkqP65Jxr4F8p9yf2UmAadbdX21d0sY4RWUFlsGcjcaU EZxw== X-Gm-Message-State: AOAM531Y47hDMsNvpevF7lNb9goxE0Tnm7M8Ws1aOvqOmszmHK04BlOF U1FlfHLCwUkmx6KiB/HrqMM= X-Google-Smtp-Source: ABdhPJw3WkjqU1oFeFKuFBqJFcL27N7s5b1JXBAMyo9HmTjiqJ/nV+O0u7ZsgiQKBZPD62Z610FEYQ== X-Received: by 2002:aa7:8c0f:: with SMTP id c15mr788815pfd.284.1598870294003; Mon, 31 Aug 2020 03:38:14 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:13 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 25/35] dmaengine: ste_dma40: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:32 +0530 Message-Id: <20200831103542.305571-26-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/ste_dma40.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 21e2f1d0c210..ec4611ae7230 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -1573,9 +1573,9 @@ static void dma_tc_handle(struct d40_chan *d40c) } -static void dma_tasklet(unsigned long data) +static void dma_tasklet(struct tasklet_struct *t) { - struct d40_chan *d40c = (struct d40_chan *) data; + struct d40_chan *d40c = from_tasklet(d40c, t, tasklet); struct d40_desc *d40d; unsigned long flags; bool callback_active; @@ -2806,8 +2806,7 @@ static void __init d40_chan_init(struct d40_base *base, struct dma_device *dma, INIT_LIST_HEAD(&d40c->client); INIT_LIST_HEAD(&d40c->prepare_queue); - tasklet_init(&d40c->tasklet, dma_tasklet, - (unsigned long) d40c); + tasklet_setup(&d40c->tasklet, dma_tasklet); list_add_tail(&d40c->chan.device_node, &dma->channels); From patchwork Mon Aug 31 10:35:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746093 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8ECF138A for ; Mon, 31 Aug 2020 10:38:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0DA920DD4 for ; Mon, 31 Aug 2020 10:38:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OFNY0IJg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgHaKiV (ORCPT ); Mon, 31 Aug 2020 06:38:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKiU (ORCPT ); Mon, 31 Aug 2020 06:38:20 -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 A8A85C061573 for ; Mon, 31 Aug 2020 03:38:19 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id o20so344597pfp.11 for ; Mon, 31 Aug 2020 03:38:19 -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 :mime-version:content-transfer-encoding; bh=mKpwzGrdE8EpGNZD5pwonhuABYkMlUq+l/59IUCbMrQ=; b=OFNY0IJg4EmQlueaTOO15HfdSC7mvhSOQQEmRz6pdf6r4wKNdV9bpbiL+VNSs2kbUu l/os4F/gLnMKrmHzLF3BESviRW3XgsCfykwhqmhg5AEZmhmG481x55ToaHpCgHvp0Ift mAKpP0Re2jQui/CcM9cb5765Rrg5NhCn0GimQagLlvYIFWYIBYPAO2qXeEg0ypoG2ocH /iz7QDoOgrsSgf264D7DEZl/WL/EZCCEa8WVUZMkWJ3PgyZKrOhveY3T5+V0/A8I8zsl VLcfV7s91B2Ld+c7tkbGNIMQNSvKdOCIozHhEs5CHrvAdj7501g1NhOYFpbIJ+XZAbnB iQag== 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:mime-version:content-transfer-encoding; bh=mKpwzGrdE8EpGNZD5pwonhuABYkMlUq+l/59IUCbMrQ=; b=ILJGWGwWL2MtD9KURLG5H6mq/yqx+lRyrM3kRVeMCAhKxphAKKfd8tgyaqJOXZZgIk YD1XWQ9Wy/b1BkGdHNaXzrl87U1JOz+lCx15hfj2EL2rp2bKd1+ZvMt44dgnVtuKuoXj RkiWHWUzlzKS4uFhY3zaWGltviAr4lEEJnUZrFWJy70nXRWcYQpQojkWIeuonxxfRKJ0 bNSFsyhmeocqjtP3kUODs9aQ5O/X2G3fjhTkXvimALqIlQ8uLR1BXYM1LH9LIlKm+EqR uXnbQKs9/aFjWvxBQruxQv3EVzsUhAAfIw112sePwIIaXpHet/cgyf2NtcgE6nMJn+xK jH3Q== X-Gm-Message-State: AOAM532iN1I7+pvwJLHAhCMywqjYH+RlGGYJ8fNPMYLnJwfgf/+RcXu5 x8VaN/4l+PcI5p7Es5osc08= X-Google-Smtp-Source: ABdhPJy45b3yqXFddAR7+DtLtd6PvHW/yYVD1DcFfFMaP9LXq74E97G80M9R2eDcXDJEmqIBFDonlw== X-Received: by 2002:a63:4443:: with SMTP id t3mr785288pgk.9.1598870299281; Mon, 31 Aug 2020 03:38:19 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:18 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 26/35] dmaengine: sun6i: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:33 +0530 Message-Id: <20200831103542.305571-27-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Acked-by: Chen-Yu Tsai --- 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 31 10:35:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746095 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90373138A for ; Mon, 31 Aug 2020 10:38:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 776A02083E for ; Mon, 31 Aug 2020 10:38:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lYEV7b85" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726359AbgHaKi1 (ORCPT ); Mon, 31 Aug 2020 06:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKi0 (ORCPT ); Mon, 31 Aug 2020 06:38:26 -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 0B1E6C061573 for ; Mon, 31 Aug 2020 03:38:25 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id d19so370141pgl.10 for ; Mon, 31 Aug 2020 03:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pgEwvj7i2+hu2/IIg+Gx7oQ7N3Lu0iixwmIHoLUDGiQ=; b=lYEV7b85Kb9M9uvyEXxPlTRU7c0KuRkdP+jDP9rGxBVp/5F8HV+gFnqsXOFL4zUeMd 4x9WMeunZgTkhpbTeevWZgMTC0J67ZhKke0h1xDO/J7QxY9JIaHOOr62mfRiGjz5DH4b 5ob4fmFkSGUscHXB8gFYAvsiEKtGxzR4TcA0p027Kzwqa78s91OLhSEq3LfDJL3a7n32 2OF1ypHNbOiOFE1LANuoJ5fXgACFt8XA+WGICBONO6YXEP7VUTwTfZOT35SmNjp6ln58 lz1Q/hAYru7BmLm888tiS0QYXTRP/MHDQEFpWiZ3o9Kk3SE2n1LNqMhUSsxl0E6tglQx gAMQ== 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:mime-version:content-transfer-encoding; bh=pgEwvj7i2+hu2/IIg+Gx7oQ7N3Lu0iixwmIHoLUDGiQ=; b=rXdbmTfnR5h4GxQ9XRFcCJ0Wu3yB7G7bHC5BO6uIgYbFPvJU+OoAkeLBr16/hfRE0a FyAnpp9e7Zov39nAzGcvC+cdWA1JYCmOe5OUktV7QMH+NeP+uDmc3v3hWENj0weBFyiD iemyJ5fO1ZuwIbrvewB2PSi2KOBckqoL8+pUDx6VGyQNui85dn5q96AKANivBfaruzmg 8LQeCKNKwB9f6292bRCM8mMssvizA0NS3X/ZN6HQ31wwNUsoBfIF43vMcIXG7NRiTsBm cnsOEENVxz1S/WJyy0EE7/F6pyv2VqpfSOcZIC/A3ffKunhmxBHFc/UV0q+qU+HSgub0 iSrg== X-Gm-Message-State: AOAM532s410zXdS8GffgrWHCelO9X77e46diKeh46f5EnYpNImr+IOmX dJ0sxLPyTDEcVwxGTQhB+gs= X-Google-Smtp-Source: ABdhPJz6j7wuh6O+lVAG5Xabm20UfViYYYcFTBRdCID5pSp4JKqdGN03PTVF5WfpaiYTRPAH7FnslQ== X-Received: by 2002:a63:6e01:: with SMTP id j1mr744389pgc.147.1598870304605; Mon, 31 Aug 2020 03:38:24 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:24 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 27/35] dmaengine: tegra20: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:34 +0530 Message-Id: <20200831103542.305571-28-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/tegra20-apb-dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 55fc7400f717..71827d9b0aa1 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -644,9 +644,9 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc, } } -static void tegra_dma_tasklet(unsigned long data) +static void tegra_dma_tasklet(struct tasklet_struct *t) { - struct tegra_dma_channel *tdc = (struct tegra_dma_channel *)data; + struct tegra_dma_channel *tdc = from_tasklet(tdc, t, tasklet); struct dmaengine_desc_callback cb; struct tegra_dma_desc *dma_desc; unsigned int cb_count; @@ -1523,8 +1523,7 @@ static int tegra_dma_probe(struct platform_device *pdev) tdc->id = i; tdc->slave_id = TEGRA_APBDMA_SLAVE_ID_INVALID; - tasklet_init(&tdc->tasklet, tegra_dma_tasklet, - (unsigned long)tdc); + tasklet_setup(&tdc->tasklet, tegra_dma_tasklet); spin_lock_init(&tdc->lock); init_waitqueue_head(&tdc->wq); From patchwork Mon Aug 31 10:35:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746097 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CFB3138A for ; Mon, 31 Aug 2020 10:38:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9D202098B for ; Mon, 31 Aug 2020 10:38:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uNm1PMCn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726224AbgHaKid (ORCPT ); Mon, 31 Aug 2020 06:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKib (ORCPT ); Mon, 31 Aug 2020 06:38:31 -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 3EA88C061573 for ; Mon, 31 Aug 2020 03:38:30 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id q3so2816570pls.11 for ; Mon, 31 Aug 2020 03:38:30 -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 :mime-version:content-transfer-encoding; bh=C6MEjzmg2ijL2wEG4EWscVIYo5yhxVz96yVi0O0ZzBA=; b=uNm1PMCnoEqkPIEekFNZWiKhfXIMMUC0CtR92q3dLSd1QCCqwKwYZ6m9EAspLmXqfL PX7n0K6WkkLlXS4Y8c47QtfOqyNhanjqr6lmcmO97oZ/UW6aTTd92wHgnWGqa0rEJiRM 5gPlxmwDeSU1z1X8BIFmh71p24ztfrmf1t/r9MmnRr0VunS4hQciJLqGTJmxWwOkFmu4 ouyI3hvL0WkkHvkvpIgihnobl4KsQfk5ctq7iIUkw7RU9HZ8M+5A44NDGgZhgvR+9pJC x1WGAJf5Gc0CkiGwBeRkyuJDNIMDlrVRkodZuDDqwPolwpIdbcnM8u4H/O1lw22o9k5r qIaQ== 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:mime-version:content-transfer-encoding; bh=C6MEjzmg2ijL2wEG4EWscVIYo5yhxVz96yVi0O0ZzBA=; b=RiLKsLyJ+7mKhf/9jzBXL4I9X0TTcfElyZK3yrBUu0KMbkJes5ursqwph6YPd9VEX0 RfcfbKq6OfUFKwd/lfcfoei5blix3Ksgz6j2cJPtuG1iw67T1sbbKWu+CThI6gX3npBm WZYclPNJxELM8zBFfKc6/HqX+82U18eDOlszp/s16C+QujWivQsnlNE3GeANp8EhcMOD 1ro8WMFw3R8vIQZ/lOf09sJIkRtS61G6KR8c+OvcsI8hkctunNGyylxH/o1BX1p6kSnt 31vmTyX+LEyfIRJ/zbx2lg+PhzNggww9EFN0PIt3keRCK8diUIv3+CU9h2hhqaOOl0I0 dvrg== X-Gm-Message-State: AOAM533g3Xhwde0FM7AFCyuInA+yJDfC91tmkc0Uikj8F+AuAlhPNwtg dMhqUCjv/8CDWsXD2oJcwMI= X-Google-Smtp-Source: ABdhPJwyxVJEpRrmkxukM9mew5f89HfoIN8SWVc3VgMZgtP2H5BJ0x2QjwbwbaN/wAVx7HC2rA160w== X-Received: by 2002:a17:90a:aa90:: with SMTP id l16mr801895pjq.210.1598870309885; Mon, 31 Aug 2020 03:38:29 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:29 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 28/35] dmaengine: timb_dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:35 +0530 Message-Id: <20200831103542.305571-29-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746099 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6183138A for ; Mon, 31 Aug 2020 10:38:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF4DD20DD4 for ; Mon, 31 Aug 2020 10:38:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LvuQ6IZH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgHaKig (ORCPT ); Mon, 31 Aug 2020 06:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKif (ORCPT ); Mon, 31 Aug 2020 06:38:35 -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 9622EC061573 for ; Mon, 31 Aug 2020 03:38:35 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id t11so2830617plr.5 for ; Mon, 31 Aug 2020 03:38: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 :mime-version:content-transfer-encoding; bh=/d/z16dzFhV3Oc6TlAqrRnq4hKiydAqPeWfQIWRXnyA=; b=LvuQ6IZHkL0tXlLAONFqmK6lqW4b0ygP77HSztXWFpRjZYwG9D3K4kHKwFWehPBNxN lc+RQsPONvtJEePwRASKC5kDvwP+Qyq9a1wNc95hjFDmlHFhMlhYQAGezSXfj9XjOug/ AmCG6Nh0qwls/+MG2G5Ps2iZJJm3DJQiaCCprdskKFU/YcredpDtOro2teIRW2HVm3l8 +GNR0g5ZGth+WFcnn9AxhLX8P7HOXdJN2ix6GEvFqcZ3LX1o4K6nMo7PpkR+hM3QHONC B730JLSkA8Lv0kT+BzOZDzJroFU6OnySVnpHtMOpg3gImNrfAjS6FLRe1HQcgj9KoJ3x kD8w== 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:mime-version:content-transfer-encoding; bh=/d/z16dzFhV3Oc6TlAqrRnq4hKiydAqPeWfQIWRXnyA=; b=jNnR1exTkgqo6YD9X3gvfpnrTtP/8NCgTqr60I9M2NPfaUhi2v/fQ1Z0uNaIGQUCS/ Gisux/PRPq1Mhqk1FN1o8+f554qUe5BHqS4QXD6mpLViQaNy74+4c24fx0F6MMqBA3vv ETj0s1tRBANAdmOuEzaIWEPeKf+6GTIhm7erXu5kXGtJDKhzda8Ovxl48EqjZjr5b8sv DAsTWpUD5f+Q6BE4PY20SM5bjB08Uve4CLsmh1437WPs9mcXx1qB1aqn2tplY8Q2UtL8 MVjoPN+JVWXfwVJP1pwmlgRdG0q28dm57EmQ/cSLBJIJ9IgP1GFQPbLrMISx9fDryhgq ZEgg== X-Gm-Message-State: AOAM5320M40W7aZzugKlMd78WldByeeT14cLxGm/L6w1erCRzIvaaeGH VHvELgJTj0sqXLuPiMiJLykru+pW9/yoDg== X-Google-Smtp-Source: ABdhPJwFwCBa/+FR924oIA6oQs5g8ug5xySeeAg1vJreuRD1viBMdDLQ7bGTY95/TFissiVi3ny3+w== X-Received: by 2002:a17:90b:885:: with SMTP id bj5mr743646pjb.133.1598870315187; Mon, 31 Aug 2020 03:38:35 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:34 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 29/35] dmaengine: txx9dmac: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:36 +0530 Message-Id: <20200831103542.305571-30-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/txx9dmac.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 628bdf4430c7..5b6b375a257e 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c @@ -601,13 +601,13 @@ static void txx9dmac_scan_descriptors(struct txx9dmac_chan *dc) } } -static void txx9dmac_chan_tasklet(unsigned long data) +static void txx9dmac_chan_tasklet(struct tasklet_struct *t) { int irq; u32 csr; struct txx9dmac_chan *dc; - dc = (struct txx9dmac_chan *)data; + dc = from_tasklet(dc, t, tasklet); csr = channel_readl(dc, CSR); dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr); @@ -638,13 +638,13 @@ static irqreturn_t txx9dmac_chan_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static void txx9dmac_tasklet(unsigned long data) +static void txx9dmac_tasklet(struct tasklet_struct *t) { int irq; u32 csr; struct txx9dmac_chan *dc; - struct txx9dmac_dev *ddev = (struct txx9dmac_dev *)data; + struct txx9dmac_dev *ddev = from_tasklet(ddev, t, tasklet); u32 mcr; int i; @@ -1113,8 +1113,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; - tasklet_init(&dc->tasklet, txx9dmac_chan_tasklet, - (unsigned long)dc); + tasklet_setup(&dc->tasklet, txx9dmac_chan_tasklet); dc->irq = irq; err = devm_request_irq(&pdev->dev, dc->irq, txx9dmac_chan_interrupt, 0, dev_name(&pdev->dev), dc); @@ -1200,8 +1199,7 @@ static int __init txx9dmac_probe(struct platform_device *pdev) ddev->irq = platform_get_irq(pdev, 0); if (ddev->irq >= 0) { - tasklet_init(&ddev->tasklet, txx9dmac_tasklet, - (unsigned long)ddev); + tasklet_setup(&ddev->tasklet, txx9dmac_tasklet); err = devm_request_irq(&pdev->dev, ddev->irq, txx9dmac_interrupt, 0, dev_name(&pdev->dev), ddev); if (err) From patchwork Mon Aug 31 10:35:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746101 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D873161F for ; Mon, 31 Aug 2020 10:38:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B2862083E for ; Mon, 31 Aug 2020 10:38:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qj9X1oUk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgHaKim (ORCPT ); Mon, 31 Aug 2020 06:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKil (ORCPT ); Mon, 31 Aug 2020 06:38:41 -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 0060CC061573 for ; Mon, 31 Aug 2020 03:38:40 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id n3so2071181pjq.1 for ; Mon, 31 Aug 2020 03:38:40 -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 :mime-version:content-transfer-encoding; bh=sZgvV7j+m4QOySvO0ZmbvccpTAKnpHlBSbW1gFt1Enc=; b=qj9X1oUkvstkNrnsHG/WqZuzw89d6bp34rP16a9wSIIcRZgXs+0n4dP2PucMUfJNWT yLM3HKgDC/0/bB97HW2nCfBt5vDBgwcvmD/Yx4RHROLs3Ukq++3sJmbyOpxJyibmSjrg TXK7iIOAeR+mJEklT9J0hcqcYkEbAKixpHYv8BtpQFvBVcd47H7Ihx56aUbS1+Llm1eZ tTl6jTkykc9o2TcDC3RT9uNH/9EVnA+8IfnrzPiqqq0i9vgwxd22Ilhs/BrhyDUDCcWR btfKwid0YgPH4W2+V1u1cBQBSX7Rju11x10vn7BkyhiAlGrV90QgdA7fpBVuDdr/kR6r xGVA== 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:mime-version:content-transfer-encoding; bh=sZgvV7j+m4QOySvO0ZmbvccpTAKnpHlBSbW1gFt1Enc=; b=tdaW987U4Sl1E10t+K4uZQOqSlbVLvJu8VxUOKlHWiE3X9xwsPOBlia86/ZDNQHCTi 0N/oLhAJ6X81nYHxPH1QyPe5B2dp8vzVoZYjmncj3kdN1kIE1H7BKgTHW6GXdRa6/2Af TL+oZTIIFowGHU47vqh5V4+3HrfuB1NqgDwJXN8NWxKbyRGqlwFvXTyTdjBKEvaXe2qT uvU6EdR6kLKRN01elGeNJwmbsie+8Xh2ekalkqewYcDYxzfJkgRNf4eZc+WQhGb6wuKw yQeAdHKqA6629GM7x2+PTsuEQFV7ei3yJaDA/wk1b6z4gE/UaT8c8S9NPwWXQByp/zdZ 3BUA== X-Gm-Message-State: AOAM531ebqWYgA/d8kenQ/NSl1wWAOdXSi+JX2kDF0hoWS0rtS+MUTye QpUR1nl6E15EGXfkvHmCtAM= X-Google-Smtp-Source: ABdhPJx88DyqfL91NxnJzxCXbXoerPZ4z3BtdIYsj0bFt5r5E7JH23+8kWMeIWoVMqA7chME5avMQQ== X-Received: by 2002:a17:90a:fe07:: with SMTP id ck7mr828333pjb.20.1598870320577; Mon, 31 Aug 2020 03:38:40 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:40 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 30/35] dmaengine: virt-dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:37 +0530 Message-Id: <20200831103542.305571-31-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Reviewed-by: Peter Ujfalusi --- 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 31 10:35:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746103 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79CDB138A for ; Mon, 31 Aug 2020 10:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A6AD20936 for ; Mon, 31 Aug 2020 10:38:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z4RdppuP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHaKis (ORCPT ); Mon, 31 Aug 2020 06:38:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKir (ORCPT ); Mon, 31 Aug 2020 06:38:47 -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 2E974C061573 for ; Mon, 31 Aug 2020 03:38:46 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id c15so2833277plq.4 for ; Mon, 31 Aug 2020 03:38: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 :mime-version:content-transfer-encoding; bh=3zvpyaUeMuakm0b3Mljvy2ZKXhDewVkWirv/ZgFsgys=; b=Z4RdppuP1afMebQ8KABcuFqVAc4ZeT3H4k8jpsYzq7zoFpw2ZGXy2xYQmrLk4LB7qE a2Styo7bFCgBHM8CR1VTmxkgXhu4zcSzx0bdBLNKBkGn6luhEFqbia/YAKcpOS4xi9ol FnNHreV7hIk/F+kkjTLG7nJrPKpENV88BLhV0A2R6ZOKW2NbEZBtVGkJ39kDUOcvs/2I CzdFb7JrLvM9gjTNNFbOjFLLlldFsBEmX779THv9QHjiU2lm898Wg9/3s/JVmH9uBN7g qN9QjthlXW/5eY+NR1jWrkKISHCnr9XSs/82Nem3/1MvLLTdedKf99au4lbEFnbIrEQ5 2OPg== 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:mime-version:content-transfer-encoding; bh=3zvpyaUeMuakm0b3Mljvy2ZKXhDewVkWirv/ZgFsgys=; b=VBtGXPZULDmZJi6FPFrWdaOF/Lb7Jz1hNl92CTFOMpbHFKEkhBD8BGgEkF3tTWP3Y8 zn3a08MxLccYTC9co/gyHbwFyBCo43EVpGsalepRoeh9IkLtVPvovehbg/4jegAH0109 gUKxlT2v4HIEVQ4dki3qiDs/i8/bJ7ZSytiZ8XAXoHbrJVvbRgMnE4+i9tXN2YMuAvdh 61BXL/pM9qDCc4idqGNyHVmnA4Hi/1TFiTgoWEKxdeOKTttk+AxvONv7gaIZN7yO8tiy Q3YIgxHvGWUi4NXYIv/4fqgOI5V1lX/G1B3JNodIVJgoLoO+z7nRZsUpgTYo0Bb6bjFN psvg== X-Gm-Message-State: AOAM533rZ5CvuBua0PPzTND+F1HnAmsK91Lw76sESV8vnK58zlWLvLxU yVRYy2cIZfWwwqT67iORWbw= X-Google-Smtp-Source: ABdhPJyrOouMsGvpZgGX1766QkOMXufbqhrdUTpxk6QZBrgijELLPmOl7Ug3+BMhm6AifTOFvt8syQ== X-Received: by 2002:a17:90b:4c03:: with SMTP id na3mr827483pjb.29.1598870325811; Mon, 31 Aug 2020 03:38:45 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:45 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 31/35] dmaengine: xgene: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:38 +0530 Message-Id: <20200831103542.305571-32-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/xgene-dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c index 4f733d37a22e..3589b4ef50b8 100644 --- a/drivers/dma/xgene-dma.c +++ b/drivers/dma/xgene-dma.c @@ -975,9 +975,9 @@ static enum dma_status xgene_dma_tx_status(struct dma_chan *dchan, return dma_cookie_status(dchan, cookie, txstate); } -static void xgene_dma_tasklet_cb(unsigned long data) +static void xgene_dma_tasklet_cb(struct tasklet_struct *t) { - struct xgene_dma_chan *chan = (struct xgene_dma_chan *)data; + struct xgene_dma_chan *chan = from_tasklet(chan, t, tasklet); /* Run all cleanup for descriptors which have been completed */ xgene_dma_cleanup_descriptors(chan); @@ -1539,8 +1539,7 @@ static int xgene_dma_async_register(struct xgene_dma *pdma, int id) INIT_LIST_HEAD(&chan->ld_pending); INIT_LIST_HEAD(&chan->ld_running); INIT_LIST_HEAD(&chan->ld_completed); - tasklet_init(&chan->tasklet, xgene_dma_tasklet_cb, - (unsigned long)chan); + tasklet_setup(&chan->tasklet, xgene_dma_tasklet_cb); chan->pending = 0; chan->desc_pool = NULL; From patchwork Mon Aug 31 10:35:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746105 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFEC0161F for ; Mon, 31 Aug 2020 10:38:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C89072098B for ; Mon, 31 Aug 2020 10:38:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G1H9fxbf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726224AbgHaKiy (ORCPT ); Mon, 31 Aug 2020 06:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKix (ORCPT ); Mon, 31 Aug 2020 06:38:53 -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 71611C061573 for ; Mon, 31 Aug 2020 03:38:51 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id ls14so2744429pjb.3 for ; Mon, 31 Aug 2020 03:38:51 -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 :mime-version:content-transfer-encoding; bh=YRxS8wCu+hvYEfOm0S7N9XHmjSRSh/dqORNSRMlU5Ws=; b=G1H9fxbfResuDWwAPlcONnCAKobKzBafYmDf2ZDuZkeTqHQvDEF1FRWzkQSgiwz5r+ OnJzTJbhc7wgM7su+G7w8AGn263VM9LTFX+LwP2+mov8OAu+pTKFmptV8KppaXnmfC0s YZafUFG3cqhDHz2r+S9YDuvi/8u3LTANnOWXocxYaHXTVPRCygIRP/Pwqsx6QbqTdFVl apl+vCcgx4SA9nEMEYybxswU8qjE7qvMbIwyiwCxX0nPIKhwzMqyrh3Dy3pmVJDc02Rw 2Hnt5rSFZ9PLMcdOPjSFQUNiMuRBQUtV8OSEnal8IEQuef3W/B95Nmk3Rmfv9/6fcdST nEuQ== 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:mime-version:content-transfer-encoding; bh=YRxS8wCu+hvYEfOm0S7N9XHmjSRSh/dqORNSRMlU5Ws=; b=irBhcbgzwVYq2gyS98rqCT6OqCaOHVW88tb03guaCAtHh5+spekTlHM9C8AnghEOmb YHnd+QoNkkYvxrxvmE+imyCCJL6WEcRAjoNdVTmomYNxMtg0Wb/ERxjmq2O2Zp2+6Sda xm5Ysy5MOxNey/x14ZkmyBKd0T01xtXE/YH4RvQbJDdOzYtCo/U/SDkyJytPVxbBdhgo bkrp7/a22MM0qruwncmBdqzCPnJW1d1UAsLqPKbN7HBYTAN0TexCjKs015MGByoR022O OsD+mtyECfiHfBMgxCURNyaWYlgAQ/xKluJAhC1PQFh5iyUJ0q5gClynAO5TL8dckwAH QRhQ== X-Gm-Message-State: AOAM531fN5cDwAnQrTtf/n7dx+dodKPbcb/EFY/hGu2I0FdMWybdPaZG DnUMDgFblHNz/ZQOLuI56Ds= X-Google-Smtp-Source: ABdhPJyTdB7dhNPC4e85IRk0IJmcm4mkYZTvTZFbVzCHtpj7ifk4RsG2Q8mnRxZ7guyhRpwrdMCyZg== X-Received: by 2002:a17:90a:39c8:: with SMTP id k8mr835749pjf.19.1598870331074; Mon, 31 Aug 2020 03:38:51 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:50 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v3 32/35] dmaengine: xilinx: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:39 +0530 Message-Id: <20200831103542.305571-33-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 31 10:35:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01957138A for ; Mon, 31 Aug 2020 10:38:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBD1F20936 for ; Mon, 31 Aug 2020 10:38:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pzTL5G64" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgHaKi5 (ORCPT ); Mon, 31 Aug 2020 06:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKi4 (ORCPT ); Mon, 31 Aug 2020 06:38:56 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB8BC061573 for ; Mon, 31 Aug 2020 03:38:56 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id n12so373622pgj.9 for ; Mon, 31 Aug 2020 03:38:56 -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 :mime-version:content-transfer-encoding; bh=HH0dPF0UC4vFvuuGJrp3W/Fupq0oQF41Jn8PhR40Ayg=; b=pzTL5G64iRgNSLbtHaHeA/ye/j+7874WN33H9RWT7/xjLran++ebbuZ4iBeXkNE4P2 DAo3dRZTJUDP8ez4FhhqMPALV2JiMfnQIC8Hx4ZJM45fauxZceNYbh8azZHiPVNkoIPL XrdHSp/8/c+3VoOtOYhmV6XaAEqTj5pS7bzplmewP8oQPiZ8sGuxeUA1t7/cnvcg80Y5 e90Dsk+HBB+OU+/xZaaR+Wb/OY580nCFIx8Pz46aStDdMTduKBt5u/9dbo0DoNx4PfeJ vN/koHT15EFf9nSm+3h7Y8lX4KT0VGx0SKnlO9b+xLRR4y8zedIV8QTwMEIBTYgv2Igt PSsQ== 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:mime-version:content-transfer-encoding; bh=HH0dPF0UC4vFvuuGJrp3W/Fupq0oQF41Jn8PhR40Ayg=; b=ej/h0Knfjrso575EKUvZ4ElaLuwPcR2VoQRvE06aQFm7SdP1IwPrN0JL3ACTiAC7/I nRLhgPF33hvROe2zwXzPG445TPGdvgBib3B4ntFBnh6tLZC8Erak9u14JVY3ExCd/i5L Uscq+XRXCQ9UN8jXTnwC3SjqeyvShayCevNH3NTWxVW0OSBKZ1O0xmApomiuW8SstCYu 2e8zR1RnayALvepxSqSy+BwVzS7yoOlyPBHePk56sBEmx6HVFGPsfbQrtCJqKft4ROfK 6SS5Yj3IVmFKBqHF/cR7BLzZzaP2QrmL5EePs6aXSCWI5uP9YLkp6nVjVZpBnv4selIn RVpQ== X-Gm-Message-State: AOAM533jNbymU40U+ehqbtTpJMnY0quQ6jslrO2SyUsJySH+JKhBWgdF 7SZ0Qx47GgiLthrNT8iiCEs= X-Google-Smtp-Source: ABdhPJygIq/URbWgyZHdgf8agoNjluus7O3UNtJrCRep5/DbTo2If5QAlZGWJMw7KlIzHbmBveuuvQ== X-Received: by 2002:a62:78cb:: with SMTP id t194mr726094pfc.171.1598870336153; Mon, 31 Aug 2020 03:38:56 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:38:55 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais Subject: [PATCH v3 33/35] dmaengine: plx_dma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:40 +0530 Message-Id: <20200831103542.305571-34-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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/plx_dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c index db4c5fd453a9..f387c5bbc170 100644 --- a/drivers/dma/plx_dma.c +++ b/drivers/dma/plx_dma.c @@ -241,9 +241,9 @@ static void plx_dma_stop(struct plx_dma_dev *plxdev) rcu_read_unlock(); } -static void plx_dma_desc_task(unsigned long data) +static void plx_dma_desc_task(struct tasklet_struct *t) { - struct plx_dma_dev *plxdev = (void *)data; + struct plx_dma_dev *plxdev = from_tasklet(plxdev, t, desc_task); plx_dma_process_desc(plxdev); } @@ -513,8 +513,7 @@ static int plx_dma_create(struct pci_dev *pdev) } spin_lock_init(&plxdev->ring_lock); - tasklet_init(&plxdev->desc_task, plx_dma_desc_task, - (unsigned long)plxdev); + tasklet_setup(&plxdev->desc_task, plx_dma_desc_task); RCU_INIT_POINTER(plxdev->pdev, pdev); plxdev->bar = pcim_iomap_table(pdev)[0]; From patchwork Mon Aug 31 10:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A408161F for ; Mon, 31 Aug 2020 10:39:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62B4420936 for ; Mon, 31 Aug 2020 10:39:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eeUTcnaX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHaKjF (ORCPT ); Mon, 31 Aug 2020 06:39:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKjD (ORCPT ); Mon, 31 Aug 2020 06:39:03 -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 81C3BC061573 for ; Mon, 31 Aug 2020 03:39:01 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id f18so347444pfa.10 for ; Mon, 31 Aug 2020 03:39:01 -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 :mime-version:content-transfer-encoding; bh=BlxUGoukCjm70xKxvzQeb0nmcoaCF5xpWFkEwsqHqdQ=; b=eeUTcnaXPHnEm1o3imFXfv0DiWjFnxDmz1D+ajV/fJxw6HxjX/GnEltoS/9B33E0gO MMfi8tdNKD7To1Ck4lYGfxUQPWX1jO/cDqCaPwZDqJWcBayNk0u6f+UsNZ2DbDPjyeNY 2r3V4aQHaufpLXsSwasQk6POYxhMsMuX4Io/EZdP1GHfGOF7FW2iVns/VY9D3907f+pY 7bw5P3wZGt6LoBhB7b2pVQYtW719zbTSX0ozsjSLjHsZ+YdvvjapAAET6WUyWGiqlTW/ 5lits3JQCskpoH8gxTk5PH46zzyxxzhqkg9X6axiyHqH43TE1laspQ4w64ntEOd2Bb2c rzlA== 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:mime-version:content-transfer-encoding; bh=BlxUGoukCjm70xKxvzQeb0nmcoaCF5xpWFkEwsqHqdQ=; b=kBJM/4GsOfj3eDc1RkMbKjv9GG7YZ9ewf2TUZBKZ7xZAfxOGKsVEvj58abE+tkN4eg yPov7ayEOZ+h5xXTR2BSUyx/uhpSjZnxwU0MBZmkej1aS9yBlxI4QxR6SGY0MRqGi2Nc d788UKBIk8y9o4aJ2kIoYvn3v+fSuyoKFg58zGipE7YQ/MQkKbNVnHR+PtKphy4STPAI /JYr5e6cxK88Ysycrv3sDuJeU6DSSbkvWqPlWwr22rjc9dkD6CR5mfx6UTL10jvY55cz qWamFmZnR+ZBDt0YM1I71PSh6d0epLt1Kv7x+ymuEv1ZV5QK3rMwPGmY8742tYWPM1TE juBQ== X-Gm-Message-State: AOAM5311Ax+nXdrkIG9QtY6+P/toPj4w0gwbXv4fEgKaKas/mAQFIlez wcIKh3wYM5IH0FcUhCpbaLI= X-Google-Smtp-Source: ABdhPJyIDW0vgNoU2rgvRA2dfY8MC6MZUjTOU6EuM9RRW/JmV64nVrMlYyTZtjMmVnNxdg3VkZHxzA== X-Received: by 2002:a62:e10b:: with SMTP id q11mr752420pfh.117.1598870341141; Mon, 31 Aug 2020 03:39:01 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:39:00 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais Subject: [PATCH v3 34/35] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:41 +0530 Message-Id: <20200831103542.305571-35-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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); } } From patchwork Mon Aug 31 10:35:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11746111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00EE1138A for ; Mon, 31 Aug 2020 10:39:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD9B72098B for ; Mon, 31 Aug 2020 10:39:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bJTBsVRk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgHaKjJ (ORCPT ); Mon, 31 Aug 2020 06:39:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHaKjI (ORCPT ); Mon, 31 Aug 2020 06:39:08 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CDCEC061573 for ; Mon, 31 Aug 2020 03:39:06 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id np15so1130221pjb.0 for ; Mon, 31 Aug 2020 03:39:06 -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 :mime-version:content-transfer-encoding; bh=GU6do3Sc3Sg8QHCo09pkp5nNRZOgCilbwfzX8rZjCSE=; b=bJTBsVRkrm7GUSLuaGwEjeX/BEz6SEWm8uBe4l121B6oW8E4z+5ISU3DsP/HSA3L1z GoXfOjEy2VimPUybsOLmDlcavQCkdF2O3fV6a1Hfi+//pa4IH4w9Zn/qHG6ewk5F9N1c gV71IVoLDI5Qz5Eeq0vlA9N7grEpD0PNqGHO5vEDiODlxtFcWobFOAWulbRvVUDqng0p Kry4qi7wYgM0uDIVyxD5ggfXjYO5HYOYOJM7XmoYnRB17UlKpxjGic9b/4txKhzWiG// 6DxfsEolGsrKu8TJRCFZD5aGTboVfLDwa0YN9snV0atLSo3ljZg2pLcyCLJHQJlRNxLG tE9Q== 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:mime-version:content-transfer-encoding; bh=GU6do3Sc3Sg8QHCo09pkp5nNRZOgCilbwfzX8rZjCSE=; b=jW9Uh1S5XlIHeUNHRk3rTjdW7depaVdR1ZQPRTxN6TcEuIWG0jR34J6HLYksJOWRri pKn3HVDrchrQYHL7ZB2uXUyfRr4ef8Nm9HH0hlEJzAMa0QlroRBEMP//wN8cx2gadoiL kHGwFC4DGuxhMTG0Z3uSqK7RtS6CQD34krkQ6D+1FSDcH1Kemz4bumgDH4t5aSnPI/pA sq5XTtmwtziXYPmwnzIyzju/0l8e6YAvXxC7aEGhM1VqBmOTgsC8hc68Kj1V9A/2KrzX ShGIzzdpZZ4mF9E6vBIDSOyws6p3B3GMC+ZEyWEAHVXRI5ohRIuQk1ggrivQqQxXQXm9 Am0Q== X-Gm-Message-State: AOAM5319nrL3m41w7hRjFMGUsmK3B+jPHNTr1rAajw255j9iFjpA3Wba 67JPs3b/7B6ESXP0fHRFF1E= X-Google-Smtp-Source: ABdhPJxIMjt9L3JdQX3FYOOGQGqny0jKO9qzlQJ9XZbDDUfStrKbyaZnSk/4Xg0fmzRTKSzy6F6FkQ== X-Received: by 2002:a17:90a:a101:: with SMTP id s1mr720573pjp.205.1598870346142; Mon, 31 Aug 2020 03:39:06 -0700 (PDT) Received: from localhost.localdomain ([49.207.204.90]) by smtp.gmail.com with ESMTPSA id x6sm6895449pge.61.2020.08.31.03.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 03:39:05 -0700 (PDT) From: Allen Pais To: vkoul@kernel.org Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, logang@deltatee.com, agross@kernel.org, jorn.andersson@linaro.org, green.wan@sifive.com, baohua@kernel.org, mripard@kernel.org, wens@csie.org, dmaengine@vger.kernel.org, Allen Pais Subject: [PATCH v3 35/35] dmaengine: k3-udma: convert tasklets to use new tasklet_setup() API Date: Mon, 31 Aug 2020 16:05:42 +0530 Message-Id: <20200831103542.305571-36-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831103542.305571-1-allen.lkml@gmail.com> References: <20200831103542.305571-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Acked-by: Peter Ujfalusi --- drivers/dma/ti/k3-udma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index c14e6cb105cd..59cd8770334c 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -2914,9 +2914,9 @@ static void udma_desc_pre_callback(struct virt_dma_chan *vc, * This tasklet handles the completion of a DMA descriptor by * calling its callback and freeing it. */ -static void udma_vchan_complete(unsigned long arg) +static void udma_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); @@ -3649,8 +3649,7 @@ static int udma_probe(struct platform_device *pdev) vchan_init(&uc->vc, &ud->ddev); /* Use custom vchan completion handling */ - tasklet_init(&uc->vc.task, udma_vchan_complete, - (unsigned long)&uc->vc); + tasklet_setup(&uc->vc.task, udma_vchan_complete); init_completion(&uc->teardown_completed); INIT_DELAYED_WORK(&uc->tx_drain.work, udma_check_tx_completion); }