From patchwork Tue Jan 12 01:46:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12012127 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 27715C433E0 for ; Tue, 12 Jan 2021 01:48:04 +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 B444422D6D for ; Tue, 12 Jan 2021 01:48:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B444422D6D 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=3f9jcC/dayf0T/lNKkmXG4cjbdvz9jqoECNz21y+lzY=; b=V0q8/Rb3FQmh9g1HKvLlb1DW0 N9IxCJXE8NllNmw8V35QEOIODfqksClrIR3YjuprJrXzAuJZ6PpDWvfjTifuIjdRq/FfwmcGCJNty bUVq6flT+1rrBJDT8y8aLB9x8GdMhnsiswkdHPsbX1mbqUGj0/HUaM8VR2RGPDdkre/kMXJZWWJKw Fx2owQpXmiX5YLWwkgt5dW+u0PKPTrXY0NSQ1y2u2bZulT/nHPJkegrkNAM+3m9JOVG32NMD5fdBC jh6StQimEiaaWUDjkC+L28kjzMdavHqbQni14MVOgnhNRkwSOGNlj58LzYHZ3D9RBVZfuK274hFx9 GmMLpLDYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8ml-0003Bv-33; Tue, 12 Jan 2021 01:47:51 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mi-000393-Am; Tue, 12 Jan 2021 01:47:49 +0000 Received: by mail-pl1-x630.google.com with SMTP id y8so514797plp.8; Mon, 11 Jan 2021 17:47:47 -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=ks7Js1jgY2/Ug4nqbrFh49EuEhAamk46pfN2EmVYd4W9KpqHsfRFoIA89qSGdCgrz2 oZTecko/ujx4hor3EJHfK0cpGEUiWNyrNDhw7FH3HOMh06SsSx1sOQS+ai/hSoxdIO0s f8DEtCPTqle11h4/aRQ5/T8K0ihzaLGgmzMJ4imBMXmRdDhykJkwh/9XlA9fOHf8RQk9 O2lhWquIWI6opTRTv/PBNUmtkIF8C2XmEu6u4MbvX1c27LqFPg2FlMPxfCv/6ycTbeGF KuBJp32Sc+hAweSARTXr3VaryLRvO2GMhO8KqGxIynkpCPgQ4kN7INORytisZgTqofTK W8lg== X-Gm-Message-State: AOAM530soSUXGSlu9H7KyMdtgF+2lV4Wj5TbkdxuowklbIJhDG73MrxP af9lB3qERYaQqrQjMfMphZc= X-Google-Smtp-Source: ABdhPJyTDsH0JvPVWAJSKCCZ0fNwYXHtd/8sbx45wvu+0Xfc9BHtL6tbRakBFNIyS/n2zR6vRE67nQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_204748_387574_BB14B389 X-CRM114-Status: GOOD ( 14.18 ) 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. 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,