Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3861053pxb; Mon, 8 Feb 2021 01:51:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLKPWgO0oNfI9sz2wvai611DHDmzDgBOTphg1YRWKaYRd+2ba5Qh1eNTT9nyI4+SajSAZv X-Received: by 2002:a17:906:447:: with SMTP id e7mr16050826eja.172.1612777914086; Mon, 08 Feb 2021 01:51:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612777914; cv=none; d=google.com; s=arc-20160816; b=SlW4JvT6BQMP4hsQSPivxVzg9orqeOpsh4Nl/S5wI0gMsft4taLMJHx/ymOK9KCeyC ejK6s2FEwcxLPYxujM3C7k0eMo9KLt/x+833TFPNuhwoPy6TGZBFSoge+WsjFb+fnPzu b70+dkDLC1dPhwrC6Ib3ist1jIuxLfcaFMaVqZUjDOXmE2YVZ52ib0NASdyTWZXiMwLM ZRdVeVaAh9iBz+q70MRha/tGsELcktYKItBREt/6pNvLl8aDEK27h4/RGLqgJT5BWG+B JMxOnSTn/u3BnTYpFv8LVbeYnfZEvyqyp/5dSZ6cOCs4QPUOL+iHEspPCQ9IN/NT33Ss RnpQ== 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=NUAOhMx7kZdMUF22xEvk2zMh3TjO96ZmQe5z2Kg+QbexkvIemO92w5O6+K6XtIpi8t lbnl3gbCw36CYjUANXOsly8EHe8bz8DRgsssxFEfJ1YpBg03mK51pp7NBom7zfkj+chL LBCn1Ka2gWj1M9mgFdsyWS7zsX6eV/JB/Yl53v0h3G8LoMOmVsN1Vsp2Kqrh7zJTzq+4 cy+uMC+F29G7iLXwoEboWHT+6FbMCqHoj0J0RZtw60CMSGG7CkQe04Qt8j1qZgZDQ5Lx AeDlQFjeWGMbc5AKKTRlLnuyTdVuoRCbwTvvsoo4b4QOal6kKWPLd+V+5NkfQsdiuTLK rL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X2jVuxqd; 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 l3si12176239ejd.83.2021.02.08.01.51.30; Mon, 08 Feb 2021 01:51:54 -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=X2jVuxqd; 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 S231964AbhBHJuo (ORCPT + 99 others); Mon, 8 Feb 2021 04:50:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231962AbhBHJrm (ORCPT ); Mon, 8 Feb 2021 04:47:42 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61EB0C0611C1; Mon, 8 Feb 2021 01:45:42 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id q72so7946109pjq.2; Mon, 08 Feb 2021 01:45:42 -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=X2jVuxqde3QRBYknvwUMoXDYOUvK5mFtvW/MYddw3VFyXQb0RjGFYDkEFQF58PwzEa nBp7d/W5rql3LUKSwj2akMOeAz747Vh/6sAgp5FQofzBuLVLO1glX5bfK9h1kKcdlBvs 8IxFOpUtQvhOCaAmz9/gntHQX8k+vbXk6+P9sjh84JKaoxaKHPk8C+WKnZL1UlpKdV+Q l0TUmLTrEVkpz6rNUk9yht3Zvvy1eAccD0X1A0VUDPrAhj0FTG0pX773fP/Ao0y+i/ZZ /rwjfdU5ZNRYv7Qgg/yP0q6lfQ76fYpJR6KGPECATo0hB7EVsQQIwd118nun9QSRdm6T 7ogQ== 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=KQK78mRvmg7BIvxkhY415BOA4pyq2PGWvhZKnGW2848qF784N82mdm8PZ3WVam0v7w aYXC9bDW6ubJvg0HUTAbZzw6OO0e1WeD6ptCncJmMc1IUh1X84ISy9vCfATTwLtPMeCh kmKvad5pZmDj2n76pPYpIT6XBAqR/qBJp+fgE48eRClase6igPWqyjR8Bk7Ye+OxYyJ6 1vPOGzLTy/ROZU9ZIuxMyrdzS+qKXEIlyV48+GZiJ8fLH4VZjqiQRDZpBxMJ9H5sDcYF oDKpMyzn8DGJ7LXpljYxJ6SR8E0OHNKDQN7t2tZnBebsyBuDMTDKnGrWumn5cUy4iL/8 yLfg== X-Gm-Message-State: AOAM533qgZ7ZA6+syccmqP2UYBiODsjRoUd9EuqlfqnS8fUJRH0iX9HK 4+o7Qw7f+grLOFVGx8+jQ/Y= X-Received: by 2002:a17:90a:9e3:: with SMTP id 90mr8918880pjo.66.1612777542034; Mon, 08 Feb 2021 01:45:42 -0800 (PST) Received: from localhost.localdomain ([49.207.205.214]) by smtp.gmail.com with ESMTPSA id k69sm12208958pfd.4.2021.02.08.01.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 01:45:41 -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 v5 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Mon, 8 Feb 2021 15:12:36 +0530 Message-Id: <20210208094238.571015-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210208094238.571015-1-allen.lkml@gmail.com> References: <20210208094238.571015-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