Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp740215pxb; Wed, 20 Jan 2021 20:46:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQCyKhnpYFrsxxeFWVe7ypTj70ONAcZ0iXzI3gml4355iBvwEQzcShG+DVqRnB5okwOTDt X-Received: by 2002:a17:906:a1c5:: with SMTP id bx5mr8254307ejb.284.1611204362241; Wed, 20 Jan 2021 20:46:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611204362; cv=none; d=google.com; s=arc-20160816; b=tmaL6m07Dz/Qz/NGDdAB/KFa+xlk1iaNuVfOetdWfDXKlxo+MgzCNJmZ3x93QAySW5 7QQQCjwP+BVHGkCq9TnGDpLnvtccWm6E3OFwjy6mOYvrxgvqVNQa0IS0q9M67ByzpAeE yzVUZkUYBcQNqalWivQqZRs9ETjyFCcNdCmu5JXKZ+kGi9sGfHgRgMaOSvRLbyH5WiSH QiELKEBLyLvzyazNDoIem7ePbzpWImp+Ygsg1olZpyJ6WZWZn99cILQglfA40j7D6G+w 0QmmEUZK70tKLZMBHLHI8CJyYKejny4F2Zpjy4BIhlAuLwMM8bSgUmgdp387j1YIzRe0 S7oQ== 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=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=yXQJpHxV0DftarlExG+UP+GS82ggzxO7FAJvOAGtsaYoskS1Z5Hb0WVxqQOtC1zfg0 U1/wp/PlMxs1DtRAhT94YQxkc5VK5sfybAWJkkNyRaI+jXdfnf5BuNkQh6pY/kWlp7RD QSRgRt0pYefTk9OC56JLO8yLTkmYABILQGw1lQIKT2rAH92NKN+3KecJiAJquxWC+jV3 Qg/I0lljhsyyOt93rC+zqhAYi5Z5/1gyqZVp4iQ0tYF6XYqM9ujuzUs1pGIeT6bjULST Jir6CvXzKl/HaBVzEg0BnE7Pc78b9wEugJ7HIW/JJmz7fMskBTCpLLoGfzTRTT4y2bLY TweQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wj7sCM9F; 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 d18si1358681ejd.342.2021.01.20.20.45.39; Wed, 20 Jan 2021 20:46:02 -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=Wj7sCM9F; 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 S1726944AbhAUEpF (ORCPT + 99 others); Wed, 20 Jan 2021 23:45:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732424AbhAUEn7 (ORCPT ); Wed, 20 Jan 2021 23:43:59 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DB61C061786; Wed, 20 Jan 2021 20:43:19 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id e9so601764plh.3; Wed, 20 Jan 2021 20:43:19 -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=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=Wj7sCM9F4vpkLG30GosPvfXGOs/DyTzA8qlMHZCc9On0HanCIoDHRg9iVGTBOb7ukV 9eQbqyr8N2wGu9rkSmPb/oATEJlXu/AQL5ePLDblfiMWp8Vzb9wjYXhSf0tEj6RfV1xD Xaa44AdOFoZl00yDcdiouo2F/XS80/Wlv1PmnVuI0HOe3klddc4VAcFxaZY2ltn2pkZ1 d9//TjIqdEle6uY/j2SGZzjfkRX9mtDCrvvtGNBuklsPa6QQafOsvbhFIwIdqUPA3D/6 3qyRCFID8CiXt3/5vUZtXVCYpr/PBRGrWiRgqlDW5g7rZjmkaOfYpThazPuu7BRfZb+r SLXA== 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=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=Qr6DfhrjSfUlNQOMn/plZ2OhpqRqAcZ/kW9hPIq9RV6XPHUIxk5CbaJ5e+hwRAEbh/ HqBnjeSTUoe755iQuefGXtbn47ZCckBRBANPiLxolq3vxFxNYr30lSu3LAvt154qpqsI nRxN0IurTX6GVHacdNmoUXSvi2Th3CKcTteiutuWS8fsbMVvd29Wd4+iSlKENdfkFsfT wI6dE2w5zcwDl/XF7nbyyYzOHZs259eVneynCRLuDfU+f7wWGQS5OXtL9ZMItwl2/XJO 4qlbPDfUVFAvMf5B1aKMj8isUc+dp7DiT/v0YHiPMq5Ip/rMtK4xGmaMxnLJREYkg/NF wYKA== X-Gm-Message-State: AOAM531XEdfJnfuTUKF5i+ZffYbanWUcp1++JheLrgMguM/dZw+T0AsR 5nCjsoDNQTFbJ7y9Jj2ETbs= X-Received: by 2002:a17:90a:bf05:: with SMTP id c5mr9623039pjs.90.1611204199054; Wed, 20 Jan 2021 20:43:19 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43:18 -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 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:16 +0530 Message-Id: <20210121044126.152274-10-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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index e813115d5432..72b65cdff856 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -355,9 +355,9 @@ static int img_hash_dma_init(struct img_hash_dev *hdev) return 0; } -static void img_hash_dma_task(unsigned long d) +static void img_hash_dma_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)d; + struct img_hash_dev *hdev = from_tasklet(hdev, t, dma_task); struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); u8 *addr; size_t nbytes, bleft, wsend, len, tbc; @@ -887,9 +887,9 @@ static int img_unregister_algs(struct img_hash_dev *hdev) return 0; } -static void img_hash_done_task(unsigned long data) +static void img_hash_done_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)data; + struct img_hash_dev *hdev = from_tasklet(hdev, t, done_task); int err = 0; if (hdev->err == -EINVAL) { @@ -954,8 +954,8 @@ static int img_hash_probe(struct platform_device *pdev) INIT_LIST_HEAD(&hdev->list); - tasklet_init(&hdev->done_task, img_hash_done_task, (unsigned long)hdev); - tasklet_init(&hdev->dma_task, img_hash_dma_task, (unsigned long)hdev); + tasklet_setup(&hdev->done_task, img_hash_done_task); + tasklet_setup(&hdev->dma_task, img_hash_dma_task); crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH); -- 2.25.1