Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2127010pxa; Mon, 17 Aug 2020 01:13:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6026Ui26fmfT23WzCMEcpepYr9TjefId7laF+i9GXFNdKviXDRK0zjfGLbbYnOCRprhdp X-Received: by 2002:a05:6402:1591:: with SMTP id c17mr14073468edv.240.1597652009957; Mon, 17 Aug 2020 01:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597652009; cv=none; d=google.com; s=arc-20160816; b=oOqb/7WqsHZONRN+Hwd+J/A17kxM8yP7DaO8tbOurQuk/7StGLMzicQKh66CzyDVM8 eEFAxd5aYBNPDP8SFHUA4uA947nFo4cR0kCWVxgO13liANp1aufv1fc+biPTVEE+Z8+X E0iAxTxlMM8Ty27nEsHyf48mZwET3997LynEQQGLcc9PzhfdABYupzknUpBc2zAshPIR 0KFmRpkyyBHWJ2u65awjl4+Ywmm1w99Edo+l6t8f+Iws3n+hxrYpeYcmTZCEtWks875Z Oe5MHBjjBnY46BLjZ/uNRcyhktqCqh654LrN7K2rvSQSm9/8p+nv+drbQw32dmChJsx9 gNjg== 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=9P4UiaV8KPwel1Tt9KznXK/0ns/MMrwircAHJYOTu7A=; b=bMXJy3AvphcGHc/P4qp/haDhqDKAnWg448eS91ZO4ifElns2XWtw0pimtU8sgRPXNh bE2tDii5bnNJKBMSEqfe5jL0u5fMqsDgeVcBgy322d2YF68AOa2+Bh1E8IC1qYvmrBHT WrRRv1uWSmr40TIuTC0WdSO65bz+JQTEzSkIMFlLO4KbdC+s8JL/OCxVqy+O73zYFpyL VkfTaZojI3LgSksb15tr1J+7m81i8JFy1tYpS/laKvuwqeIk0lQ0C0Herg+OLGff4qBE PEmI998Y7A272K87124yqsY2j+Wp9xHYap+UvUSmLAKv3MB+7l0h4+aS2BeHhx0fmT+P mkEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r3GLZCJW; 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 a21si10406436edv.504.2020.08.17.01.13.07; Mon, 17 Aug 2020 01:13:29 -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=r3GLZCJW; 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 S1727972AbgHQILp (ORCPT + 99 others); Mon, 17 Aug 2020 04:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbgHQILT (ORCPT ); Mon, 17 Aug 2020 04:11:19 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769D3C061389 for ; Mon, 17 Aug 2020 01:11:19 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id s14so1147291plp.4 for ; Mon, 17 Aug 2020 01:11:19 -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=9P4UiaV8KPwel1Tt9KznXK/0ns/MMrwircAHJYOTu7A=; b=r3GLZCJWNlctZu3MPc3ZktHezCi9I2Lgci9quhal0K/lYWU2YxEI16zK2p3ooqfNit +fAkbSvrmIAk5pGEm8CaNi/rDu8w1HgrPE9X/kqPFvXxQadi1mwV51kDgu4kPZYbtxO5 aCFOq8j+ttIjUl2GbfMIrJsCgY8lCgalLwAsLwOCtwB8puTqdICaZkG9bgt2XeVti5v4 rfnLq70AzkzKewtTbXjYA67XjHP7HVT2EHHAF/P1PjBIVjF9eUatUBANtzFGb9G2O2Is 51S64GucqinbZVux8cgh09OvCL6aJmEREOvh9+sIk0V1LU9My1LNvw/brCCcyn/z1NF5 Q1mw== 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=9P4UiaV8KPwel1Tt9KznXK/0ns/MMrwircAHJYOTu7A=; b=lhm1JCS6BiaovhO3h9Dzhhw4wZ+07h11ZHw8Sfab0+/I7aGjuWhfM08p4NSaGqEWAm lc1iomMnLcmrrFEfs8gK4zK6DOjggWkk0TNWV83yhLAvvhLeyrp7oZOiGeUfasxOrXvK XUUPYAGuX+KRIFwq52aO2GmdU48oBFh2JExNiMmLuuQjU0xazs8HuZvzt2LMzcArZkpB vlxKmQicRwv35axqReTTVoXRg16AQ4MaIk5p/PM/D3MwAPUQIwVeaCfquxsB7UGwSZ7x Aitu4HzTb1V3U5g2HR7vGpAUpdrUzCHtmeC+Y7S7hCPm+uGvjk75+AdtwFaAFUmA2SlB MBwQ== X-Gm-Message-State: AOAM531dVfxAGowYM4EPaAEDeBZZIKzQikkxwlXL4ZU8knaM/6pgUHvj M8o82PbYwpzsvYuv8Thvhu0= X-Received: by 2002:a17:90a:154e:: with SMTP id y14mr11992119pja.178.1597651879050; Mon, 17 Aug 2020 01:11:19 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:18 -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 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:39 +0530 Message-Id: <20200817080941.19227-18-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/s5p-sss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 341433fbcc4a..3647dffc307f 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1443,9 +1443,9 @@ static int s5p_hash_handle_queue(struct s5p_aes_dev *dd, * s5p_hash_tasklet_cb() - hash tasklet * @data: ptr to s5p_aes_dev */ -static void s5p_hash_tasklet_cb(unsigned long data) +static void s5p_hash_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dd = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dd = from_tasklet(dd, t, hash_tasklet); if (!test_bit(HASH_FLAGS_BUSY, &dd->hash_flags)) { s5p_hash_handle_queue(dd, NULL); @@ -1973,9 +1973,9 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) s5p_aes_complete(req, err); } -static void s5p_tasklet_cb(unsigned long data) +static void s5p_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dev = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dev = from_tasklet(dev, t, tasklet); struct crypto_async_request *async_req, *backlog; struct s5p_aes_reqctx *reqctx; unsigned long flags; @@ -2257,7 +2257,7 @@ static int s5p_aes_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pdata); s5p_dev = pdata; - tasklet_init(&pdata->tasklet, s5p_tasklet_cb, (unsigned long)pdata); + tasklet_setup(&pdata->tasklet, s5p_tasklet_cb); crypto_init_queue(&pdata->queue, CRYPTO_QUEUE_LEN); for (i = 0; i < ARRAY_SIZE(algs); i++) { @@ -2267,8 +2267,7 @@ static int s5p_aes_probe(struct platform_device *pdev) } if (pdata->use_hash) { - tasklet_init(&pdata->hash_tasklet, s5p_hash_tasklet_cb, - (unsigned long)pdata); + tasklet_setup(&pdata->hash_tasklet, s5p_hash_tasklet_cb); crypto_init_queue(&pdata->hash_queue, SSS_HASH_QUEUE_LENGTH); for (hash_i = 0; hash_i < ARRAY_SIZE(algs_sha1_md5_sha256); -- 2.17.1