Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp740672pxb; Wed, 20 Jan 2021 20:47:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSFKI368OOfA2NRH02qHdiqBKqiTEOOXyfeQ9yf3aNub/pkRMgX1w0JkayZceIpSoheFSI X-Received: by 2002:a05:6402:3188:: with SMTP id di8mr9997725edb.318.1611204437994; Wed, 20 Jan 2021 20:47:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611204437; cv=none; d=google.com; s=arc-20160816; b=lx8PvVPQfVS0XsDsRLWg89j/Ud8JV+gKO+ReD2dAFTx11+NRr52+n3178tu4q5wqmm 8BbFGIfZfw6HuRxkWSHzch0qg+LBlJnguuOQBJJ+JmEmH+hluAuOpEj48BVTsjSiW0dU +cypog62+V5DDN9EF22yurnWQOri0dpjoMQaX/6ZJp3eFFcljJNdUfrTWRekK9wrYNe+ wq5ZwKh83MYqLu6CiR91aysxMFhEGMh18NH2ivPZfr7qjkhvYwPeewzMPOiuI0SnwH0S vGzQ0ZYgPdtnwiMyPyr56KO49E08iJ5tTeKdzyx74FmXRnnkBauaiC6OMW+HfNw8aVCB zJLA== 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=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=KfItzPH1F5MeIWpgF1NyehEyNL5upKp0i383aVqq8LfJpVl67zUPdMra/lgsRjwbZw +UvlOm54l0tGf5KmbfD9ScPlRgcezhcm3XmHMwV5ROwMZPluDhCKLUkFKEdIIFtEU225 EVPWTpES+4wkEkzT+fPy9StW3e773Tz6MbjFWvpCgPiZeeIYfno700r7LRFo0lW7nOTv CUNqYQ6q42wfiIyq5n2U7bE5rgDajti40RdIlv+vMjhJwzaYEHYlWtKfs8AMxcDSvZwS tDn/vP6DqWBsqv47GyqQV2gaATOL/kteQIxPgU4uWg0CV+GOL3Jsbj6MlFBbvyZcLCc2 iiNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="or/uV8vN"; 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 j27si1643194edj.268.2021.01.20.20.46.51; Wed, 20 Jan 2021 20:47:17 -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="or/uV8vN"; 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 S1725967AbhAUEqZ (ORCPT + 99 others); Wed, 20 Jan 2021 23:46:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731776AbhAUEpH (ORCPT ); Wed, 20 Jan 2021 23:45:07 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87C0C06179A; Wed, 20 Jan 2021 20:44:33 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id y205so780082pfc.5; Wed, 20 Jan 2021 20:44:33 -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=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=or/uV8vNwzSNQAD9VOW+E6JxiU2rzML6E1U7mO1jiDzNuL2NIYAHw64HUf5uK50fl/ BMnGsUkuiEABSJ/Rf6x4WZE236IE57YW16ZaJuT+Fcufv89T0K2IGzkxIQuCOHeraIwD ZQNY6Cz/a++hUz8KgenUYRCZ3pPYRp/dU0uIya5WdmLgkEhcPGiqpHtGNMD4x+Mes/Ud BLljOq/WKBAk3TZCPf5I67nA9Iv2XmL/ncubnhVHDlatxw4KmCoDOxuAlqEwDCjwIMX4 hH/2dwwo1UkfmUGjFtNUc7xfNOvFDaiy9oeCl4CfSpQKbW5f9dcmI8WiUQZD34Eqb3TV b3fQ== 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=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=mjRf3eek51DdtULSG7xzvmy0Nq2GC4IQnCv9mrUOODDyzdR6DsxEphhoVeIbEFmxu0 o3E62MQbNlontwoGNFrlhIHOZwexfzrqi5GsYHfIGptRYmdO+/dKjCDxukq+B27b8Qg3 5HEhdHyRR2tn0bdZ8k7VM4AlG+yRjwt2cvEdAJ3eKrqpdbItd62mR2I8tKcyTbvoBxwt HlKvXo2xErY4UhVf6vyToYw1HVO9UoDAVFJf45s5o2xlNUGARBZQRP5lufVgqmaXwk8K Wq7+8Zm+RLrMfvczKJDDUU9IKH6rDrR9d1rusOFxn+Zup8OX1qGXwBdDHmvt9CN10mS4 lXKw== X-Gm-Message-State: AOAM533VMV8I8uGrNBTdnhbM0owNVe3yH/WFgDQmDyOkrb8WBOV7ULcA O7WIclQmNgZYDtXarAMK6D0= X-Received: by 2002:a63:4c65:: with SMTP id m37mr12590854pgl.110.1611204273495; Wed, 20 Jan 2021 20:44:33 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:32 -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 v4 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:24 +0530 Message-Id: <20210121044126.152274-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-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. Acked-by: Krzysztof Kozlowski Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/s5p-sss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 682c8a450a57..128512a365e1 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1445,9 +1445,9 @@ static int s5p_hash_handle_queue(struct s5p_aes_dev *dd, * s5p_hash_tasklet_cb() - hash tasklet * @data: ptr to s5p_aes_dev */ -static void s5p_hash_tasklet_cb(unsigned long data) +static void s5p_hash_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dd = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dd = from_tasklet(dd, t, hash_tasklet); if (!test_bit(HASH_FLAGS_BUSY, &dd->hash_flags)) { s5p_hash_handle_queue(dd, NULL); @@ -1975,9 +1975,9 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) s5p_aes_complete(req, err); } -static void s5p_tasklet_cb(unsigned long data) +static void s5p_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dev = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dev = from_tasklet(dev, t, tasklet); struct crypto_async_request *async_req, *backlog; struct s5p_aes_reqctx *reqctx; unsigned long flags; @@ -2258,7 +2258,7 @@ static int s5p_aes_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pdata); s5p_dev = pdata; - tasklet_init(&pdata->tasklet, s5p_tasklet_cb, (unsigned long)pdata); + tasklet_setup(&pdata->tasklet, s5p_tasklet_cb); crypto_init_queue(&pdata->queue, CRYPTO_QUEUE_LEN); for (i = 0; i < ARRAY_SIZE(algs); i++) { @@ -2268,8 +2268,7 @@ static int s5p_aes_probe(struct platform_device *pdev) } if (pdata->use_hash) { - tasklet_init(&pdata->hash_tasklet, s5p_hash_tasklet_cb, - (unsigned long)pdata); + tasklet_setup(&pdata->hash_tasklet, s5p_hash_tasklet_cb); crypto_init_queue(&pdata->hash_queue, SSS_HASH_QUEUE_LENGTH); for (hash_i = 0; hash_i < ARRAY_SIZE(algs_sha1_md5_sha256); -- 2.25.1