Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp265171pxu; Thu, 7 Jan 2021 04:34:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLLCKw39T29MnI/p7DZ/118yeRi97a1FsWD2N0j6vvWLTKry4YwXCYrOKV5/dTJMuzsH+j X-Received: by 2002:a17:906:77c5:: with SMTP id m5mr6007460ejn.424.1610022863901; Thu, 07 Jan 2021 04:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610022863; cv=none; d=google.com; s=arc-20160816; b=avwJb2zJZId7SJV1JgXjjEnBpq7ka+2ppHpMHasX0V+3RbdbGDl2X+BdpZe6Z/Jh/v DAY4aaRTqObpcPemIcyS9UEJNzduGJgYPUjn02lp9CjJmg7axujiTGNXwQt341Cus8uS +zUX1zNMjyNKYidj4U1ldBSZtQCbQnbNkT021kxTPG2Af6UdKT0ybueOxYh5gXJucUv7 QEBwAMy9exuM7ObpoBeR6qKu16Gs4XnRDL+fkms5A0FU55YADZZHX0VSWS7aDPMJTjt+ l1S6R/VzPK+vj7j2ONhVEdVU2qu4Onr3aAoWKb/DbYrhTp1CoQkmrOH268MD4gxW34On Krgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=lgNB5wgWDlqBEHoy9GdjnJB0kj8hHZ6hFnCQPYDbq+Mrd7tNvkZKsa3Izu/gZSctvy vdZ8IxKN8Uyf59qrA071wt6YjFWC7/DXgb5xdx4n2KcOaHYYq1tmQ0fY3Vuj8lS2L7Kx Tn+NmwtBZwRyAqBHt9A8wY6vVyWJzwcx1ZA/IwMgfh/CmzlcUjlvOnwad4Nz7+NE8fJi R5xVOvNHU9/v5IMHsqBewmFT1sIZV3TS6scTT6mr9AmlQ9ZxXtbCbMwNmP5DZVULXq05 wSr1arkKhPcot8MmGtR/jGIgwb730XwxZHx/fh8ecmwk+NvqcUTIIKA4rBX+R9hDAn0l MrEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RlLJQVTb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si2247328edr.313.2021.01.07.04.34.04; Thu, 07 Jan 2021 04:34:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RlLJQVTb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728120AbhAGMby (ORCPT + 99 others); Thu, 7 Jan 2021 07:31:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbhAGMbx (ORCPT ); Thu, 7 Jan 2021 07:31:53 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A92F2C0612F8; Thu, 7 Jan 2021 04:31:13 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id x126so3767236pfc.7; Thu, 07 Jan 2021 04:31:13 -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=DljNHKBleXV4I8/pvQHJDZVw/MX7pkHie0YicbED6sKIr6mCQN/pYUygVfQz+oFWtA oBLN8be7VZIcF5/Yo03oPaKIPWgVEURbRwUBbyUzbWGLe3Nr/sZJBeHsjRR81mGVRME8 CdVNKoZddW22rZkkujCgm49j/BLozC5jTDtaUEGPygGuXlxkpxLL8z18z4a1w10nOGd6 w6RUF5G+wWMIGqgN9ffoMfUVxvPMNzAeLrMEPeZEDzgIl6iMk3YE4Hn9Ad3vqUVz32+M t3KD3P/djjarx7IW00gxAlqAP1kXsjZNnVwFZ+17V8eleTVkhXmNv1SIbAIGNYvyfvaI dh+w== X-Gm-Message-State: AOAM532fRgIDtM24ahH3EuoVwWf9B5GOkTgZ2KsWCfi+Y7HDPyY/8iM/ tAKNqTnxg5W+SIcLDOrxtpw= 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 Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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) : -- 2.25.1