Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2126259pxa; Mon, 17 Aug 2020 01:11:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOnOF3Tzo96I+BhXedP+pm0D9DCXVSgAGBlrl3s/szyinKlCHmk48axwFfmMReNanrlNfE X-Received: by 2002:aa7:dcd2:: with SMTP id w18mr14372410edu.307.1597651899662; Mon, 17 Aug 2020 01:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597651899; cv=none; d=google.com; s=arc-20160816; b=KOW0X5S83NsPGFgez/wbG73skDUOxCnN3Mj0DHPYp8kzgcGll+dl0pGkWEX0UTiZEj kzvs90Kg0Lo0deoMcWmKsnXQPjWGzJG3He5gqQoa4bBc7QAEi3CvzUPY8FOIJnRnoLVy B9vcUk/RDJHHaw19YTuR/WaPXrAuJ7oHK2ml7FtcKGZohs/RhZU7pU2KZ5ojhdZj0Jez NqCTX0bcxsCMP2HH077xMUSJvKBUqukBNu5hly7M6JjYUEeWI5UmdgS+r6uGHpS2VQOv GsHlndOvcEWlj895DZmnFslnZejGJdtCLdP8uQAqNAM1SnOy6PRq7uEhN01q8U79sTcq +ejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=AQ09dDtr3c2l1Roq0ne6URApsMSGN10hnLKyehD45Gs=; b=iYUKHmkEyAZwwd3qRW0kY5RIC4vky440fCXg+HM+KmQkKi6rsE4WfKnQuuGe2BfPgr i2Ak+r1c9n5sS6FRzpHsdm5WmTP5UmoZCkBdmIPybdEtiIaEcF6cMLjCT/g6g8/8eM8V MRwt2vTDNLaF3Lp5rMVYIajI+y3xIL7fk1s0KRPE3LV4eDd26DLz7QzMmgWRwadE70U9 7eJp2NCHK7l7v4PlATyUQ0n0RADCymgqzagX3GvhdAoRjwcIPKlq435krTJ6oxjibQdG XV/nF2r+5iuMqX6A/ST8JwfK/a+7miowqxPolig0LNbWKPamyw/ytGxcghfk1MZTBe3E bctQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i1+ADZbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 ot7si10654608ejb.747.2020.08.17.01.11.17; Mon, 17 Aug 2020 01:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=i1+ADZbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726931AbgHQIKY (ORCPT + 99 others); Mon, 17 Aug 2020 04:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbgHQIKV (ORCPT ); Mon, 17 Aug 2020 04:10:21 -0400 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 39FE3C061389 for ; Mon, 17 Aug 2020 01:10:21 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id c6so7442525pje.1 for ; Mon, 17 Aug 2020 01:10:21 -0700 (PDT) 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; bh=AQ09dDtr3c2l1Roq0ne6URApsMSGN10hnLKyehD45Gs=; b=i1+ADZbM04yKV29bxvf14C4AfjR1DxtKP0yjjVyTUAFFhoVNvTltQu7x90fBPPNBC8 uC7Eap5SUopZYFMtjxSgAXpcwXoKDoI6iOXQxnHSbuUd7T00NrbK6z43UYIYYUzrQBd8 RQXP2LTtLIsM8avul4X6clc9gCOU80SMJ1ZzBtf3ctBER5/3dvW/KyYkSmTvsLkf0eIM qK2sp8D8YO9mUlrPy0KyWjPeLcj6POj4CfDy4F+2s8tk99v66wi63aJJjypppa026j4w mK/MTitnJ+ElSoei45gm/OH9DsTX03onLMmjXq0Zo0GO1cqCHRlKCVyudm7kXvDdcXCI HkOg== 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; bh=AQ09dDtr3c2l1Roq0ne6URApsMSGN10hnLKyehD45Gs=; b=dguo2kGOeU9VduMpN8s705QiZiaNS/awXvpByxaGYFLIFbk7f1gkRK6hUDRo8E6Yn4 ehf/efIYwuz587VMmbMwGcnPw/Q/qSm4abIhIqtOaiz6ywc8BdssYDHRqq5u9w6sSxqH UohSiG/hz+KoFNetFNUGDwV5tKispA4a/iCXN33GvImRmcinLptQc93yW+meVzs93vob snjK4sc+5W//ROh042oGQ3swhz/dr1yOM1wg9MEQ4A3mPf0Rm3Jc+4+2i5z2u6vfg6Hz GIiFn/6xdktLE7rj0JVSXv5gP2Y4TWzadsyuf4MlUltahkT6PCf5y5Yt1C28oCeSHA+n IH/A== X-Gm-Message-State: AOAM5321lCW6Uwm+2n6jsoJbqOTH6TuT4WG+r1fjED68vCv6gY1/ZJtq 4oIdI3B2pKYgw412a4fsAA4= X-Received: by 2002:a17:902:c286:: with SMTP id i6mr9940453pld.219.1597651820779; Mon, 17 Aug 2020 01:10:20 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:20 -0700 (PDT) From: Allen Pais To: nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, heiko@sntech.de, matthias.bgg@gmail.com Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, Allen Pais , Romain Perier Subject: [PATCH 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:26 +0530 Message-Id: <20200817080941.19227-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817080941.19227-1-allen.lkml@gmail.com> References: <20200817080941.19227-1-allen.lkml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/caam/jr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index bf6b03b17251..4dc923736ba8 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -201,11 +201,10 @@ 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); void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; void *userarg; @@ -483,7 +482,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.17.1