From patchwork Tue Jan 12 01:46:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12012137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C0FC433DB for ; Tue, 12 Jan 2021 01:48:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58B7722D6D for ; Tue, 12 Jan 2021 01:48:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58B7722D6D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fOWvJIiVCmL5/ou1gu4rc43qqTNvvk5I9n821vt/wsU=; b=Dwf+GX0FiQVlxUEGkGivZhfg+ LCk0pNuIPCFhHjhVm8AA4PeX7z5isceaeqfDld+cXxsisk0ks7x7uRkgS1mqd1JOMRj7jMqO0CAAa 1VE/yF5eCea8kPdti6mNPR1SOJQSjU4L00J+yhyJGYYmTQ+LsVPdGuux0ZjTEkVtAuHLlL6x3j6nb Tmpg3SIVyV4wQlDfARw7euw8fuBnG6/kSFivvwk2LnrHSRRbu6ki37kK8jhc6bLorAJhDBEnZoMK8 gmqV+vK4KdbC+XKPXh8Iurc5Z45gF3Q+PY0rqZg1liSxY0S9Z8oXGaEzx6w3/46J2t5KUJq83XdRP O2Pf+5pzw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nY-0003cb-Dn; Tue, 12 Jan 2021 01:48:40 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nU-0003Zz-U3; Tue, 12 Jan 2021 01:48:37 +0000 Received: by mail-pj1-x1029.google.com with SMTP id y12so636832pji.1; Mon, 11 Jan 2021 17:48:36 -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=M09HSCfSir62u5HnSP1MK9qS9FctY1quDgEXeJ1A71Ze53Dg116DP6MdpR1zxD11jl +Bw5eJOL62Jjuirn2yWCya47Zb6KUjtJk5GxF83xiDb3CC5sfgkg7oK1PlAV1SZRs7Bz P8FZO1zLaduEVlUgMcmJsW2UDQROJwWx/mCudXiCUdlQr0pQ4AVsKK/a8O7zRpODR8aS CoGH4WXD/V4ODiXwsnWpLtlgUJOfgKG83EvQXAxdPoPDDhXIgvbxNCXMfx4bZBMKvOnj SDJ7OSR69edLIZs1x7Bkbu+WcgLkiP6VFtrMRU3E2YIpQ1VHSjTqZ8aEMy76qzG2SwB3 VdVA== 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=W5GW5oDTXfbl/UV4e6X67uRvJ5z88HYisHO/OLTwq9tY7lXN5kANi6zllY/1GClsbA GgiWV2sU7Uom0ZxyZUymDihwElP22yIWI2ild2sQ8nMsYO8qrKX2ZXqQvcyPCtJzxn78 4CdsQWGrMU1Dtq9RahYaMWabiT/WRVaX28iUxx9D46YIdFNaInqy+ftcP2nZ1rOesJ0l Q3yRJYdhnURrxHek/msedSbshdnrmBFasw9gYj3y/q+vJsgGrp72uPYy+runEINflDgq 3wHg9Nll2Mc9j3kUc/qzAtojIDOLyPI6u9gYiTwr1a/l0ojLrqhV+OIgyKW0QRXVpPSg WBTw== X-Gm-Message-State: AOAM531sLL4biohYeeMhwVI9ltPyWxkQCh+wbPMHzYfj492N69l6PGZu 7LShcIue6qGJHtF8qFuXGjdXY1Dm6JI= X-Google-Smtp-Source: ABdhPJzQu/E/mY43VnJ/eXIQn39xOyztWpVic9U9RwF0peXg7JfTQosDtN7/RR1ZlInQT+sjJ1cYDg== X-Received: by 2002:a17:902:8ec1:b029:dc:8ae1:7a22 with SMTP id x1-20020a1709028ec1b02900dc8ae17a22mr2678535plo.6.1610416114971; Mon, 11 Jan 2021 17:48:34 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:34 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:40 +0530 Message-Id: <20210112014650.10887-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_204837_011807_4AE4C898 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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);