Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3860881pxb; Mon, 8 Feb 2021 01:51:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpJi+TzHHyY2VjszVsKlnZrHoaDfXMkQCoO4thH/y8URrl4oVcGaWVE/TXXL+iHd4t8TdR X-Received: by 2002:a50:b5c5:: with SMTP id a63mr16244026ede.227.1612777887769; Mon, 08 Feb 2021 01:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612777887; cv=none; d=google.com; s=arc-20160816; b=T2yKTeqWKLklnw9LDBliibCWTjWGxYPUFPgPbAZ3j3cPR5GiBPDKWGnaViCoLS0WLV Mzo1gyS/s1C3OfVUJWAqJx70aff1jys71/MCIkYet9cBdLBCn3dhy5zD5WI0QZD5CcZs EjVZdwh4zeixbsf/OhWpF2Q23lkuEBm6eYqAPasFFRSNwVszy+eqHhuS71HmOpV+BrYE ibirk3gdO9LdHzA3nHoYNTA+R/cAfZl/9TWUui8/laoQI8vM0Y5Hhl0FXTpOulJx0VMY B6xrYgC/DhpCQWrSbk4MMYhgqm6BS08WpQQXwH/IijyowuKZzclHO5FrmcKQZrz5o0Su 8kKQ== 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=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=oSn01GWDqUT0xqvYa2jO0Lc7cwS6fgx2P6uiJGoemucD8BfdlLYgDwTpSooLt8rNGt /UGzRDaZXQlV25ej0m8ikRm0NNZB9xj4EGISviRw4tYWD9E/y4u6undZaWB+0apB8ud/ oZjn27q+N0jAVG+a7Tn9pFT98E34lGKp8Tk4Sg7G2zZFOV7YyghuxNFm39tgAwOTs6zB 0ewVJyQ24WPgk8LSFimCIjz8JirPWbEN9Sp8nuh5Wxpr49xBrtFqMZIMeT36ABzG4ChG 38QhxirGcF1+h1saNnO20ovDeoHFGLROjBAajoPpczNACIwrHulj6y/xQcvs43uxU2EN W7fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YJvUNAJ5; 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 lv10si11635490ejb.505.2021.02.08.01.51.04; Mon, 08 Feb 2021 01:51:27 -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=YJvUNAJ5; 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 S231947AbhBHJuQ (ORCPT + 99 others); Mon, 8 Feb 2021 04:50:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231951AbhBHJrc (ORCPT ); Mon, 8 Feb 2021 04:47:32 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC22C0611C0; Mon, 8 Feb 2021 01:45:32 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id e12so7525830pls.4; Mon, 08 Feb 2021 01:45:32 -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=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=YJvUNAJ5yWFhEd1FkVQ6qf8rEdQqScIkeeQBVSNUj5gip2ZMX3Nmh8TkHYZvVL2eD8 gM907Th6gGlpZMg1RHLSQk4Scfgu30CDgZZ0yrLoHlgO4bLoRzBovvZdQ+7igAtbXnJZ 87Wnr1TTAKaxdSTeZ29gOyMEvNdOBa6nUKVajbeU+8A3cMrjugRHUWev5DQX1n9PHP5+ F7be1ctOV3F05l8Idlmv5rFtb3SyhyqhqtCELmSVOwyaWpGLM4idq3vX4gcQznfil2FP zKeXVV9oGhAD3Rd4jK302fvRGzBacP5ZR8JNrX/0xrxZfP6Hte/ldS5nwYo3urGe2r7r hcNw== 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=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=DRNdLCRfGuE+8LODFz6QLlAZytInlj4jLIKqYEWZt/UIC5oS+XSCWdIqm3k4CJuXZW HjLoUJl/hMs8YyV7VaenEKDbs2BCWEcBFf6GNZLf4csLnZCKQjhUWJAixDn7TfZfXBY/ +MOASNdkpwS84qiiNRtI4VPym6qktJ87p7QRrxFoOdvzjKUItPXWh/qQt0510jP9bg42 vf5PHFVUfO6Dd7PILQYJsuHZHVLX721sr0hh8YV2h6kElzV6cwIxD9cxJUmRdohk0Ufr VJki3B4jSBRHiEycw11UT+t4j6Vxqm9bVWBoSCYdzvu+NJhy7tc7SZiStVmlPdzlJLZN IS8Q== X-Gm-Message-State: AOAM533VLCp6a3OoteW/7zZ8k2U3p8B/3I1iO+UG3IMrAy0TD8o/5Uo5 HUzVDy1WI5AGPRAO1q7jEVQ= X-Received: by 2002:a17:902:fe09:b029:e1:6964:98dc with SMTP id g9-20020a170902fe09b02900e1696498dcmr16012094plj.24.1612777532604; Mon, 08 Feb 2021 01:45:32 -0800 (PST) Received: from localhost.localdomain ([49.207.205.214]) by smtp.gmail.com with ESMTPSA id k69sm12208958pfd.4.2021.02.08.01.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 01:45:32 -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 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Mon, 8 Feb 2021 15:12:35 +0530 Message-Id: <20210208094238.571015-17-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/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 35d73061d156..85f314c79734 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -201,9 +201,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -231,9 +231,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -389,10 +389,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; -- 2.25.1