From patchwork Thu Jan 7 12:29:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41481C433E0 for ; Thu, 7 Jan 2021 12:31:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF6F22337F for ; Thu, 7 Jan 2021 12:31:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF6F22337F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MQRqxZiR+9jUkWavPiWaO+m7wFqR00wRwYuYQkD/+Js=; b=BAcnZfJP8mC8pOxL1EuD+H8yW N/4WCqXfys1seJaRiKA+bt/GlXeoxkVFcAfetMYnAWAl1+Qo9BAhO+hAkPF0gJUnk0Exw+Ou/LWkt teEAVksBBFmpFhm09dIHda+DI5n44HJACmUljQY5AJtIDmP2fSk18xlRoUwjhmZqhKQwf61OIU1wt aByUOmN86EwUgsMIELFyNFXq+fYMDTGuSHGHiGYibAoJtpKiZftYQsQwUtqw6R7pXxuwGy4rNRQAG YAcwu9rUziQXI/aVdiC79xXqAwwTYlVBW8/lJD193HxNGcVdYyxXYxwIX4v3JNRQ+RvpBvWL9P2Ti ro7rRF/SA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURh-0004TP-FD; Thu, 07 Jan 2021 12:31:17 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURf-0004S5-A0; Thu, 07 Jan 2021 12:31:16 +0000 Received: by mail-pg1-x52b.google.com with SMTP id n25so4754761pgb.0; Thu, 07 Jan 2021 04:31:14 -0800 (PST) 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=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=RlLJQVTb/kJ2X/lk0UVDdHmWxXHFiudcMeEXcsJX48HfFWnkK2hHHDH4jbREnvdpq8 A7IDy/033Eb3hTMMjGOFVHTSHBtQff01avXlNN1c7j0Fk6uknAbCwzIFtI/kiXZpf7tl vRVWRmhkyL/7onpnKGQYZWqiuHfbIyphWsW1qxzs0PdJfPvymDEmOVAoo5UXPmkQYvse pr0smwosREu0XdbylCI8QYiZxCP759e3aDdrrA2z+uBjD3A0Hm8TORviR7q09Cq9s2dw oxQIwJCLr3+OCa7cOP6Cb8TuqoPkvQb8G+Z1C65Me9HV0JKrSCPR/Ew8IriwvGvpDc/r jbog== 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=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=NYbUYN5WqddmY+kQjUrAfKejHrT1c638s4S9aa8diTKju2xUMMcciXdrV2VnCJ1v1t BbCbyhton7hUOi+Xw5PM3HQqD06g3wLEZP22MW/XdrVtew/mFaP5WLnwFfg1TD/AKCKZ Lfu3J2kzRfBKaQwnv/rFcuBATu4/NzUcJ4ow8rRen9lbcgNX7XzwASnpUzzGSVVb7OAU 5vZ0KsRYTGBLMKSHwahgf98cdjwCfQ93Xhjn2R+Gs5J5Nkow/77aYI/TnrX+4rDhViDU Rvj5lcQyo3CfBgaTHtpoU4RkWSkiHj/arYqYdjChH8ZMGGu4ay6NU935ORmyyzAFhy43 yvOg== X-Gm-Message-State: AOAM531MlNu2Tx/G7KucX6nPM4fIupFyFk8Cs9UGVKs7IVJ9A0Rk7uM5 8OYgomwYrda9ePNhgUl0uQs= X-Google-Smtp-Source: ABdhPJxuLJz16UeeguipMy8mp+65DdLPSfon9Rh/9LTN6jawH7dFlJSH+Q4qIn8TgHF6oV/ygT09nw== X-Received: by 2002:a63:d141:: with SMTP id c1mr1618625pgj.75.1610022673261; Thu, 07 Jan 2021 04:31:13 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:12 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:37 +0530 Message-Id: <20210107122944.16363-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073115_444677_90F8914B X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index a45bdcf3026d..7e4223716620 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -503,9 +503,9 @@ static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); } -static void omap_aes_done_task(unsigned long data) +static void omap_aes_done_task(struct tasklet_struct *t) { - struct omap_aes_dev *dd = (struct omap_aes_dev *)data; + struct omap_aes_dev *dd = from_tasklet(dd, t, done_task); pr_debug("enter done_task\n"); @@ -1151,7 +1151,7 @@ static int omap_aes_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_aes_done_task); err = omap_aes_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index c9d38bcfd1c7..fddcfc3ba57b 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -594,9 +594,9 @@ static int omap_des_crypt_req(struct crypto_engine *engine, return omap_des_crypt_dma_start(dd); } -static void omap_des_done_task(unsigned long data) +static void omap_des_done_task(struct tasklet_struct *t) { - struct omap_des_dev *dd = (struct omap_des_dev *)data; + struct omap_des_dev *dd = from_tasklet(dd, t, done_task); int i; pr_debug("enter done_task\n"); @@ -1011,7 +1011,7 @@ static int omap_des_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_des_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_des_done_task); err = omap_des_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ae0d320d3c60..5dc7e23879a5 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1725,9 +1725,9 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void omap_sham_done_task(unsigned long data) +static void omap_sham_done_task(struct tasklet_struct *t) { - struct omap_sham_dev *dd = (struct omap_sham_dev *)data; + struct omap_sham_dev *dd = from_tasklet(dd, t, done_task); int err = 0; dev_dbg(dd->dev, "%s: flags=%lx\n", __func__, dd->flags); @@ -2084,7 +2084,7 @@ static int omap_sham_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dd); INIT_LIST_HEAD(&dd->list); - tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_sham_done_task); crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH); err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) :