Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2960456pxb; Tue, 12 Jan 2021 02:57:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoJT7cgHiODuVWIAQcguuaSgV7lqYVxFp9LDYR7AO5BNkfwcx9bfOXFiZFGaBweAYMiWL1 X-Received: by 2002:a17:906:5182:: with SMTP id y2mr2850404ejk.92.1610449047468; Tue, 12 Jan 2021 02:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610449047; cv=none; d=google.com; s=arc-20160816; b=Au8iq7C/tFxywyYIR9M8dFrQm3m9N/pMUYM73H9DdUt2n0HvEaPXChmacSih7N5k7f ChhO1aox0MLiRLtCfSpA3MFG74DrKthpsnGcU9PiD4pk2hHXoUZNZt3lvzM9l6yHKppP 8wVGHwpAR+LqTNX+54rTfC675Lb2qmH87vEJv0aKY6Nd90J6Q+QKACHVLoAIn+ci0jL6 nUEuCk//fmiCbB38MJwcG8VEOLXr0bXJFTT1DmCR+M4zD18kQEWSO0wFd6GMAQFNX5U4 RQIu/XPyvXLiUBdyiR2oQmo3SNAxbcB1ENeDI1xuEns9b7JvXVKDNaugBSQf285xjI2p i8MA== 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=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=ZZ+BDXkMWxCJO3k5wkK+ChkqzLk/6v/8qcrYbdL1dx6C9839iJJy5m1JEWTUE96llL Np1xYVWy7Pm9MjD2Cofu17FzOmKMlKW6h0HN2JmonelxjVny8GOoxaySSMTL/S2AcvWw ATIv9qv+hg1NV3B6WdxKr52NZXJQgRhNaBYo4aAT0mQbSMZv2Iz0vHXb3d7sssADnobF De7iO1auf00HrWOYVevp/oBoWVH5hV0q5SI+KW93QDOQBrmFwUcvTYuBYQOAqxnexqLV nJKgy6W3mBaNBX9m/rsoLnVRWMHuIFhL2lQ2EwiwKdb6seyKQynqjYceJAgN1N51HaLF wlQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RJUuJ34g; 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 o2si941349ejn.501.2021.01.12.02.57.08; Tue, 12 Jan 2021 02:57: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=RJUuJ34g; 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 S1727708AbhALBs1 (ORCPT + 99 others); Mon, 11 Jan 2021 20:48:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732744AbhALBs0 (ORCPT ); Mon, 11 Jan 2021 20:48:26 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C0DFC06179F; Mon, 11 Jan 2021 17:47:46 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id q4so517691plr.7; Mon, 11 Jan 2021 17:47:46 -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=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=RJUuJ34gzSSXgEmLEMH6F9Sgq+AjXpRBfq9uOyNbGeEVo9Zni8GVwIioC+KBKuBUwb 3Hz2ntdsMokLeu0TtA4u6cWnxJVq1h7CHSCNXhh7wxMdZKrASnNYYuAQ68EvklLWwsRK Zl+cGIFjCy1cN9ZKNf9Ejtz5nWCTPakILZUVFEh4+j0jeTMCMe/0jSJHwiWtZDwB3Z98 ITpyOO2Xzhx0Fv9X9F+ZlzFPoeMTosFBNzkNH8p/Hyba4vxN1fuiHVkTt7i4BaOtOSoB ivGOKO+FZtDra7bSh1vZH6CArjuKeKOfVdsThHZoD0dqACAhgIhIHq0E35mjkk75NJkQ 3fDw== 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=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=Qo8RQO5YW1BqCgw/MmqCvTJ+auMSM3zIz1B9vB7u3RYKvg82bv3CX4q3TELbCBuIPi cRX0pVgrwn35j97HF2et2PMgNRQqqYx4T4gvdHtUFi/MtpcXQd9ujF45anf5Et0PXVqh YAhkFJ/YGdZ7UIho5Q6T5Xeo/vmCp+zbfNnA5d613cU08PBUw7ArYBCX3LdFThKdux9y AXyuxEF6n52luO6f9OQ+fTwQnR7+wDWhlnb85QNfAk+VvhDD0Jg1I7I7n4D/1FspcVQ1 1wlQyvGE4lV1Pxv+2e2ZTFEj3y3cq1DAfmsGy9jufQz3Mk8YUyjStkHOBNzber04IsRn G1cg== X-Gm-Message-State: AOAM532wapBlExt6cWUvegBiE8ILoARC+xjKPejhR1RPDbOl+V5g55DK G8dqFWaAPuWw44/dE61NQEw= X-Received: by 2002:a17:902:ed11:b029:da:3137:2695 with SMTP id b17-20020a170902ed11b02900da31372695mr2689863pld.1.1610416066062; Mon, 11 Jan 2021 17:47:46 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:45 -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 v3 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:35 +0530 Message-Id: <20210112014650.10887-5-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 Content-Type: text/plain; charset=UTF-8 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. Reviewed-by: Horia Geantă Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/caam/jr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 7f2b1101f567..2903e1af0a56 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -9,6 +9,7 @@ #include #include +#include #include "compat.h" #include "ctrl.h" @@ -201,11 +202,11 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void caam_jr_dequeue(unsigned long devarg) +static void caam_jr_dequeue(struct tasklet_struct *t) { int hw_idx, sw_idx, i, head, tail; - struct device *dev = (struct device *)devarg; - struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); + struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask); + struct device *dev = jrp->dev; void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; void *userarg; @@ -483,7 +484,7 @@ static int caam_jr_init(struct device *dev) (JOBR_INTC_COUNT_THLD << JRCFG_ICDCT_SHIFT) | (JOBR_INTC_TIME_THLD << JRCFG_ICTT_SHIFT)); - tasklet_init(&jrp->irqtask, caam_jr_dequeue, (unsigned long)dev); + tasklet_setup(&jrp->irqtask, caam_jr_dequeue); /* Connect job ring interrupt handler. */ error = devm_request_irq(dev, jrp->irq, caam_jr_interrupt, IRQF_SHARED, -- 2.25.1