Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3860455pxb; Mon, 8 Feb 2021 01:50:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwF6xs2IsxYeGcU6WrEDwp2/+YCwcr1iTeecX/NpZgyGnuWZ6jQssjuf9wCQlBcY7EWlOci X-Received: by 2002:a05:6402:6cc:: with SMTP id n12mr14263997edy.69.1612777830209; Mon, 08 Feb 2021 01:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612777830; cv=none; d=google.com; s=arc-20160816; b=Hkh4yHF+eoJlnNAh9ejV/aA2wVz4eg9ZanncTrwQyNiW5TTBCOlQ86aMDej10PembD ZR6/MiH7ZzNvz1yMbxY76B82Vyw6VVyxkQCSvkixql01p1S8X39SXpP7CaaUbDrQt1rB 0t6BNmLDc/G3pclKNi34R3XfF2HX2LWgt6b2gQlH/sxpXOWV70mPneNPN3GZYUho0gPH GdEYvwBLoep9EJ5G11+ykM+/sv5yi7nH1A2n9s75QPMIEj+oEh7H1dbAAO7Fo4mfyF9p Kw7GnUZYSlC741Z5pNadvdsEMqXcfYxNz0LQOtz6VjXTUK1DC7ScUumiebyWB5rSbv0l /tZw== 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=gXWVpXiagIDZwLZtqnq/fLKudXR1v3qt/1USyY+nLdtY8QnS5arWDErX5iPtZ4CapT ZsQBvExL9BguoAo10YOFcmnb4BNY9BkmxvWWNVk9zvCKAba5PWqNi3rQhvH/Yqtt7tTM vVYaRdAkHdZ3fX9AeLmEAoqJlrxD8lUrE1ZL4SS1yWxleNOVZNH/o5dvzGgtKpaMlBz1 EHbk5i6iIv3iAffgY5DPIH+axDZ33i5I8059QkvSZQmoVNbgzdHU4KbCBzvDOZtGdv2B Wls4sEAp4Mm5/Qzp0trhcOdo1OCqw0Jn18O4D27DONM78tqxZm+lVmyR2zKabTtwi9E5 g19g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E9UVi4ab; 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 w4si10697607ejb.499.2021.02.08.01.50.07; Mon, 08 Feb 2021 01:50:30 -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=E9UVi4ab; 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 S231910AbhBHJtq (ORCPT + 99 others); Mon, 8 Feb 2021 04:49:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbhBHJrH (ORCPT ); Mon, 8 Feb 2021 04:47:07 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8657CC061221; Mon, 8 Feb 2021 01:44:27 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id l18so8465681pji.3; Mon, 08 Feb 2021 01:44:27 -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=E9UVi4abvaxsbLhlHYyDlxF8WRm6Eu0gMRiLrkvvtuXqnPnqW6bL/KOZ5PtwqvI7L0 rr/mjZFilH2Hx/ngpK5+H81e3vqpySwZoJTo+05vSEiLs6urR/Pk7xeEkQq3955cfLQy PDniBGHgBVTpAvBzFgL6HTS1Z1XXrDbvdPMxB1lKgQ6a6LDsJOiauZP9MYqaavtk3SfN n2agapT/l7OsKweIbp61n2EXJS4S7anhuLKppP7bPX4HAQ7oHxxBu04I7PZ85idFkDjW oNUFRt9BJ72Nx85EdziKeK/dIrL9M8B5gXEnis4KZQdrUUH5mSjubnWGQ5Ljme7a7Z/p JMxg== 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=K3YsjEOdRg2mIIRc8DpTKGFpv6mKJqEl0k2qmGg4zm+DWpCpcK1StaBHrO0Hk0YC6K XFIvRro99+cyvWbJ5tlrf52ehhLAnABIQFWlq+XA6RvVXhDIL2fFWhmyKCBaAxEByKz0 BYn62hqkVZ5ne+lp+7is+4jFJvUUHzfEyAM1B0Xonzt+10iIp/f+BitOiVLd3mEGoKyw u179OKIjXAqQfmvppM7sr8BKpYNFhEjmauqj6Shapl9KeOvQqOic6R2NQ3fll5LMXQaz iRk3uenyxrN6DexZSj0V/KDN1pY64mQquC3xI7Gx706qLJx9oRGEB5AzesY8bf5dUpg/ svQw== X-Gm-Message-State: AOAM533OvInGEF5z2S1VHXtmnPQbhs6cLpGwUSWcs/Jw/PStUsGebT3V 0qQd2A8vs+vb8+DpEO9bgY0= X-Received: by 2002:a17:902:ed95:b029:e2:d080:7e0e with SMTP id e21-20020a170902ed95b02900e2d0807e0emr6794449plj.85.1612777467166; Mon, 08 Feb 2021 01:44:27 -0800 (PST) Received: from localhost.localdomain ([49.207.205.214]) by smtp.gmail.com with ESMTPSA id k69sm12208958pfd.4.2021.02.08.01.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 01:44:26 -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 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Mon, 8 Feb 2021 15:12:28 +0530 Message-Id: <20210208094238.571015-10-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. 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