Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2126617pxa; Mon, 17 Aug 2020 01:12:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVNCs8C0UmHrKveruUz5dQhrggYLLZyX5uXi0U238xtU1EHHhJZm/1kmHL7P0S0qU7UCvO X-Received: by 2002:a05:6402:13d9:: with SMTP id a25mr14055628edx.141.1597651951287; Mon, 17 Aug 2020 01:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597651951; cv=none; d=google.com; s=arc-20160816; b=AfpwXZQOWZPmyywK/orEOGe7mWYCnN5yZBedXiwkyge9osDM37Wj/7WiSy5xMJpD/q mJv5zKMaMm6KC9llnfo1yJscvwxpFCCj0zDUQvHTqyP/vxSD4I6yf6gVY79bT2XHlm8s rRqtzWAv6bqnJLPGcl6o1ScaM35M5GKW4AvbHXSeRAUr2HXST8uQaBGF/7PtQGYm2hF4 qfOsQpZcJ8jIkbdaxnJw4YbSOqiQkIS3o3gbz78qPAVdacVEnaaNpMZx6rtErmgrhvVN sbst4CGtFjelqkk4CTo9JAEEwN7QBU2M2nkyrhqx8//qN1iRs8/tw2ovyB9PGUr9bt2O Y9Qw== 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=+CczU85S+/uH24ewiNmvI8CVQIP/5ll4+ExQ6Q4RriA=; b=y9ENJ6jrKUlAkw3s/BHwrd2R8TBC6MW8YzpRGQ5gk7hNmlnZPkdvz4Zf2rv6CPLGO0 m737NxxRs9j7eD8dfYslPOIhL0Gf7yV88VD7LIdYHMAnpBnUXaDWIHnagKwx6QWU3lPu jJqD9TijKyJ5ImTjV/WfigtkRT3XDr2+G+NzjKJADg8fboaPDuVihfsFsk1phuNus2eF +QrCzrZdMjaTBPPu623tsFI8XeGMjuoPWvkDtl0b3Y+kRgSatK9FBltt/QqH0FbPKl/i TI6hGWHf4oIIzZXw0bVb3YICIwaTk5eKvXXyHQQrAn24OsWlZpdYK2l1VJDri/GqhMuG 0q/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QH+SZkjS; 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 bs17si10305826edb.367.2020.08.17.01.12.08; Mon, 17 Aug 2020 01:12:31 -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=QH+SZkjS; 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 S1727783AbgHQIKw (ORCPT + 99 others); Mon, 17 Aug 2020 04:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbgHQIKr (ORCPT ); Mon, 17 Aug 2020 04:10:47 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD91CC061388 for ; Mon, 17 Aug 2020 01:10:46 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id k18so7842866pfp.7 for ; Mon, 17 Aug 2020 01:10:46 -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=+CczU85S+/uH24ewiNmvI8CVQIP/5ll4+ExQ6Q4RriA=; b=QH+SZkjSRXli6dhDl/PYa92MYnDglHyX/Y+c8a919EtHMLwSk11mD0xwVEGvrYzsjG 6YHStcWlbvDg7m1nCbTu0mzv4oZuD8ixW7hNibRqKw8PcLmHtLG2/QciwIzw+8fj1QzI +k9V6tnsiKr6cex+82bCgVz3pI+EM+ZXMvggkx35zkVe2ztbSG6mN58KHAX1R4vLDETd T64cUILKyX0ps+0NxtbWr0jr8yJZnlso4tfOXh/ZuhkzOwn0HkHiRPshvFvtOdAALHD7 z8CPKf0Ux+LhIy1Jnsz2SiSfL+T0uJNzDkf32MhphrNkOu8oFKovfslNCi32tB0Ln7tf 1aAA== 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=+CczU85S+/uH24ewiNmvI8CVQIP/5ll4+ExQ6Q4RriA=; b=Z8SXzX/P7ZxAy0n+VBgjYvm5DmFhnfuI/pKgIaXdJsBVMzHHPHMnHV98s1a2QlPOzw GIMYVZlX4ZSw1SGtWGjAzSbPCwJX6AGJ5Oi1e/OhZ/6qr5GjpewaeqH0NKQB6FOfXChJ bk6sB/n1hBxhTmq7kF+C5xqzHA6OnjKQ5dYGngR2Dv5ufzSNvITr5klJCa1oTGNtSsjS WZ/6JIkJkRmyDtsxlXsFKT4brH5p8nBbQIS76Or7zugxHOCczdIFOkihVZ+/Us6o/HPL 4m+LCNpsoXQt+j1juwXrUN8lSWZeWyjhqnVPcklPExEE7Tc/YIxkYIBpammBQmN1AobS e3BA== X-Gm-Message-State: AOAM5335taHNbfCBuNsf8p1rDDGbFFCVlCgg/TucQvF9P6pfJW6NXEZE 5iyiXXwgTJHVHu2BpVupyCk= X-Received: by 2002:a62:1745:: with SMTP id 66mr10016518pfx.273.1597651846354; Mon, 17 Aug 2020 01:10:46 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:45 -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 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:31 +0530 Message-Id: <20200817080941.19227-10-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/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index 87226b7c2795..0e1a32bdbaf4 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -353,9 +353,9 @@ static int img_hash_dma_init(struct img_hash_dev *hdev) return 0; } -static void img_hash_dma_task(unsigned long d) +static void img_hash_dma_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)d; + struct img_hash_dev *hdev = from_tasklet(hdev, t, dma_task); struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); u8 *addr; size_t nbytes, bleft, wsend, len, tbc; @@ -885,9 +885,9 @@ static int img_unregister_algs(struct img_hash_dev *hdev) return 0; } -static void img_hash_done_task(unsigned long data) +static void img_hash_done_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)data; + struct img_hash_dev *hdev = from_tasklet(hdev, t, done_task); int err = 0; if (hdev->err == -EINVAL) { @@ -952,8 +952,8 @@ static int img_hash_probe(struct platform_device *pdev) INIT_LIST_HEAD(&hdev->list); - tasklet_init(&hdev->done_task, img_hash_done_task, (unsigned long)hdev); - tasklet_init(&hdev->dma_task, img_hash_dma_task, (unsigned long)hdev); + tasklet_setup(&hdev->done_task, img_hash_done_task); + tasklet_setup(&hdev->dma_task, img_hash_dma_task); crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH); -- 2.17.1