From patchwork Mon Dec 7 08:59:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339218 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 4F142C4167B for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18C632333D for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726484AbgLGJBR (ORCPT ); Mon, 7 Dec 2020 04:01:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJBR (ORCPT ); Mon, 7 Dec 2020 04:01:17 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4886C061A52 for ; Mon, 7 Dec 2020 01:01:05 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id hk16so7053131pjb.4 for ; Mon, 07 Dec 2020 01:01:05 -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=GcAYPi2He4WT4nOyUOQGohetD9h1+ROi0M4lDzpFuEs=; b=VOV8u1XTI0VAz3HA9t+q8ngVh4xQNv9Ga6L5nTwucsy3HdNJfRtCWwTKPnQnCcoNPu 2Q3wJbMhwYOH/w4mrPg1IaF3MymiINbTLpUL97/JNKLiW+PUbVLgO8z178MTnRLZ7Nyp 6HOJfQnL5do6xUg0izme0oXWd6QSmHHb7NCzDdDj4DckYqbcHFgIQGBjX01PbP7arAMc ZlCCyQkM8kMSUFs3J6N/pP+vZfPfUcZ52IF3iQ6QCuDAGgIQk37SliFGZGs+sC7Yo89n b6/ksoktxFyQXl/alFAFlkHprH7FGtHxZspPeAT7ZngZNmShXGmPLR5wE3FCqYyr4/lI dGNw== 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=GcAYPi2He4WT4nOyUOQGohetD9h1+ROi0M4lDzpFuEs=; b=FKmnz4ROjIe9njOXTcL1IYeIUXSOneCZfDLwGjLMby/F7bJKwmCZGzfuQDMeziXk+G jKFPdwPAr1nXC3NOO34xRro3J25z8iAqsKfCY0gf+z4B67Ubfdy0+lOabef9GhbEXaQG lU2Qkz4419FB4TeuA3BQoGyB14z5w7kp+18ixrnfCb+XCtPqpV6+QyDc+R3udqzrZnKV Cd3AFeFuRdEyiRWpRs14FvfvrcAhpg/B4WqbWEgwSRIMEqvqHjI2g5FxkyuKgkX0weA6 nTqvJfMKNklZCTpJIprtMnEal2L1dFhfswaZhsQ6FfEsiOnj5e778k3SOQqo1UWJ2V8p 5xQg== X-Gm-Message-State: AOAM532id9EJTKTOheJkmIFKEotWcAbePjsP0Zp+k6W/8L7v/w5sXiOX I7qJxH5K8zOSFu0+C/Y/yi8= X-Google-Smtp-Source: ABdhPJxfImiHKFQRVZn5gC/bvjgdR1cccZZfapyciDpBcOB/T1UnrT+NVihU77rjdMI1WO6BsQo5Yw== X-Received: by 2002:a17:90b:215:: with SMTP id fy21mr15747225pjb.227.1607331665241; Mon, 07 Dec 2020 01:01:05 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:04 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:24 +0530 Message-Id: <20201207085931.661267-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 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/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 4fd14d90cc40..4eae24167a5d 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -502,9 +502,9 @@ static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); } -static void omap_aes_done_task(unsigned long data) +static void omap_aes_done_task(struct tasklet_struct *t) { - struct omap_aes_dev *dd = (struct omap_aes_dev *)data; + struct omap_aes_dev *dd = from_tasklet(dd, t, done_task); pr_debug("enter done_task\n"); @@ -1150,7 +1150,7 @@ static int omap_aes_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_aes_done_task); err = omap_aes_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index c9d38bcfd1c7..fddcfc3ba57b 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -594,9 +594,9 @@ static int omap_des_crypt_req(struct crypto_engine *engine, return omap_des_crypt_dma_start(dd); } -static void omap_des_done_task(unsigned long data) +static void omap_des_done_task(struct tasklet_struct *t) { - struct omap_des_dev *dd = (struct omap_des_dev *)data; + struct omap_des_dev *dd = from_tasklet(dd, t, done_task); int i; pr_debug("enter done_task\n"); @@ -1011,7 +1011,7 @@ static int omap_des_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_des_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_des_done_task); err = omap_des_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a3b38d2c92e7..b0fa0443793b 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1724,9 +1724,9 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void omap_sham_done_task(unsigned long data) +static void omap_sham_done_task(struct tasklet_struct *t) { - struct omap_sham_dev *dd = (struct omap_sham_dev *)data; + struct omap_sham_dev *dd = from_tasklet(dd, t, done_task); int err = 0; dev_dbg(dd->dev, "%s: flags=%lx\n", __func__, dd->flags); @@ -2083,7 +2083,7 @@ static int omap_sham_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dd); INIT_LIST_HEAD(&dd->list); - tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_sham_done_task); crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH); err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) :