Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp265281pxu; Thu, 7 Jan 2021 04:34:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWDlFurWWxGLDod6VLssPUWUd0joyO91euBGM994+ous+6V4fcmMFw/G6nCvWT2Rszf9cP X-Received: by 2002:aa7:c3c2:: with SMTP id l2mr1495328edr.15.1610022873570; Thu, 07 Jan 2021 04:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610022873; cv=none; d=google.com; s=arc-20160816; b=XXKIfd8bwBOSDoxBrYxwAOADXtCGlOmTpGLby5ZQN5fLdYiOOW7prkYS1IIKXKt3LA KL4Bju9kqAZgo2QqFw3iLKTh5E0V9fnuFJHF6pYYFpZeIeIiniI64ZioWZszUVCJLkw8 CXY64XP6DKh6fzhzK4KEEL3cwcMIz6h1EnZb0oE7CW7eU7HUW+X6n0lXWaY4jxcfBlua RgWjb0ggKmCQU13yoF4DOBkOq9vlHO/5XTJygE8I9/yYlrO14OA3Wx8YGeYPfAq1m8/J 2B+nq8FGpNSmK6uYJ09Ej3zXnGvBo14D1W6zMdHDZYte3rXHm1bh0hiSgxvQi2Xs4hyc m1JA== 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=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=N4E5G67g+1PHtrs7wxtQIZvZIhTixhl++xJWkh6ahtToXuoqi7TD6j9513Y/f4JFLo 03ZyuP4YSbGNcjizRgec14Tl+X5ZD7NKPgyuaYVPKXNwfuq6LqVZC+HN4N2MPMO5DzTg hovU7NlIMdwMlpP2wb5SuDoXPWTTqCr7AtykVcMtt23mipSsddO++Spak0iQUPoE1zf5 MVVYe73vh3tPFZJ2YM6ghMN1ZjocslFjI992+cwuP54LL9wstJAccQX2ohrr7lqR2Ge0 V8qgnFbjwOtaoLtmnTbmDkjUohOfPqEJTkA4tQJ007Jgyfl26g57sDR17R6rmundUNZN 4xGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kYC9dTtW; 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 ch17si2177961edb.430.2021.01.07.04.34.13; Thu, 07 Jan 2021 04:34:33 -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=kYC9dTtW; 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 S1726768AbhAGMca (ORCPT + 99 others); Thu, 7 Jan 2021 07:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbhAGMc3 (ORCPT ); Thu, 7 Jan 2021 07:32:29 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA19C0612F6; Thu, 7 Jan 2021 04:31:49 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id x126so3768063pfc.7; Thu, 07 Jan 2021 04:31:49 -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=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=kYC9dTtWAXY4xKQ/GQ4YLzK0W3XwA/v9tBfEw1XfRdYS2voXTYlj42FmwN8IFu5Bfv JMQMpaQ36VXpv66DlJg3QqoQ4lJ+w6o9RUwX+2gf4WQEnAXnLa9yv0AeaaGapgFX2Wzu 42oR762tRp1x4BgfjO0MazixRgcE8XcydZMOucaAGjhtcrfEgRHl4cZBdtKpVxddNwhf 180qtNIApokfroeh0cNuMVn2VZs98TX8E2dpqj2a/osygcmHAKUg+WWTqLpmffGLDfJG TBBo2IvbLVQVcBx23WQBH5JTqhtWgYwZBLt55qL3vLmVL+PDq7Su3mMWiJhIjVlfCTLN zLDw== 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=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=MGMDPB+Itcq5Cy8pID5+Q73j8Gl12PrQzHhJAMaoQY/vRXRZ9juAniDutjtpr9iwv3 bso4qz4DTelblEqXcximcVTCfpqnQlsSDyApbK8ImXmafm4eo7JhIlzmi0CihKcBgrue fyDmIzw3WqlxKM3xhw0O0xbnhHUtxBWCQrkT1S0o+dXjHFT5JfJuyIh3cQ6wsn7vbCcA 5g5+l0Gk2RdwHVjz40jrxA6qbJaR8+0j12kpFmijdOgyHTTCRZNcrA1IdX8vTxlziOh7 0sHmqQi8n7UZFXh85zjqBsIuKp7NE7e04aVe1o5li5fc1CdMD4Vd7LFl/CKVXGpRNbdB 06iQ== X-Gm-Message-State: AOAM5313K9Eb4a2AVnZgVXTFhj6XRPRySA18CgYYYqeYKBWTvMVhzH3v jMuaBx7lzAmAKtsvmU704qA= X-Received: by 2002:a65:6152:: with SMTP id o18mr1641272pgv.392.1610022709048; Thu, 07 Jan 2021 04:31:49 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:48 -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 v2 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:41 +0530 Message-Id: <20210107122944.16363-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-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..af6ad9f49009 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