Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2126730pxa; Mon, 17 Aug 2020 01:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqZYNnSPHb/V+LdBMw968Cb23nb4ONmjsWxc35RIyOGu4KUhw4wM0G/I+IgJk8wqSXYCJ+ X-Received: by 2002:a17:907:10db:: with SMTP id rv27mr13857530ejb.350.1597651966609; Mon, 17 Aug 2020 01:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597651966; cv=none; d=google.com; s=arc-20160816; b=beHPKxdl7G7nVHV8+z1oKaPNHW4NoRqncHBjDNlAgpTgKT714/Sj7Gtn7Y6idkOSTv SSODH6CfiNRU23whdL0KnvBRRgip9Y0hUyVUC4rTyERdWvJRbpBPGSSOqOjs3fyJZdFM XuGbtEjjsnfhyiOc3Sz+QmycViwj9+S694dfQHC3IqkNmWVJ9s/P4iKk8Yjy0hpMNso7 MBC+Pi5mQwEQCd5gfUX8AgU4xsAvnzx8fRZsM+nh2ypBut/SY/lZlwDB+qgdoI5YgSi+ XIXSIV5CyPRteq/IqwFqfrtZpBwYc6FpEDTtGJcl5WXw2q2fEf/BFS9g3AJbJBXOrXh/ /OiQ== 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=UiTTtY4um+8cmYBKgcrZZYgd8CdoEU+ARxIZdRX9Hl4=; b=n28CHFmJzgyjkZ6xpuxX+eNHC+1VK7JoSWeJi28asqmQGG7kyvC6C3bFDZaDR8StvB roPCeSVZkeUE4xaRT+WszE0T2jagdx8AGbcFfn6X5rOUZ/Yry7iJLK3e0RegU6bR+guT 0X5COP0i1rFx6U9Ru2hVAFTb4K+KPUIY1mgNpERgCa8TD0cMIEtBrbAIQLHaIN6qzTkZ FxD68XHpuJ3GuSgZVA8OJV4lrbbU/afojDncAp7BCg7cgwPFCuzmKs0CFPbMvApZAA0w /0yUPM3UJTf5unV97K1GDLRZeEdLja4KeWKop+BKNrdcO0/zCayrii3q5DJ0k2vnH0/O JG9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lCHZCy3p; 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 x6si10201662edr.497.2020.08.17.01.12.23; Mon, 17 Aug 2020 01:12:46 -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=lCHZCy3p; 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 S1727856AbgHQILI (ORCPT + 99 others); Mon, 17 Aug 2020 04:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727818AbgHQILA (ORCPT ); Mon, 17 Aug 2020 04:11:00 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 634B1C061389 for ; Mon, 17 Aug 2020 01:11:00 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id c6so7443285pje.1 for ; Mon, 17 Aug 2020 01:11:00 -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=UiTTtY4um+8cmYBKgcrZZYgd8CdoEU+ARxIZdRX9Hl4=; b=lCHZCy3pNI0pZrwfcPNazSDtJnQIEjsNJln05t6INik82IzhLcow4WN5JuRRzBEhA8 YGwXaK8fgpT/G5By171ao66YPo2MgKLkXIFSfl9+DDdLatYNmq9QUaBsSZDFiSFCnXBO h1PFiJwVPDIJqYeEmoE4IiHXKJ9F/Lc6mQ4o5hhJdjxM1YEDJoq8+UVgKvbCHh3XCf2M 4UwWOdm1OH4+TcG6HaB9yOwqe1aNeUGzNBpmLgZNFRIxmOBqFUrKXw2hWL4MIxDXYJm7 9UrmnGTGigzKdDSZRmSUB5ka9AutzOl2Yks+Z/DEtQVWrTyPsyn8Ygyr1rbjvyFrBIj/ 9QEA== 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=UiTTtY4um+8cmYBKgcrZZYgd8CdoEU+ARxIZdRX9Hl4=; b=MIqC5DnEVCzSOJyzAcZsmDntMIC5GoMUn8qXDBCQteqQ71OkX6HDgJwo+8RSO9QCVH QLVBbRd2cEqryEzDsEQN3jM1xX1pAWz+eQTB3J2LLc56Rzi//b0B2zbeh4mtVXiDL3pI cUiHb3PtfKVxLmQkrgQhIuh2lr3RkCIvR45J7m/vc7SvLcbP2WdqeZukb5mnO04ebmR2 KRyCqACUjVAnyrnuihTdHDYqPThomLnTHsXhanIzO3qRsFf9RgQqziqDG23cIFZNOnZL BRQyNa0sBpMPH+2rf4KekvglEuH/1Xq8V35jw07GsTAx1C3L0pI7SUMuXw0/XFHDQrPX 4dnw== X-Gm-Message-State: AOAM533g8jJSNFhjFrTia3U0LggNVsuqNqHw/j9UzGqQuVlyy+vhvREB BOlGH6U4ZKuZ50PoVIp8tvs= X-Received: by 2002:a17:90b:684:: with SMTP id m4mr11607612pjz.4.1597651859925; Mon, 17 Aug 2020 01:10:59 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:59 -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 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:34 +0530 Message-Id: <20200817080941.19227-13-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/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 4fd14d90cc40..4eae24167a5d 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -502,9 +502,9 @@ static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); } -static void omap_aes_done_task(unsigned long data) +static void omap_aes_done_task(struct tasklet_struct *t) { - struct omap_aes_dev *dd = (struct omap_aes_dev *)data; + struct omap_aes_dev *dd = from_tasklet(dd, t, done_task); pr_debug("enter done_task\n"); @@ -1150,7 +1150,7 @@ static int omap_aes_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_aes_done_task); err = omap_aes_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index c9d38bcfd1c7..fddcfc3ba57b 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -594,9 +594,9 @@ static int omap_des_crypt_req(struct crypto_engine *engine, return omap_des_crypt_dma_start(dd); } -static void omap_des_done_task(unsigned long data) +static void omap_des_done_task(struct tasklet_struct *t) { - struct omap_des_dev *dd = (struct omap_des_dev *)data; + struct omap_des_dev *dd = from_tasklet(dd, t, done_task); int i; pr_debug("enter done_task\n"); @@ -1011,7 +1011,7 @@ static int omap_des_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_des_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_des_done_task); err = omap_des_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 954d703f2981..3c03ee164039 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1750,9 +1750,9 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void omap_sham_done_task(unsigned long data) +static void omap_sham_done_task(struct tasklet_struct *t) { - struct omap_sham_dev *dd = (struct omap_sham_dev *)data; + struct omap_sham_dev *dd = from_tasklet(dd, t, done_task); int err = 0; dev_dbg(dd->dev, "%s: flags=%lx\n", __func__, dd->flags); @@ -2126,7 +2126,7 @@ static int omap_sham_probe(struct platform_device *pdev) INIT_LIST_HEAD(&dd->list); spin_lock_init(&dd->lock); - tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_sham_done_task); crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH); err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) : -- 2.17.1