From patchwork Mon Aug 17 08:09:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716735 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B2134109B for ; Mon, 17 Aug 2020 08:10:17 +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 8B30D207FF for ; Mon, 17 Aug 2020 08:10:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ft5uNl+d"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bq4a/wY1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B30D207FF 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=YcHUzNvKhyi0WjZTCw9+tZTvRn0LPlRTL6ZS4qUITPg=; b=ft5uNl+di9T9yLErZYI+1YI2D7 bdFnqBrimlbRULcjgbBjHbHhFqPQ2EX2EBpJcWMoSUgk5enuDdxYN8YEnc6PqPiOAgDHB/tcZnOlH gHth07o7r8ufasUDlnqW6cE/FMWenokLMHyknZ54/jIsjX46YyvtVWZHN8AXh7ErW9vSDSRZaVZGw I3kIV+UkBlEdQPkU6dPlLOE44t8bMjODgBRQiCMKUT8smYzgGf3YWmgzNNS5J0sc2itgMYf3FUtc+ Xeew08hRNlRwH37QNwOvVYDxKUOcuWTW3dn4JX2TSfRf4hELR09Zg3Z37pwOuA1a78W7VIDSvE2H9 buZRM2+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDc-0002go-BH; Mon, 17 Aug 2020 08:10:12 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDU-0002dq-Rr; Mon, 17 Aug 2020 08:10:05 +0000 Received: by mail-pj1-x1044.google.com with SMTP id kr4so7440440pjb.2; Mon, 17 Aug 2020 01:10:04 -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=AVM5Ee6U/PgM24p71AdP1zEptNAhtBHiH/J4elOBoDc=; b=bq4a/wY1jTCneE+s/N9XkoTRDfi6FFrXjPFbCX2hyjjVTa0rjLe1BFehd0Ubudyjvy 2tQCKoiZ7neD1DxzuuX3L/LvtPDeXxuRaXOv48JfMePwptC3F9IB2vlDZMn/VUwBGUYC UWtSZ6o5moTekCXzFqTsBLa+GAfSZbT9Hhk2J5nUiAnQ6lPZQ9vXCS61X57fhtyxR9gu 4zymCvU86fkehj29z6T4OkVDhu3T78E+BBF2HHfHJa/IgAKr4Y7apXqDt+nVMb3Yl1kd vvm69unP3toBPnFBDyQjpXmm48RzPMuxN08tJ9N2asske3r0dwT1wjWEbozcCPMoN3gS hbUQ== 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=AVM5Ee6U/PgM24p71AdP1zEptNAhtBHiH/J4elOBoDc=; b=G5XO4dyXgllrdFuvmMucEtkl8cfmOWT5dSX5E7YKk3RGh/vOlwEbyXIR4VSZAUXMGN CBuWLeBS8F4wyCvMnJj2xbOqqcDAeyGh2Qxhsvoc+yVdHJj3MwU8SXa4cGDvLnwd8V+i PrqHVEYHfsj21zhxNkya7YpOfJXZmrUD7kgEOfiFvT7iGeIiGEGfhXvcyWpM4VMc7dtV S4M+I369jVbTWLh3LOy5kekOcwr/OnUrOK5OSRmtUiSNKiTtjaB3SN1MjZbe6D6z9njf xXdG1XxdbVKeorlvlnYUdhuYWO2ACopYzUDFsSXH3YaUWZRaJVl+lAmuP/xfY90yyvaI m57Q== X-Gm-Message-State: AOAM533Xt662fjHfXHJQ8O8QP4JXWhuYSYqznrAb3XJ6Eok87pvHBdpy 9f8pB8/WO3UHf+OAlUa8qRQ= X-Google-Smtp-Source: ABdhPJy71ZdpBfF9NUMopXz8WNjxk40FSx6iYagIE9KHHij3vLBK71JeyUDcHvmRwLjZ+oTEhlfPiA== X-Received: by 2002:a17:90a:9405:: with SMTP id r5mr11870057pjo.74.1597651803126; Mon, 17 Aug 2020 01:10:03 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:02 -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 Subject: [PATCH 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:23 +0530 Message-Id: <20200817080941.19227-2-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041004_980827_D0C8CD6E X-CRM114-Status: GOOD ( 13.74 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1044 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/amcc/crypto4xx_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 981de43ea5e2..3700446a99d8 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1072,9 +1072,9 @@ static void crypto4xx_unregister_alg(struct crypto4xx_device *sec_dev) } } -static void crypto4xx_bh_tasklet_cb(unsigned long data) +static void crypto4xx_bh_tasklet_cb(struct tasklet_struct *t) { - struct device *dev = (struct device *)data; + struct device *dev = from_tasklet(dev, t, tasklet); struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); struct pd_uinfo *pd_uinfo; struct ce_pd *pd; @@ -1452,8 +1452,7 @@ static int crypto4xx_probe(struct platform_device *ofdev) goto err_build_sdr; /* Init tasklet for bottom half processing */ - tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb, - (unsigned long) dev); + tasklet_setup(&core_dev->tasklet, crypto4xx_bh_tasklet_cb); core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0); if (!core_dev->dev->ce_base) { From patchwork Mon Aug 17 08:09:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F5F8109B for ; Mon, 17 Aug 2020 08:10:25 +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 F16B0207FB for ; Mon, 17 Aug 2020 08:10:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ci64tsZt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dilKe5du" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F16B0207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=zZrb/xnZBVUP/0eOdhe5c3vI5OF+9wVRdi1WV+E+Oh8=; b=ci64tsZtbCbr/Q0tnM38DNG1FO YN+n02bG8fvu+olg8lFB1vtbFu/F4wQoU+eoudO3KKItA6SmECseqeSInjEVq/nxXfgq7v4YhxAEK HrjwQiLYamXWIaqAz7pmFio10IYa/6G8CCpQWePBGxz85zwL8N0uZGvJLphviSWOpdifhv9lipktW CxuAZdlzNvNZ4xj2OdFKzw0bHd5HK8Wc8lH9jUnowe3FGqUtr6mMKrvZYkM7WlczZvNsjFj/u2Sia sHvSi7NLGsBGhwPsu6KtD+ccB7sqE4wHnwfsbYhXyWyGoB18sBgYHsrzBZyycCR3ThLBbYh2byB5x b63rt7aw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDi-0002jp-Tj; Mon, 17 Aug 2020 08:10:18 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDa-0002fH-UG; Mon, 17 Aug 2020 08:10:12 +0000 Received: by mail-pl1-x642.google.com with SMTP id t10so7109602plz.10; Mon, 17 Aug 2020 01:10:09 -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=oXuZM0UtzOKb7bYgg7JDDFHqHlWmubYl3laiIuHyNew=; b=dilKe5duicGRVShs9cymAV633YA7iyG35fWZzdKAe//8TCTIpnL081KwCo9e8lKa5C /Hkf4f/0gldooNUTSwS9EZU0IpNoW61tWtS/RrWPgHwV49BfHBMut/rjo4G83mrB2EAK vgVWZDQWM7CcQxye8kydk/tg9s0E9WKNwlMurMv4SfNlJ4x5IbqreFdeQuRZ+5yQeNlb V1drdbJ3O3Y6LofPIGU7alwke2OJ6EiKeNdPlI+UK6NXUWEjK/yWIExkCs4PcGiaT6J2 Gbo4rnU30z6V3jp8pFAk7Z/YdKA6hbbyaVW/rqQPvVxNkwtej2Am28eStfCNT9jxYyPr PmRQ== 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=oXuZM0UtzOKb7bYgg7JDDFHqHlWmubYl3laiIuHyNew=; b=s2oVIq/d+s2lADRnWEkckQKKjH1ISinyEtbG/ok7lQWDwZYd7PXbAlk1Q0Dz7MLPjQ I6JeyWxxAoY1hbdy83GlPkchOCta+sTZWlt5yE8aZf4YLULvT2ZPgpYnmFslVwIzzwrL 82y+pHafOXb8LB2yYyKdmWd/pg37boo8FLCMTDgmPzG4hloTH9Y4F+GB9V5cf43RYfEb 2zUE69PaoOpun/xzquq9c9SOTUpqjyC0tAen5C1HKuexvbrN/Osebg7/hPk70AtALCxJ l8L+Yx2tKENsCJul17Ka6yNw7YQlEJVxREYI29uK4dD7nkR8bu6E0JMAQEHkirAeb6Vi liTA== X-Gm-Message-State: AOAM530UlCE26y+HLnexG7D3W3/VJo2IVcMTm8bag9R3NWLkrCop6VCJ Vfc9J7r6gYYo8HcyTYPfwJQ= X-Google-Smtp-Source: ABdhPJw4+imJJVYhPWAJOmoDuSgHiaiwqr0MfGtF+c8aOUcQplUQ6y6DBuEzcIDmE0XEQGrGDBZOQw== X-Received: by 2002:a17:90a:bc96:: with SMTP id x22mr12223652pjr.164.1597651807885; Mon, 17 Aug 2020 01:10:07 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:07 -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 Subject: [PATCH 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:24 +0530 Message-Id: <20200817080941.19227-3-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041011_105049_9CF62E13 X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/atmel-aes.c | 14 ++++++-------- drivers/crypto/atmel-sha.c | 14 ++++++-------- drivers/crypto/atmel-tdes.c | 14 ++++++-------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index a6e14491e080..99851e40c729 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2300,16 +2300,16 @@ static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd) dma_release_channel(dd->src.chan); } -static void atmel_aes_queue_task(unsigned long data) +static void atmel_aes_queue_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, queue_task); atmel_aes_handle_queue(dd, NULL); } -static void atmel_aes_done_task(unsigned long data) +static void atmel_aes_done_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2499,10 +2499,8 @@ static int atmel_aes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&aes_dd->list); spin_lock_init(&aes_dd->lock); - tasklet_init(&aes_dd->done_task, atmel_aes_done_task, - (unsigned long)aes_dd); - tasklet_init(&aes_dd->queue_task, atmel_aes_queue_task, - (unsigned long)aes_dd); + tasklet_setup(&aes_dd->done_task, atmel_aes_done_task); + tasklet_setup(&aes_dd->queue_task, atmel_aes_queue_task); crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 75ccf41a7cb9..84a7c8a9dd02 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1314,9 +1314,9 @@ static struct ahash_alg sha_384_512_algs[] = { }, }; -static void atmel_sha_queue_task(unsigned long data) +static void atmel_sha_queue_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, queue_task); atmel_sha_handle_queue(dd, NULL); } @@ -1353,9 +1353,9 @@ static int atmel_sha_done(struct atmel_sha_dev *dd) return err; } -static void atmel_sha_done_task(unsigned long data) +static void atmel_sha_done_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2570,10 +2570,8 @@ static int atmel_sha_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sha_dd->list); spin_lock_init(&sha_dd->lock); - tasklet_init(&sha_dd->done_task, atmel_sha_done_task, - (unsigned long)sha_dd); - tasklet_init(&sha_dd->queue_task, atmel_sha_queue_task, - (unsigned long)sha_dd); + tasklet_setup(&sha_dd->done_task, atmel_sha_done_task); + tasklet_setup(&sha_dd->queue_task, atmel_sha_queue_task); crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index ed40dbb98c6b..170809892acf 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -1049,16 +1049,16 @@ static struct skcipher_alg tdes_algs[] = { }, }; -static void atmel_tdes_queue_task(unsigned long data) +static void atmel_tdes_queue_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *)data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, queue_task); atmel_tdes_handle_queue(dd, NULL); } -static void atmel_tdes_done_task(unsigned long data) +static void atmel_tdes_done_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *) data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, done_task); int err; if (!(dd->flags & TDES_FLAGS_DMA)) @@ -1177,10 +1177,8 @@ static int atmel_tdes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&tdes_dd->list); spin_lock_init(&tdes_dd->lock); - tasklet_init(&tdes_dd->done_task, atmel_tdes_done_task, - (unsigned long)tdes_dd); - tasklet_init(&tdes_dd->queue_task, atmel_tdes_queue_task, - (unsigned long)tdes_dd); + tasklet_setup(&tdes_dd->done_task, atmel_tdes_done_task); + tasklet_setup(&tdes_dd->queue_task, atmel_tdes_queue_task); crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH); From patchwork Mon Aug 17 08:09:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716747 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA8EA109B for ; Mon, 17 Aug 2020 08:10:42 +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 A37CA2078D for ; Mon, 17 Aug 2020 08:10:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xqhtIqKo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TZ17WiWG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A37CA2078D 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=ZazttE7gFWZJnmXUaiGt4PcB06YnpPSt+BhvdXONMHQ=; b=xqhtIqKog8UnRmB/xtshLA4/PT UQAcdzH+YqKMJtUEHcWtciIn9NzwjG+O4NV331vKPMpDUNShfrvvNl79KlQBulKlrSI54jBhuAcam eI0Y/tDWKtrn2Ubr1AYFn9AmJtMVkvw7kO5EScPCCX+gHA/Klj6r/MVFGpNY0hAThzSMuswrYniQc sfvs3b0b8Wevls/+JBYasEYYsXOBpDbE/3AmBj0KpzE+uzNgrQT7thIVlWuAD8euX8P1uuljJytKu Yx41o4O1ZqKB6syKTkVAjZsv+A/YTd84jDN+vhBmeTjV7UKd99qGw5J4mrWW+USj1AFVyhKbJrM9Z Wal61Rhw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aE0-0002rv-F7; Mon, 17 Aug 2020 08:10:36 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDh-0002i0-LO; Mon, 17 Aug 2020 08:10:18 +0000 Received: by mail-pg1-x544.google.com with SMTP id 128so7748006pgd.5; Mon, 17 Aug 2020 01:10:15 -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=EjM/bc9oMW+0sBykqCFUkPw3qkHdhalyi/ZZCcuM7jI=; b=TZ17WiWGgSUx7KDRMcYgdPiVlPvhIeKyT7JacWITYd5bfAzGX0K/drdRZgf/IgMZnQ haeKHiKqj+EWZOMjz9vK4jyjQiqD2EsYL5wZtUY/7MKM8EcwZCyMRJ9m0MJHmJysxrGT rEe7Yhg9fiXCpeiIOwHg87Nc2oW9XxSEsocphkY+WifyY5+Lr48OB0OlGW1u2ACfuUp2 1lrjWZf+TyJF5sRol6kMfbmX6DqRnNgYIZ7szwvBsl3Dc96FJPHdC/QrIh8YsFfghKkv Lds0hCRbLyYqsmh1KhEpxq6A5urNKeBOU3y2s7X0wX6op6r5rAs4OcFXJX8gg7m83fNC srrA== 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=EjM/bc9oMW+0sBykqCFUkPw3qkHdhalyi/ZZCcuM7jI=; b=IKDVgb3EnmDhoMKsgea3zfLOTGmw1mV28mr2CGXmrECPByjVfko8BkdigqVD6B7g2f hfg2QsX8ExAHs0Dx3zXTQ2/fw+o/jt583OEh31BnWNP1oGCUoVFXwGo+u/Oaa3TVAs+P knaVMmJ8M1K7DuqY9rBlsdoMyOFSJhTrKT9LtEtwcbHbfnp8q2Cnvr2YQX/jRR6OPgs1 TYmlrmYvse7K0Q73iifYont8k9ETJrBZdd98+nQXO6+hlnZRlqnuz1owrYeV9Qq1zFwN l8tYElQKqPuTRXez5jcm1BNbmPVJ/+IEzKkLnChFIsLGxzttD0LuxWlJV4pp9KjRAfGa NEwA== X-Gm-Message-State: AOAM530UR9PW/8L3slBngAXXgtIrUJ0N9Nf052Wz+YjX2VTFhmfwXgsI 9zsL4fG1hSkJA1eMS3Ucpzw= X-Google-Smtp-Source: ABdhPJyC+tc9WoKzXMgb8ccCrUbWRcq5oU1rFYGbt/72fsZUVj49tUcq4g9/xNjX1u4iKnS7QZEhOA== X-Received: by 2002:a63:31c6:: with SMTP id x189mr6189388pgx.182.1597651812808; Mon, 17 Aug 2020 01:10:12 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:12 -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 Subject: [PATCH 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:25 +0530 Message-Id: <20200817080941.19227-4-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041017_807070_F6E6E09A X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:544 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/axis/artpec6_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 1a46eeddf082..83e4c164dedb 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2074,9 +2074,9 @@ static void artpec6_crypto_timeout(struct timer_list *t) tasklet_schedule(&ac->task); } -static void artpec6_crypto_task(unsigned long data) +static void artpec6_crypto_task(struct tasklet_struct *t) { - struct artpec6_crypto *ac = (struct artpec6_crypto *)data; + struct artpec6_crypto *ac = from_tasklet(ac, t, task); struct artpec6_crypto_req_common *req; struct artpec6_crypto_req_common *n; struct list_head complete_done; @@ -2899,8 +2899,7 @@ static int artpec6_crypto_probe(struct platform_device *pdev) artpec6_crypto_init_debugfs(); #endif - tasklet_init(&ac->task, artpec6_crypto_task, - (unsigned long)ac); + tasklet_setup(&ac->task, artpec6_crypto_task); ac->pad_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, GFP_KERNEL); From patchwork Mon Aug 17 08:09:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716749 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EA3013A4 for ; Mon, 17 Aug 2020 08:10:54 +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 F1E992078D for ; Mon, 17 Aug 2020 08:10:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uj1J/2CD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i1+ADZbM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1E992078D 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=in8Edpk+JwCUGLPwHPdF7dWN55WNAFLvP6Jaeiw3lDE=; b=uj1J/2CDoZUJoTZJwyyZZlYoXO XHc8YGTyPxMDE1TJm33hI96T7GDnxAYVoaIQ0X4MUTNStYS3LaPMpxtHHyh2+SwLBYrU7SsCXHxR2 jlYHShD/puNoMIdCnMUR1gSvJYpEjV1sFeEJAM3lS08hKhOBAcpzTfpubGkbC3PX6DuHiChbCuOID BvUWcmZvPYBb/3AH3+E62fcLoEj7dPiEDr7vQVx/iyfSQymawk3tJ48VsulraMYpDOgsfeRkgh6OH 0+jteDphdOcsUN3bAVM9GFZqHad5n1BZ0zpLbVC4/cl8xrE5Ch7pVe7I1l+NkvvsKdHceohhadEIC dhxaSFsg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEA-0002xQ-Lt; Mon, 17 Aug 2020 08:10:46 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDn-0002lG-0K; Mon, 17 Aug 2020 08:10:27 +0000 Received: by mail-pl1-x641.google.com with SMTP id f10so7112708plj.8; Mon, 17 Aug 2020 01:10:22 -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=BQbJaFBb7wBUtkFN8XOcIuluO4Yx6cpnKsWaS6hHUB9DUfMTKpj/dGNekjAskBaBuv 3boB1mmAql51ddW6SjkPAVuym28C+4Uujg6Zo6hMb+RdkQMSOX+Lh1pS1atPJet34FwI v4X4f25lEeZFxK0SPc/vWENkqicVjHwR1oFQWMxTa/x7/iiCixHKKGp+V5Rg/Ps3yCOf YaLeR3OSFulJm+NAX+adlstYioTeQMZAiorbjyraS2TUUerwq5F7lWoRKoF7ariglZKC KHpn/bGXvzzxsfDMd5rVD44HCscm/oRUYGAeLhF6pYj5g6LmTC+dNPIW2NG/oxhwR1+0 idew== X-Gm-Message-State: AOAM532Lh/MC8nGFx+LBrzuYLbjATPOwFGVF++P2M8oVWQq31BbKMVNb JMuK8wJVz5blX9WsR6dD2p0= X-Google-Smtp-Source: ABdhPJyaWmoUPigt5EzkuJiRyagPX4x/btPrL124BPaPGgcH3dgesfRQ26eVBtXL4hKJJ/AzDOuPrQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041023_183139_AF425748 X-CRM114-Status: GOOD ( 13.92 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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 Reported-by: kernel test robot --- 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, From patchwork Mon Aug 17 08:09:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716755 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC870109B for ; Mon, 17 Aug 2020 08:11:16 +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 7D18C207FB for ; Mon, 17 Aug 2020 08:11:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TG+JeULB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XSjipeYZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D18C207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=QdMG35EXZATyLMMPaICUEKaVpNoubm9+whHojequ2ec=; b=TG+JeULBmbZoZSUQtBMKvrKI4+ tY6jZfqge1xYA+ORm+F5JeX60a4/9DHDE2hskSNgnwripK8IUMN41jmtQk5yv5XcOQ2Z81RPZ3kNY 2LJCtxUwm3sj8k8pcXbNu3W0iIMRXlzyQ+nrSuW11z77iM6dHfnuL0yvwHnDaZl4r2TXPqFkffGLl JTttRd56eLKGkbzqkFoo5j5GScklOMHSIxZDsZ8xONi5Hf5/tj8bEdj1Q5FhlPEVPA6XL3vU0IqbA l1KcmGmEZZ/3Xl5InQAO+xRXe+i9hy5uhhI1Ba+Vo+CI1TJ9PKjdMOl0fC20oxlLg+TyrDb+pN9N4 ii/P7moA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aET-000375-UL; Mon, 17 Aug 2020 08:11:06 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aDu-0002oA-Jw; Mon, 17 Aug 2020 08:10:33 +0000 Received: by mail-pf1-x441.google.com with SMTP id u20so7860433pfn.0; Mon, 17 Aug 2020 01:10:29 -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=pdIJjny9D2jgWVeCI9nYJimGzTera5WNgADtbJ8YXDE=; b=XSjipeYZMmDA8zRg8x2SsXfp2Jhr+d0PlIDgkWlY2tO9bFDJdnAQ40Ua0gtXG/g9kc QHtzYoiLq1/e8E0xhNkuMtoXw+U4ScBKf7Ym2DN5ftUBThFR/RUJKEuWfc1UjegEIHti xF+YmcEboQ6vcnthDllRioUfqz0S7QriDkfmROrrMpdZ6fG91nbW4RO71lXZz61xrWIV L60f1ctUGqRyzK/sWnccUABOBpaXcHAsLACBo7ClFY7s1QvA0a3fZQl0Omr9Gy7kUPYd 4v4+uyxRfPRQMKqpt6oWXNzjLuE4nvp9dixEgispq5w+1/GnNOuPltS95VTjbJY+HusW 5OBQ== 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=pdIJjny9D2jgWVeCI9nYJimGzTera5WNgADtbJ8YXDE=; b=hkERszrO/MqR/K3rA+fio/yGQHuB8KpLlqEqAE0nuMwoKwoAc+Tl4UO6bJwNFWxCXU srjf9yQuYFKb8ZNATrHSL+gaV6lfghlDxSiJKaW1yHGPhsj8RLMSBuWasCc48Cy+3k1z 5SA3990ej8Y6YJxeWG6ndCdQliQHpXyrdj2fJxgjGFcebsLyD5jTeA3Codjb07ATH/jS jt5B5eHObTC0HyJteMf2g39+Plljv3j0nYUwTELAfhFJw5mMLsHo9LQwf+wTXB/1530/ ushNTySNRsy6wRSZdw8gP9LWViJh0MJjluKyVyz+9vvTLq0KZIIj6qQda4pR2A1kBElf wPKQ== X-Gm-Message-State: AOAM533l04r69VgykXkFoSfzIJeLKdIAAbTb+rIe2/DI+xyYdBIMEbvi i/PKt5UDRn0zjr68nFRu/Eg= X-Google-Smtp-Source: ABdhPJz1Mv7cb88mTt7H3O/EWktxl+4V8q9iZeglkGY6CWFYaPHnaSAelMpVwSczFKAaMF8dD298GQ== X-Received: by 2002:a62:f904:: with SMTP id o4mr10820050pfh.14.1597651827314; Mon, 17 Aug 2020 01:10:27 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:26 -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 Subject: [PATCH 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:27 +0530 Message-Id: <20200817080941.19227-6-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041030_722749_CAF7AF91 X-CRM114-Status: GOOD ( 16.33 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/cavium/cpt/cptvf_main.c | 9 ++++----- drivers/crypto/cavium/nitrox/nitrox_common.h | 2 +- drivers/crypto/cavium/nitrox/nitrox_isr.c | 13 +++++-------- drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index a15245992cf9..485105ee3178 100644 --- a/drivers/crypto/cavium/cpt/cptvf_main.c +++ b/drivers/crypto/cavium/cpt/cptvf_main.c @@ -21,10 +21,10 @@ struct cptvf_wqe_info { struct cptvf_wqe vq_wqe[CPT_NUM_QS_PER_VF]; }; -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct cptvf_wqe_info *cwqe_info = (struct cptvf_wqe_info *)data; - struct cptvf_wqe *cwqe = &cwqe_info->vq_wqe[0]; + struct cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct cptvf_wqe_info *cwqe_info = container_of(cwqe, typeof(*cwqe_info), vq_wqe[0]); vq_post_process(cwqe->cptvf, cwqe->qno); } @@ -45,8 +45,7 @@ static int init_worker_threads(struct cpt_vf *cptvf) } for (i = 0; i < cptvf->nr_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].qno = i; cwqe_info->vq_wqe[i].cptvf = cptvf; } diff --git a/drivers/crypto/cavium/nitrox/nitrox_common.h b/drivers/crypto/cavium/nitrox/nitrox_common.h index e4be69d7e6e5..f73ae8735272 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_common.h +++ b/drivers/crypto/cavium/nitrox/nitrox_common.h @@ -19,7 +19,7 @@ void nitrox_put_device(struct nitrox_device *ndev); int nitrox_common_sw_init(struct nitrox_device *ndev); void nitrox_common_sw_cleanup(struct nitrox_device *ndev); -void pkt_slc_resp_tasklet(unsigned long data); +void pkt_slc_resp_tasklet(struct tasklet_struct *t); int nitrox_process_se_request(struct nitrox_device *ndev, struct se_crypto_request *req, completion_t cb, diff --git a/drivers/crypto/cavium/nitrox/nitrox_isr.c b/drivers/crypto/cavium/nitrox/nitrox_isr.c index 3dec570a190a..cc6b7c78e070 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_isr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_isr.c @@ -200,9 +200,9 @@ static void clear_bmi_err_intr(struct nitrox_device *ndev) dev_err_ratelimited(DEV(ndev), "BMI_INT 0x%016llx\n", value); } -static void nps_core_int_tasklet(unsigned long data) +static void nps_core_int_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_device *ndev = qvec->ndev; /* if pf mode do queue recovery */ @@ -342,8 +342,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = qvec->ring % num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, pkt_slc_resp_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, pkt_slc_resp_tasklet); qvec->valid = true; } @@ -363,8 +362,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; @@ -441,8 +439,7 @@ int nitrox_sriov_register_interupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; diff --git a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c index 5826c2c98a50..1c113be87ada 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c @@ -579,9 +579,9 @@ static void process_response_list(struct nitrox_cmdq *cmdq) /** * pkt_slc_resp_tasklet - post processing of SE responses */ -void pkt_slc_resp_tasklet(unsigned long data) +void pkt_slc_resp_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_cmdq *cmdq = qvec->cmdq; union nps_pkt_slc_cnts slc_cnts; From patchwork Mon Aug 17 08:09:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D47D15E4 for ; Mon, 17 Aug 2020 08:11:56 +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 05D2F207FB for ; Mon, 17 Aug 2020 08:11:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="09COIxR5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ASf239Qu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05D2F207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=9J4gNn44c9HgcAVQZ64vbrtj/rB47/3+doXwolUBka4=; b=09COIxR5cCXgJEEc4k2EaZrS33 cgwhdXFq+ZWF/3Tk/A3zC8aqOZ/7A6Z58NUvWFTkVqaN/b6JP0UkX1T+okZ6hC/28CudLGau8I0CI kkTno9ZovC06kur/oF9robAZljIVJli8TvMB4cadm0HHULSv/7D5g4tLZB8JcWXca0N2EHqW8vEu3 BnsHmiB/tou6S3Z+3dm/SvDX8f5VCrTgYfxe8AdV08z6BeXLujwBL4Pds15FCDbU8qkMyXUad/Q06 uULzTgm9rbYlxsasTgG3U9EI1nzavL9Izg6dnkIQUYhCwAySaf7oTd23BIyCH//vEBcWPMWJpdJy6 kpKGQHWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFD-0003UZ-8N; Mon, 17 Aug 2020 08:11:51 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aE1-0002rO-Eg; Mon, 17 Aug 2020 08:10:38 +0000 Received: by mail-pj1-x1042.google.com with SMTP id ha11so7332971pjb.1; Mon, 17 Aug 2020 01:10:36 -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=VinDDjwHMdYpZU5SBzKCUPmBxr02wiZcQyJEfGQA3Hk=; b=ASf239Qutr3AaVg6ajl9M1roy35Lg2BY55LgvIRVk3stNqCZ0RNdZQ8rB1MWeQpuOr 1CyWQGzdbE8u/vf3ZdTpaSZD6G/jfA673kVd9fXDh8+giv5yzIonNMeFqCN5yozOAC0H ZPlXVzvjNNZkQpTKm3hNxwpHuQ4prS8ZrVJ0u57tvoD+GLVxcGi+i6Ml4Cecqq8GxDMz 8tGWcY2fN7lpk80ZR0F04aZjSbPkvhBbLo4rS3nAz8Xw9ISjHd937v/ZhCfJRp/DxrK2 R3ZNI0fdrBwJ2r8DOU3feZUVevmGNB8kydY7yItKiaDLKwpbgjLgZ5aEU0btZgjhscFG dXgw== 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=VinDDjwHMdYpZU5SBzKCUPmBxr02wiZcQyJEfGQA3Hk=; b=K4eNSzxcpkZb/2dcvnO/P7vzTw4cuAtPq20ZSf6Mkdxxgcljo9VxiDEURJn8xOlwpq 1Y/t+xdhyuf+kcLlxLGm8G7YuNjRmkKWtvwbupBRREOA3xTNG89vfU6+u0nhDH6IQFJ+ PO99Asr5PN2B6O30tmexoGDjJj+7E4ABHb2yw21N1A7L7kNgA2PxexZ0+ag/VKqA4clQ GPkHjokBJqBmgKSvjVQvcDoHSVjx5BdbCfAGdDcDcupGPaLNG9wxWyPj0/R6iQr4oXC2 Iz0v3seB0Tudq9RuymuhEHnTwkLqz15Rda0JhmKITAqD/GPu4TVcQJHmAQ1DWUkrj9hF GEPw== X-Gm-Message-State: AOAM531I4ieigPzncSPvRZ3Gk3vo6KUomfd7XIevZF4BGwrFdQryBW0m DH3bON9zXkV7iE2rRrKzswg= X-Google-Smtp-Source: ABdhPJy4DCJivBANBKZY38wr+ek1xcFKHklAFMnVdnGJ4OZNvX15Y/fhqzzXlMNpktguFpJb4K3z5g== X-Received: by 2002:a17:902:6ac4:: with SMTP id i4mr10549314plt.146.1597651834938; Mon, 17 Aug 2020 01:10:34 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:34 -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 Subject: [PATCH 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:28 +0530 Message-Id: <20200817080941.19227-7-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041037_562810_C7C60D86 X-CRM114-Status: GOOD ( 14.64 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1042 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/ccp/ccp-dev-v3.c | 9 ++++----- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++++----- drivers/crypto/ccp/ccp-dmaengine.c | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0d5576f6ad21..858566867fa3 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -321,9 +321,9 @@ static void ccp_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(ccp->qim, ccp->io_regs + IRQ_MASK_REG); } -static void ccp_irq_bh(unsigned long data) +static void ccp_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); struct ccp_cmd_queue *cmd_q; u32 q_int, status; unsigned int i; @@ -361,7 +361,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp_irq_bh((unsigned long)ccp); + ccp_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -457,8 +457,7 @@ static int ccp_init(struct ccp_device *ccp) /* Initialize the ISR tasklet? */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp_irq_bh); dev_dbg(dev, "Starting threads...\n"); /* Create a kthread for each queue */ diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 7838f63bab32..e68b05a3169b 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -733,9 +733,9 @@ static void ccp5_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(SUPPORTED_INTERRUPTS, ccp->cmd_q[i].reg_int_enable); } -static void ccp5_irq_bh(unsigned long data) +static void ccp5_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); u32 status; unsigned int i; @@ -772,7 +772,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp5_irq_bh((unsigned long)ccp); + ccp5_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -894,8 +894,7 @@ static int ccp5_init(struct ccp_device *ccp) } /* Initialize the ISR tasklet */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp5_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp5_irq_bh); dev_dbg(dev, "Loading LSB map...\n"); /* Copy the private LSB mask to the public registers */ diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 0770a83bf1a5..a85690866b05 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -121,9 +121,9 @@ static void ccp_cleanup_desc_resources(struct ccp_device *ccp, } } -static void ccp_do_cleanup(unsigned long data) +static void ccp_do_cleanup(struct tasklet_struct *t) { - struct ccp_dma_chan *chan = (struct ccp_dma_chan *)data; + struct ccp_dma_chan *chan = from_tasklet(chan, t, cleanup_tasklet); unsigned long flags; dev_dbg(chan->ccp->dev, "%s - chan=%s\n", __func__, @@ -712,8 +712,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) INIT_LIST_HEAD(&chan->active); INIT_LIST_HEAD(&chan->complete); - tasklet_init(&chan->cleanup_tasklet, ccp_do_cleanup, - (unsigned long)chan); + tasklet_setup(&chan->cleanup_tasklet, ccp_do_cleanup); dma_chan->device = dma_dev; dma_cookie_init(dma_chan); From patchwork Mon Aug 17 08:09:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C148109B for ; Mon, 17 Aug 2020 08:11:59 +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 04CFF207FB for ; Mon, 17 Aug 2020 08:11:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ePGULlFy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QZj7I1Dh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04CFF207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=8a36goB/Z4PXR4n2BcQ3S6a9PaUW/qU+iuCu402ieXU=; b=ePGULlFyFrWF7mxLpZ5V984XE6 uz5kto/5rGM7nYxwIiL8C7tach6PClhTMgWJgTlO3ZeCC3m9cq6s421B0PFCj2Zwc2iv68THUKBgY Gr9vc/z/gyFJNMWR2g9yvNumzihMc7ouQUABJlG/zwrgYhHkPR06R0512xDN14Hbc+y39yGYQHiJv FBM26gYVyUUUdQyEqdXrrz/bbsRXWPeHKE8k5mP4PkFgLNxL469ZMOQSYgpE+h4YBO211YPzY7fey 3oAck8gDE2rRsHq9WBG9rV2I8DZtCFwcNIJq8t8i17wkW+0tdIRHJa10gdG/sVMCKIBR+c01by+YD XcY2l2WA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFE-0003VG-Bn; Mon, 17 Aug 2020 08:11:52 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aE4-0002tq-PL; Mon, 17 Aug 2020 08:10:41 +0000 Received: by mail-pj1-x1044.google.com with SMTP id 2so7429396pjx.5; Mon, 17 Aug 2020 01:10:40 -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=Bp1Vjbvu9eesAqyHmjyMGr6ksKKLGEXaOUC7HAWJKx4=; b=QZj7I1DhKFHe3pdIN6F8lOX8R2BA9cNJggmdfL9LrK28VcHVbDs/cZidkyV4Jzxn1e 8Q5sl7RE35mx89R2lS4f5qR0pWATUzSr2FpMBwvCbHJgFk/BTxbO9rpL7mpNDxCYRWme p0yMBqyWoAQhsGWIv9CEF0gnbTi0wee40V/XeQFSxZvuG7CR2x2kLlQQ1DuZkVV8eW49 NO61cvUHWLJabyMMLeaDEgQCMdtOMiVRljjd/3SfLb0t/cZTRjhe7idqLnqd4Oqx+Trh /OoFDUF58EIv94kvwTA98NUUj4dtZUCS4c7QNt4XDLzO5sjU+GYhwdnZiHWZXw79O5zA cJdA== 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=Bp1Vjbvu9eesAqyHmjyMGr6ksKKLGEXaOUC7HAWJKx4=; b=Z/ZMTWvlJpBEB5l0wj73BH+nloaKNruyAxRRdZG4jOZEWap7XYQoyRLZ2tNcOgkITQ gRGBpU8h/gOH976GLvS2zXR/FQs3NeJ7BC3FvVd8AWNXYSvPRKmTlGF71tVIsNHmwwFa kYJweT2MPM5bpVVlQqAbOGfVivYnQCVpycIcl1TB/SLbBCMZrEm+1eFkNPE8xnGf25JG IplLPwB+lRCHOJERdSBxDORXOuoANE7dZzVG8krcowmTVgmcTzrP50O52B7ffV8kUTsB SClHfLEIwII5hEsGzsI36lWlOR7ZItfKiU8lDssd7+DPkcAJ/w1n73dZTVhuJ2cReYXC cC0A== X-Gm-Message-State: AOAM530mGx4r/aGbZSi5I3wHHX1MIt1pi8P+rdFgFPRSo1nZcY8H6e6M ZS1n7hfnkKCEGuswyaV5ETs= X-Google-Smtp-Source: ABdhPJyoVJX3X87+tugLmoxBG/s46WfS1oac9OnhxEJJbePel+PZIBobfcV+AokpUHaOzTi/R3hj+w== X-Received: by 2002:a17:902:fe10:: with SMTP id g16mr10413715plj.43.1597651838856; Mon, 17 Aug 2020 01:10:38 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:38 -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 Subject: [PATCH 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:29 +0530 Message-Id: <20200817080941.19227-8-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041040_947954_21FD4FDC X-CRM114-Status: GOOD ( 15.07 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1044 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/ccree/cc_fips.c | 6 +++--- drivers/crypto/ccree/cc_request_mgr.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fips.c index 702aefc21447..bad228a36776 100644 --- a/drivers/crypto/ccree/cc_fips.c +++ b/drivers/crypto/ccree/cc_fips.c @@ -109,9 +109,9 @@ void cc_tee_handle_fips_error(struct cc_drvdata *p_drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void fips_dsr(unsigned long devarg) +static void fips_dsr(struct tasklet_struct *t) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; + struct cc_drvdata *drvdata = from_tasklet(drvdata, t, tasklet); u32 irq, val; irq = (drvdata->irq & (CC_GPR0_IRQ_MASK)); @@ -143,7 +143,7 @@ int cc_fips_init(struct cc_drvdata *p_drvdata) p_drvdata->fips_handle = fips_h; dev_dbg(dev, "Initializing fips tasklet\n"); - tasklet_init(&fips_h->tasklet, fips_dsr, (unsigned long)p_drvdata); + tasklet_setup(&fips_h->tasklet, fips_dsr); fips_h->drvdata = p_drvdata; fips_h->nb.notifier_call = cc_ree_fips_failure; atomic_notifier_chain_register(&fips_fail_notif_chain, &fips_h->nb); diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c index 33fb27745d52..ec0f3bf00d33 100644 --- a/drivers/crypto/ccree/cc_request_mgr.c +++ b/drivers/crypto/ccree/cc_request_mgr.c @@ -70,7 +70,7 @@ static const u32 cc_cpp_int_masks[CC_CPP_NUM_ALGS][CC_CPP_NUM_SLOTS] = { BIT(CC_HOST_IRR_REE_OP_ABORTED_SM_7_INT_BIT_SHIFT) } }; -static void comp_handler(unsigned long devarg); +static void comp_handler(struct tasklet_struct *t); #ifdef COMP_IN_WQ static void comp_work_handler(struct work_struct *work); #endif @@ -140,8 +140,7 @@ int cc_req_mgr_init(struct cc_drvdata *drvdata) INIT_DELAYED_WORK(&req_mgr_h->compwork, comp_work_handler); #else dev_dbg(dev, "Initializing completion tasklet\n"); - tasklet_init(&req_mgr_h->comptask, comp_handler, - (unsigned long)drvdata); + tasklet_setup(&req_mgr_h->comptask, comp_handler); #endif req_mgr_h->hw_queue_size = cc_ioread(drvdata, CC_REG(DSCRPTR_QUEUE_SRAM_SIZE)); @@ -611,11 +610,12 @@ static inline u32 cc_axi_comp_count(struct cc_drvdata *drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void comp_handler(unsigned long devarg) +static void comp_handler(struct tasklet_struct *t) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; struct cc_req_mgr_handle *request_mgr_handle = - drvdata->request_mgr_handle; + from_tasklet(request_mgr_handle, t, comptask); + struct cc_drvdata *drvdata = container_of((void *)request_mgr_handle, + typeof(*drvdata), request_mgr_handle); struct device *dev = drvdata_to_dev(drvdata); u32 irq; From patchwork Mon Aug 17 08:09:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7DBE15E4 for ; Mon, 17 Aug 2020 08:12: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 7B7D92080D for ; Mon, 17 Aug 2020 08:12:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MRRnawFe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JKaW/qhi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B7D92080D 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=x52G1eBaq3kEV+Hsm36k9nyxULvwWOViIUCIY4c2xcQ=; b=MRRnawFeAToPMJ9EIuMxJNYGoH spe/9c0ARmj4N828OAeZQ+XjszjWWPP8Aw1+9ymCmnG2Y0iy379aR3WmWmz5AdKyO3rl/VGut++Lv ZC+Dk7Pw8eKGFGJ7C6A7bvXbbaJm/a+MrfyKzhxpnPoeoFWTXclkRM5U6+6jZvD8NKedhfhM8gb9B OkuFb7GqNx67H1rPlywEJMRY4/FeonJRYlWSpSggSOwJDRS0gt/flO0AFuTk6E/lt2lCbC4vs2mfy mr8/qB5YEye0v1+8u3n88xAq6T9pXdkRo9SEWJ4AWhGiDZrS9ZCKidgKGv9eXRd7RhMpX/2fLbBTq qPxBK95Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFL-0003aZ-7u; Mon, 17 Aug 2020 08:11:59 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aE8-0002vu-NO; Mon, 17 Aug 2020 08:10:45 +0000 Received: by mail-pg1-x542.google.com with SMTP id i10so2212152pgk.1; Mon, 17 Aug 2020 01:10:44 -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=c28nS7WM/lTYYOV8e8WUD4cNVy3Nzu7Y0qu9f3pUCU8=; b=JKaW/qhiuSNySCEDtskRMrkBRMcOYGrH0RWP8TPo+yYLl2eZCTVycD16UiJAsViA5k MkXG7XD47OeYn+hc+/Dq6+RAOz8cem+i9O4jDB6xuiGZjjfLcC+7P3iW2oejT+HjaBij Rqz2I8RZEKzf7kizbmX2KnnKxFL9O0u8zAdXxw9Uy/Sa/JRB4o0laqHAYtGuodcS52rI zME3rgin9Ca0nJRrNelux/wp7R8tf4X0J0txkY5T8d7JWZYxdj5kOiZxAi+y1Iq77wmA 47klSV2lR00j9fuVBF2asw1sS/xrgTauYLJB2b5P6UbGbqlDupcwP5YdT23MYcReuUeu 4YYg== 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=c28nS7WM/lTYYOV8e8WUD4cNVy3Nzu7Y0qu9f3pUCU8=; b=Vw6bB9owLMGC/IyPvYKezHtztoQA7lx8YK46R5VCrq3i2RhF7zvr2gcubDWYApd0ZY txlgqmnXxQVq7oUVPkJYbi5oXSS5tNFoMC0E0GQehMnVXwK/hwoZhDHQSaB1/TtG34K3 /iyUywkWcnqfnHJJyOLc6agXj5MnjatPM0JavHIGEjwTk5ZEWBR85YPbAG5Ct8A1xDv8 mZ5o5LhXlrBd4r24ZdBjAyLt29MAJQtJrcT4ZGakoxl2eRddDof+m1MDMBRVJyB5Am3k d77TCJr0WEZwHNQhA/0ZqhZ1BkjzxHPT0pziDY6CUTZY8lrGMBC/qb5j0UX/4BpWq1di /9+w== X-Gm-Message-State: AOAM531+r/8K/x/Vze9P27x/6n/xzZuP96IRHSs/zuCNt2bPHz/SPPEN 3saamWPOSTDbo+uwyjKbb1dow2QzPQtkjw== X-Google-Smtp-Source: ABdhPJy9BYzbwcPgD8HG385Grr9hWC6WWjeKSMjJrjMJT/p0siFf1MLryVEBt68UMnCJUAKmTrmeNg== X-Received: by 2002:aa7:8f04:: with SMTP id x4mr10836392pfr.199.1597651842595; Mon, 17 Aug 2020 01:10:42 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:42 -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 Subject: [PATCH 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:30 +0530 Message-Id: <20200817080941.19227-9-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041044_818888_BA11C09B X-CRM114-Status: GOOD ( 14.11 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/hifn_795x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 354836468c5d..785d7c4f44e7 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2443,9 +2443,9 @@ static int hifn_register_alg(struct hifn_device *dev) return err; } -static void hifn_tasklet_callback(unsigned long data) +static void hifn_tasklet_callback(struct tasklet_struct *t) { - struct hifn_device *dev = (struct hifn_device *)data; + struct hifn_device *dev = from_tasklet(dev, t, tasklet); /* * This is ok to call this without lock being held, @@ -2530,7 +2530,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, dev); - tasklet_init(&dev->tasklet, hifn_tasklet_callback, (unsigned long)dev); + tasklet_setup(&dev->tasklet, hifn_tasklet_callback); crypto_init_queue(&dev->queue, 1); From patchwork Mon Aug 17 08:09:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2642109B for ; Mon, 17 Aug 2020 08:12:16 +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 991C1207FB for ; Mon, 17 Aug 2020 08:12:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W9zBiWDn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QH+SZkjS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 991C1207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=lh6/4WrQ80ua7fukn9dxxAn1nqWccGujUNqZeT3iAY0=; b=W9zBiWDnDChd/L0qweiaoKdZUN 9kIRkwkl5fCm4Fap4SSyjK7HDCna2qgPNsXLxj6/cCTabj2TWGJCWeeQ5E7yIk2+7csXa4fojs1fV NROh9uk6bYD36Rz0cSi3fX0DyXr1m2MevHleAypWtJLoV0LOxUtwOa8ci2c0vYIUerUXkgrlw4g5W 5c7fKB96dNxsAQKF7vuRX15fuJQdeB0jvGJ1SiLG+/5CGI0VMR8M+rhQ/hPUnUEmJcdHl7DoD4Slk xunIKz7u+MRLP/JaQtgdwFoACe3i1prB+6ISi1UGaztvpfNVL3ftuBlYozDlQV/Ij/w4UeC+enahC rNthLl8g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFX-0003ie-8L; Mon, 17 Aug 2020 08:12:11 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEC-0002xj-K2; Mon, 17 Aug 2020 08:10:49 +0000 Received: by mail-pf1-x444.google.com with SMTP id m71so7862415pfd.1; Mon, 17 Aug 2020 01:10:48 -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=T0sLVbrfectytHqZFxlEJXbpLhBtp9iQhcYx656caTaXX1vUjy4p8xwv203ZQ3WsRQ hLmt6UytC+CXbuh+3UjW5tjcIHN/5k+rLMdCVZCTGkTXWU+qwjl3NfAzDWRcitzanQT7 Q7NoYrqc/S940Ex7VMPQMtJHEbrT/5SbruZJZOxv5iGiLZ7MNURWRETzFxIVCKsrBSQ7 hW847c6IamuO2UkZxc58DmF8gXFoMgKjBWj8VZen4C+UAnDwRKRSsHpslW9WxF6HUNN6 UZW6A4F7swj+lpOeM6zr0vWKu7/O6Z9X/WbuGw+KPi0fo7OUTbiqvnBPBtGor/mhJJzK OLbA== X-Gm-Message-State: AOAM5318lbU9ZxyFBGTml68/RZjHR6Zmr4UzYnSKvzF72kJ98AOFrs34 Ng9GXUwlccMfzo2NCxBQLLs2ptv8sR33bw== X-Google-Smtp-Source: ABdhPJxmetqO1n9H4Ju5wN5dejc+GQRTEjJ2B9RVF6qMxczI2kKGGoFf4wVOw48rAOu09tHL2QUQtA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041048_733580_6E65C62B X-CRM114-Status: GOOD ( 14.44 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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); From patchwork Mon Aug 17 08:09:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716775 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4859513A4 for ; Mon, 17 Aug 2020 08:12:30 +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 20DD7207FB for ; Mon, 17 Aug 2020 08:12:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xp9MvZIN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hQU4vn0G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20DD7207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=nR2WXbgoIsXNdQpWxyLsIHXDGWUgWtTVePvrSXn+QW4=; b=xp9MvZINLt0XpAr/PNsozwbN36 AMqR43aNfAoLLoYINVXTymWTrA3doNLNKmDusOxVbf/KhUuZtj6ra0g2GQ9mU2kElFYNpxV3m/KHg JdkMrBtGN8SaLNLbDpcUaH5x4d/0WxA+fzBQNWfdsIlnEx3gpPnm9xK6KO3xl3A13wzF0ckpoalNq dJnoHK6s1VfzcZs3HjRwSZecEMxL/d+HnqBhxsDQ0vWQpM57YnNmVQr4D7FoKyRPbSVmHAYSAhLk8 wD3tNbdg2fd8zH58iTS5xzXS+ZCv7NVev8waMkB61o09CG+naROEw9EpdYYNwGtSDBRxJkEiARSb7 CnDDfNug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFi-0003pn-Mf; Mon, 17 Aug 2020 08:12:23 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEG-000309-Kz; Mon, 17 Aug 2020 08:10:54 +0000 Received: by mail-pf1-x444.google.com with SMTP id 74so7832588pfx.13; Mon, 17 Aug 2020 01:10:51 -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=0lVeVyUi928a7/fzs7+FY0tXKdsKnkp78ZmUm5IzGsw=; b=hQU4vn0G9qzRlCq6N+seXKFofQkuPKmULu4dD8/Hg7tm7u1tpybameqU+4C8/8NYLx hTCGmVlt+mhyfLFNFkwDYCFAKTNUWqG6fpFauhqiSwY93BJiDTh9xBJZO5t4OefFqIq4 to5E49yEXe+Gah/XLnEkfF2zg65G51qXM2REKPgJvRNaACb1/WqAM18QK8RcvJqRzBqE NNTvDPryPR9KRt9ocGHgk+qQq+DR3FD4bVP4e2mvo0gGGufCOEV7HgBZTPRBYQKGODUR obOoFk/pQpJ4cd2zjNT/NdUJA1bMPXhdGkFOjbEhoVpprDMmKcRlyLCmipfdMlD28lex Af9A== 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=0lVeVyUi928a7/fzs7+FY0tXKdsKnkp78ZmUm5IzGsw=; b=esVzegdMzTTKbG7FByfe2bQSyVgNAHJ6AzRPtRTAIkj5Le9JpalQLXzQLNvnDKTPuO 2A8wiTQB2r8925Tfu7uSYdJMs4EshixjYc/gPiIAh+tth4oD+x4Ljod+M3uyLBorOpHc l8IVCmNsZvzrYGa0E6n2qUZBgw7ju4VqxFCn4T3PAQTtM4Q6VN7BkYkcaQ3eRaCvf3yQ tsjeDxLVzTrj/3k2wuZU6H57t8vU7DBClEGZCJVWkKt/8U9/jWpToXb/06iC5YfRbSJM vX1oPqTC58NRh4Zj+Aa3ODfcShaXoH1MP2pK3kZxQFDpvThbe/f/cCiaBQH6EoGV+w9N yoSQ== X-Gm-Message-State: AOAM530AOGlHTYTdE/Qdd+M6mK35Vura1vHS3AHVFFWP14ZxKpdt9OvL HAUC930UL7MDrVkou2z/LtI= X-Google-Smtp-Source: ABdhPJw356CtYnI45KdkYTDa3IIDMQEWrcBTSATYq3hf/G3Zjs0kV6xnzKLETPtBU1XVb0/XiQEYqA== X-Received: by 2002:a62:8cd3:: with SMTP id m202mr10164425pfd.184.1597651850205; Mon, 17 Aug 2020 01:10:50 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:49 -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 Subject: [PATCH 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:32 +0530 Message-Id: <20200817080941.19227-11-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041053_045310_F2F5573F X-CRM114-Status: GOOD ( 15.47 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/ixp4xx_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index f478bb0a566a..31a584940022 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -414,7 +414,7 @@ static void irqhandler(void *_unused) tasklet_schedule(&crypto_done_tasklet); } -static void crypto_done_action(unsigned long arg) +static void crypto_done_action(struct tasklet_struct *unused) { int i; @@ -497,7 +497,7 @@ static int init_ixp_crypto(struct device *dev) goto err; } qmgr_set_irq(RECV_QID, QUEUE_IRQ_SRC_NOT_EMPTY, irqhandler, NULL); - tasklet_init(&crypto_done_tasklet, crypto_done_action, 0); + tasklet_setup(&crypto_done_tasklet, crypto_done_action); qmgr_enable_irq(RECV_QID); return 0; From patchwork Mon Aug 17 08:09:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A6B2109B for ; Mon, 17 Aug 2020 08:12:35 +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 B8C11207FB for ; Mon, 17 Aug 2020 08:12:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iq0CEl0O"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vCNVuFix" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8C11207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=lYtI3DyfOTs897IsMPOZOgUEPhlP/6sIrXkhagxIbOo=; b=iq0CEl0Ob0L1P/SEiu2UvbGYCB KOU4ah8wiw0JhZYGs3uHQy8hkhG+DXrPUiAEu567m5VTdJvWjTyL3COxAIpopiVV1RXSApzuU7TM4 SgbrYLHTJMNqTQnaLZz53Rsfwat+iDA4SEq3OZynFQ3w//8R7GS7EtQQdzVJlE3eODM9HRg6BM7Yv 0tMqkG63DLyNuDmr1Sr+KIeZ1qwQnOgLvEZeWG75NsF7mChVp8o5X3C3B0N0hYG54GOh0884ZhwIV syQnCeHMqJkovsXdI7rtQE+dCVFwEAcEd9I5i3OJXmpzjIrnFiXLLuswcwAlpxhAzXdH5xcezCli4 HIZrv7pg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aFm-0003sz-VL; Mon, 17 Aug 2020 08:12:27 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEK-000322-5g; Mon, 17 Aug 2020 08:10:57 +0000 Received: by mail-pf1-x444.google.com with SMTP id x25so7861118pff.4; Mon, 17 Aug 2020 01:10:55 -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=29Cc8iNRVO8G7DTd5+GqkXPX7Kx0cyS5m7DjP0Ag8Mc=; b=vCNVuFixVNNuPta5SWwJK9d836N/VbFNSDLfBVrJ+w7kEFV4M1HRgPNUepgKRBAI9r 76I/bxaGXC2mtUM/L5Vd4gs/MNuPEFoap605rvDEtJKjMAVfRlEP6Mydb+oWCaXvubnP 35/5l+nVtv21Mu3YfVXv2sAMBsufHBRv2NwnTCMcA58uf3F5aBIbsLG0JK9111705ahS C+oxNgzu76baSmk20w8WaujscxrfWbzSdvVfl3U6gP3jEbD4Z0fVygrOX3zwD3wuJMvF 4NBdiEIGBNFq0B6p7hWTA9M62hUaaq7rJTAfKdk3lt79uL0EGyju9EzTXxjmoqwOAsn/ G+Gg== 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=29Cc8iNRVO8G7DTd5+GqkXPX7Kx0cyS5m7DjP0Ag8Mc=; b=n3QK7IpQWPxoeWgQ/ISFSd245VlTQS8bW+aD6nB4+Ysg+rxQ8F4zYU3W4MdPbVTyuz PrYHCJbJDJap61V0twKKSH/aZzcAOvTMnqSiapeSkCN0Azkuv2F8iKUCzmxarXT40RM6 8tbrzcvou2mIg0KSgisL2hErYMBlVf5cYuE9wiMMh63T1O6sXFQXXZxtIP49WdmXPxJm ilnLmrho93eeCl0LUoiq+zPsy5oNVvBMx2nSAMBv0Nk9M06JA9TEGo5EgmB5ajzInM7G LIlKMVkaobNMvUNyGVvFriDqgNO5vzkFwh1TaTUU+UkB9NJvwYYxPXjvuBIR6YsLolNv vvgg== X-Gm-Message-State: AOAM530X5U71uqHC9eMkNXHfc06dO3xbvzDyPgvu4AgB00Z/uF5zctDi vvSh0CCYFCy+ROT+yUhFPDkYkOCy3R/JLQ== X-Google-Smtp-Source: ABdhPJwwqp+UtqVKQBUluo4dsr1lmQnlD31gkclvHzhxea7YxCNOG2iDdO/rutHGUUIO4KE5Lqm6eg== X-Received: by 2002:aa7:8751:: with SMTP id g17mr10333709pfo.109.1597651853965; Mon, 17 Aug 2020 01:10:53 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:10:53 -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 Subject: [PATCH 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:33 +0530 Message-Id: <20200817080941.19227-12-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041056_338280_558AC5E4 X-CRM114-Status: GOOD ( 14.28 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/mediatek/mtk-aes.c | 14 ++++++-------- drivers/crypto/mediatek/mtk-sha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediatek/mtk-aes.c index 4ad3571ab6af..5557359f105c 100644 --- a/drivers/crypto/mediatek/mtk-aes.c +++ b/drivers/crypto/mediatek/mtk-aes.c @@ -1089,16 +1089,16 @@ static struct aead_alg aes_gcm_alg = { }, }; -static void mtk_aes_queue_task(unsigned long data) +static void mtk_aes_queue_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, queue_task); mtk_aes_handle_queue(aes->cryp, aes->id, NULL); } -static void mtk_aes_done_task(unsigned long data) +static void mtk_aes_done_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, done_task); struct mtk_cryp *cryp = aes->cryp; mtk_aes_unmap(cryp, aes); @@ -1151,10 +1151,8 @@ static int mtk_aes_record_init(struct mtk_cryp *cryp) spin_lock_init(&aes[i]->lock); crypto_init_queue(&aes[i]->queue, AES_QUEUE_SIZE); - tasklet_init(&aes[i]->queue_task, mtk_aes_queue_task, - (unsigned long)aes[i]); - tasklet_init(&aes[i]->done_task, mtk_aes_done_task, - (unsigned long)aes[i]); + tasklet_setup(&aes[i]->queue_task, mtk_aes_queue_task); + tasklet_setup(&aes[i]->done_task, mtk_aes_done_task); } /* Link to ring0 and ring1 respectively */ diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c index da3f0b8814aa..ea0ae45cde93 100644 --- a/drivers/crypto/mediatek/mtk-sha.c +++ b/drivers/crypto/mediatek/mtk-sha.c @@ -1163,16 +1163,16 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void mtk_sha_queue_task(unsigned long data) +static void mtk_sha_queue_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, queue_task); mtk_sha_handle_queue(sha->cryp, sha->id - MTK_RING2, NULL); } -static void mtk_sha_done_task(unsigned long data) +static void mtk_sha_done_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, done_task); struct mtk_cryp *cryp = sha->cryp; mtk_sha_unmap(cryp, sha); @@ -1218,10 +1218,8 @@ static int mtk_sha_record_init(struct mtk_cryp *cryp) spin_lock_init(&sha[i]->lock); crypto_init_queue(&sha[i]->queue, SHA_QUEUE_SIZE); - tasklet_init(&sha[i]->queue_task, mtk_sha_queue_task, - (unsigned long)sha[i]); - tasklet_init(&sha[i]->done_task, mtk_sha_done_task, - (unsigned long)sha[i]); + tasklet_setup(&sha[i]->queue_task, mtk_sha_queue_task); + tasklet_setup(&sha[i]->done_task, mtk_sha_done_task); } /* Link to ring2 and ring3 respectively */ From patchwork Mon Aug 17 08:09:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EB7413A4 for ; Mon, 17 Aug 2020 08:13:12 +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 E8F63207FB for ; Mon, 17 Aug 2020 08:13:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cRRwQs9I"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lCHZCy3p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8F63207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=nW8jlGAFvMAU2wXTnfn6SPN2rxm6WmiJBToC+BcDsps=; b=cRRwQs9IybVsBBsgoTKEPPE//F 95cihYG+TEh7jjUr7du1rk6+AasqqY2gyxJhXVgu+0o/qZOYqZXc8aREHU7X2y5y+zAwuITOLD5i0 Uhl42KsAJJHikXWkvPkWyu49652gv7reXhwwjc1o4KSiuKHSRvOZ1BXeDIRaAGpmrAtKBLhlpuiRr uhuX9szdsQPAhffJu5KTj3xvQwu/h8Hn5PShwfC+wg/GkpI9GVmq93UgBMrfvozmA30B3mgltKSac 6L0y70HfpLJrhWFAuPRgClOyQW7sa5L784+yugyGll9+sL1UF0wlwQZmS+SbICaZUcWO1HcOnKsHZ b7i47fPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aGJ-0004Gi-Os; Mon, 17 Aug 2020 08:12:59 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEQ-00035F-3I; Mon, 17 Aug 2020 08:11:03 +0000 Received: by mail-pj1-x1043.google.com with SMTP id 2so7429768pjx.5; Mon, 17 Aug 2020 01:11:01 -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=g18ZQpmqGeMNX9dDVA9Vbfnz0/OcBcLMgsbRwioGhRLruQedZldsdgOh4ybTd6WF96 CtQK0LAanWtGV8ZmM2W5Onsk3l6dv19AMGcAjm83xi+MHUXhQodG8DqTs+c7B8LfC7H5 L8IXtAuF9Tu3fOceXFcJz5G1JstmA+/lHpVYINmpOChOw8b0Lu1hzdJYyfZUk6PvNhMY sGHR8JarKavaPb2hIzIbTF7ODzkv92gO5NvRLGgF1CWh73AhR92yAWqzcM4EybITdCEW /DgM9WVEaYWlYulVSX5JuN3cdzeJpu5XSKeavAymiZs4V9QcXJldM/4SqixMFC339gBK NDtg== X-Gm-Message-State: AOAM533u8AiCDP4Z05CLuXesLQoppzo5LZGpYcCXI35HzMNGoQiTWvq9 swH/aJ8gcQ9H8qjhiWGugJI= X-Google-Smtp-Source: ABdhPJzIlpoIQTSdahVGMk8x5siqZ5Y3mjG1CPosG5SauNGyLp+frSB0ojX4DsaYxwOAzse/edpt+w== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041102_215038_7777B899 X-CRM114-Status: GOOD ( 14.97 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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) : From patchwork Mon Aug 17 08:09:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE9D7109B for ; Mon, 17 Aug 2020 08:13:20 +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 C72F6207FF for ; Mon, 17 Aug 2020 08:13:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ASAJkKO2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bRgt5XvQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C72F6207FF 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=lVWpu1apyLzXg8JIXJQox5wHHjB0wiC0EsyaCs1ZyQ0=; b=ASAJkKO2zwil29tElNR0nUJOHe vzqJhtlC+iOaBir1n4vur2TuwLQSnN3lalG9SaC/wIAptrqeAqQZ4xah+SJPEF96LcuaKNELHCEh8 fWHKqZHR/34qWlDAPlAvt2YdYfteo96jtcrtTtq6htvcw+USnV6WaRck8rg5jLSSP2CvhN+uQ9zmB ytSUmlAT/ltlkhMcVwlSCoQEKraus1OrwRjcqxi+1THwlYDTTrfb9EIzvvqfx96vxGksg3LxDr6k0 Wg11Y5ujqQ+nOQlXjTF7Fs+J9b7ZVqVXo0/1xxBI1667HX81P9hjw/wDn6uHx/bddqihGPBJX4jA0 aT9bsefQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aGV-0004N9-NP; Mon, 17 Aug 2020 08:13:11 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEU-00036e-KO; Mon, 17 Aug 2020 08:11:07 +0000 Received: by mail-pl1-x644.google.com with SMTP id bh1so7110087plb.12; Mon, 17 Aug 2020 01:11:05 -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=QaP8DINxDsuq2i3hJ8sJPBp0gJbGxyzKBcVj40ZfIHk=; b=bRgt5XvQ3AUktQa2vCokcQj+MeQZPYkIk6vnFPw6IBG+xcRxtqne9ZNSgBv9LDra+p 7NfbPuWxZCqrbXVZeEcef6x/YdwYhClCbJeJtvk7Suw0KyDoZNAqJv3Fs5x3Ug4kk9oQ eisa0G+cHHV5rnB6t55SztjvZq57qsh5wgujX77NsrE2ylqkiBB3qtQhttoqg/ubjuTR uTtCl9eBBFQiN74Tv9V2IQPD9Zv+OeHMNonaPYbfTKsVwkjDfpU+6iU/tZjETQGvOVIh SzewaHsipx7KzhS7KVefaNhX5A94UAkH2ObH+6CkFOyc3U/eDyULBxyYU40ZmHhEgwAe 1owA== 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=QaP8DINxDsuq2i3hJ8sJPBp0gJbGxyzKBcVj40ZfIHk=; b=jha6y2lerkm6HYllgVkVuKZOyuCJ5lSMRjoinJM7zMoYA7BTkTGAQy5X5N5AbAz0Dl wt9HEDtQoBOQGeze26ooNZlYRBaw9hR21XxksnvdRFjf+ZRzw4jsCVG6wI2kXX4evquU e96LJe5glCaVf+H4CBm/JpLp1K0yJwoqtaTF4UCgW3c1ovvYkX6OI2Sz/Fqfr9Gc2vf+ MkW9i9KL6o+QOJ0EhqYCH5WGBJORlhWSAnfQWPsje2QuTw2AymAX5FlPe4XRY7rYo+Tk qRE66/iIizkj26deYmU7mxm+EV4trkTBkoDx/nOkUVEB/C1u6om6eo+LmYrCEt5drMmN XFCw== X-Gm-Message-State: AOAM531TeEXJ0V3KNSXzNeLw0P6cE/gWSJd6+nF8hU7ADLbHn9MEaQ+l oYun2TtAlyN4EMAeO/3T4cA= X-Google-Smtp-Source: ABdhPJwWx9U4dwEOuvx8zZZhWSxZrW/QTfZvVwvzjU7vTTOa870r6Mdybq2AgvVeVI1eNan7GZHkLw== X-Received: by 2002:a17:90a:ec0c:: with SMTP id l12mr11456530pjy.90.1597651863782; Mon, 17 Aug 2020 01:11:03 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:03 -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 Subject: [PATCH 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:35 +0530 Message-Id: <20200817080941.19227-14-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041106_810748_7040C933 X-CRM114-Status: GOOD ( 13.37 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/picoxcell_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index dac6eb37fff9..a394d51f8d44 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1136,9 +1136,9 @@ static int spacc_req_submit(struct spacc_req *req) return spacc_ablk_submit(req); } -static void spacc_spacc_complete(unsigned long data) +static void spacc_spacc_complete(struct tasklet_struct *t) { - struct spacc_engine *engine = (struct spacc_engine *)data; + struct spacc_engine *engine = from_tasklet(engine, t, complete); struct spacc_req *req, *tmp; unsigned long flags; LIST_HEAD(completed); @@ -1648,8 +1648,7 @@ static int spacc_probe(struct platform_device *pdev) return -ENXIO; } - tasklet_init(&engine->complete, spacc_spacc_complete, - (unsigned long)engine); + tasklet_setup(&engine->complete, spacc_spacc_complete); ret = devm_add_action(&pdev->dev, spacc_tasklet_kill, &engine->complete); From patchwork Mon Aug 17 08:09:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716787 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 060AD109B for ; Mon, 17 Aug 2020 08:13:35 +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 D34DD207FF for ; Mon, 17 Aug 2020 08:13:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p2v+sOL3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mSzVzjl9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D34DD207FF 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=KDnNhs8Do3Ow6jYmOxhhGEZnRvyAqsU3TR/cOJ/QC2s=; b=p2v+sOL3TQk8HBDo8QYmnnRHi9 O3TQXdl4x9p4fClTteCAZ8MLAPP2QYsJtI38jTLsd5nfv0GLYbRU3D/Mnu+d3moRS1pG91+fO04i8 +n2wZOfoqP8hIMsmyeS5aLxnxKNeF4sIQCsGZqVIqxf4geXiWnJ17DkL6NhrorcLy+7jFw6YJGijD NiDxmTh/oSB5uyMPsaH6sjIUhx9Qux+8IkU3N2Qq/6PaT+IfC5K8WE719W6uvKrfcmhaPvjTInthJ 7lZW/sFXc0Yw5eOqjIRwrTRimkcEkNb+W/NBTJs4qOjQNHTLj8xBAxOEdKbYgM7l42qA0Rz3llH0D wq5f+aaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aGl-0004ZL-SF; Mon, 17 Aug 2020 08:13:27 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEX-00038v-HQ; Mon, 17 Aug 2020 08:11:10 +0000 Received: by mail-pf1-x441.google.com with SMTP id k18so7843237pfp.7; Mon, 17 Aug 2020 01:11:09 -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=xzdv2ZSv3WdZOXSlAT06fEIIEJlKISgDxvECZ+phBss=; b=mSzVzjl9shstbRibUeyiEHGY5CEpiq7vLYQn3s/P85kcDJjjfIWObnqLQz2ofOO5hQ 0pPCGZzb8YAtthVpC/AuBr+/uvW6e4Re3d1uzczZgCM/Xdg4h5prt7L5L2MADbIOWnnx LZhtdyChXKyNfh27VCyFCo0Fmco1g74AbnNjOgcs3+rWd3NnJxybEuoxLPL9y/R+FnIF 5aY2NX/nq+1slYqui/ELv3E/gegdLaQd3oxZkVIjbz/c/fdCZASUxuCcn/d5wT3M39vN UiySNAfKPcfMRZgC79knluWE/bon53C5XrwCkpAAyoIAfuAhe6eBVDfjYo/JLlm6H8xh sSvA== 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=xzdv2ZSv3WdZOXSlAT06fEIIEJlKISgDxvECZ+phBss=; b=Dnxn9BbysyvULmhG0cf9bggp4TA2xTE3LYDBKnH/XiYFGEzDXO9nLKW+AS4rGijkEO zYzYshg5NdFzaaEOU7mYWpyr+EBcmnLGjbFuCz/qI6xI2s89DQ3dqFgBEI0Qv12L4+mw hY+uHgY2QjmnfK+LFta6CVpE5rN+pajZWToZABTMREIqdar3f/4usICtOXo9Tre9KDYg 36foi4tKmS1Lr/PuRr/ugoEVONb0JgGIAysmhM7Qvx0VxUVvVOiqlXAyFTZr6BfdoYHC axoi3/NeZQ4WQpeU1gcip9nsXOK2pCaqDySomi94MVLZe2mYgXBZSOo53Y5Af1KPn6fF K+mQ== X-Gm-Message-State: AOAM531sUUZg6eplh8XLzawTx0SpowTYrE+fRNdof/qpULeoD9atmEpj 53xsT0o57KE9kTzn3PP/ZoE= X-Google-Smtp-Source: ABdhPJyCCXEe7H64nOlA02ZHyxnHU2TisouBVgPphrwxXG5sgR6CZ75ka5QReSu+pCtaOnpEQ70uJA== X-Received: by 2002:a62:1c58:: with SMTP id c85mr10397180pfc.105.1597651867489; Mon, 17 Aug 2020 01:11:07 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:07 -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 Subject: [PATCH 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:36 +0530 Message-Id: <20200817080941.19227-15-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041109_662558_9340ABA0 X-CRM114-Status: GOOD ( 17.63 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/qat/qat_common/adf_isr.c | 5 ++--- drivers/crypto/qat/qat_common/adf_sriov.c | 10 +++++----- drivers/crypto/qat/qat_common/adf_transport.c | 4 ++-- .../crypto/qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_isr.c b/drivers/crypto/qat/qat_common/adf_isr.c index 36136f7db509..2c725c01ee4f 100644 --- a/drivers/crypto/qat/qat_common/adf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_isr.c @@ -239,9 +239,8 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) int i; for (i = 0; i < hw_data->num_banks; i++) - tasklet_init(&priv_data->banks[i].resp_handler, - adf_response_handler, - (unsigned long)&priv_data->banks[i]); + tasklet_setup(&priv_data->banks[i].resp_handler, + adf_response_handler); return 0; } diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 8827aa139f96..7a2bdddb67c4 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -49,9 +49,10 @@ static void adf_iov_send_resp(struct work_struct *work) kfree(pf2vf_resp); } -static void adf_vf2pf_bh_handler(void *data) +static void adf_vf2pf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_vf_info *vf_info = (struct adf_accel_vf_info *)data; + struct adf_accel_vf_info *vf_info = + from_tasklet(vf_info, t, vf2pf_bh_tasklet); struct adf_pf2vf_resp *pf2vf_resp; pf2vf_resp = kzalloc(sizeof(*pf2vf_resp), GFP_ATOMIC); @@ -81,9 +82,8 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev) vf_info->accel_dev = accel_dev; vf_info->vf_nr = i; - tasklet_init(&vf_info->vf2pf_bh_tasklet, - (void *)adf_vf2pf_bh_handler, - (unsigned long)vf_info); + tasklet_setup(&vf_info->vf2pf_bh_tasklet, + adf_vf2pf_bh_handler); mutex_init(&vf_info->pf2vf_lock); ratelimit_state_init(&vf_info->vf2pf_ratelimit, DEFAULT_RATELIMIT_INTERVAL, diff --git a/drivers/crypto/qat/qat_common/adf_transport.c b/drivers/crypto/qat/qat_common/adf_transport.c index 2ad774017200..60982c67b466 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c @@ -297,9 +297,9 @@ static void adf_ring_response_handler(struct adf_etr_bank_data *bank) } } -void adf_response_handler(uintptr_t bank_addr) +void adf_response_handler(struct tasklet_struct *t) { - struct adf_etr_bank_data *bank = (void *)bank_addr; + struct adf_etr_bank_data *bank = from_tasklet(bank, t, resp_handler); /* Handle all the responses and reenable IRQs */ adf_ring_response_handler(bank); diff --git a/drivers/crypto/qat/qat_common/adf_transport_internal.h b/drivers/crypto/qat/qat_common/adf_transport_internal.h index c7faf4e2d302..ff891f5bc783 100644 --- a/drivers/crypto/qat/qat_common/adf_transport_internal.h +++ b/drivers/crypto/qat/qat_common/adf_transport_internal.h @@ -46,7 +46,7 @@ struct adf_etr_data { struct dentry *debug; }; -void adf_response_handler(uintptr_t bank_addr); +void adf_response_handler(struct tasklet_struct *t); #ifdef CONFIG_DEBUG_FS #include int adf_bank_debugfs_add(struct adf_etr_bank_data *bank); diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index c4a44dc6af3e..79c0d51ea263 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -68,9 +68,10 @@ static void adf_dev_stop_async(struct work_struct *work) kfree(stop_data); } -static void adf_pf2vf_bh_handler(void *data) +static void adf_pf2vf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_dev *accel_dev = data; + struct adf_accel_dev *accel_dev = from_tasklet(accel_dev, t, + vf.pf2vf_bh_tasklet); struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_bar *pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; @@ -138,8 +139,7 @@ static void adf_pf2vf_bh_handler(void *data) static int adf_setup_pf2vf_bh(struct adf_accel_dev *accel_dev) { - tasklet_init(&accel_dev->vf.pf2vf_bh_tasklet, - (void *)adf_pf2vf_bh_handler, (unsigned long)accel_dev); + tasklet_setup(&accel_dev->vf.pf2vf_bh_tasklet, adf_pf2vf_bh_handler); mutex_init(&accel_dev->vf.vf2pf_lock); return 0; @@ -215,8 +215,7 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) { struct adf_etr_data *priv_data = accel_dev->transport; - tasklet_init(&priv_data->banks[0].resp_handler, adf_response_handler, - (unsigned long)priv_data->banks); + tasklet_setup(&priv_data->banks[0].resp_handler, adf_response_handler); return 0; } From patchwork Mon Aug 17 08:09:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15C7D13A4 for ; Mon, 17 Aug 2020 08:14:35 +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 E248B2078D for ; Mon, 17 Aug 2020 08:14:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cnc1RHTi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YsW5qw9N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E248B2078D 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=A1+zeOrz7ur3XHh/RA73H+WTmk1M4KQJTQMmU18j+gA=; b=Cnc1RHTi++RliC65xxDbnkA/nL XLomHDVZOnwqpmRvGbgcE79/bprGaxUzid5RaspC3nU2z9g4FNi90xAM2M38ox0tFCogpMgUD0O9V DIpqcDq/cTtaSowq7s9YwGBCxRorEN+TNBtG58LV3+sUzpboKoxdnmKI2NTRVEAsDTr5rcoLklvc2 G2lT0KOV3CWXQazHQmZJn2JSAa6/2K8NoWhuCqVX3o2+xbWtyfnK7tfrVjzArkPnrNugD2hnVOwwo GLCuNoho9Fp8TR0z6cWO7zm+s1E7JI46OwblZ59qxTNS4HqKyGYHdgXTVLfmJiFwlpd2Ud+MbS3JQ JfkvbDBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aHh-00058p-Fn; Mon, 17 Aug 2020 08:14:25 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEb-0003BI-PR; Mon, 17 Aug 2020 08:11:14 +0000 Received: by mail-pj1-x1041.google.com with SMTP id l60so7436914pjb.3; Mon, 17 Aug 2020 01:11:13 -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=70PFaXHmNSmd92XMUWhul5KjsiDucw6zRMXg1MiBgH8=; b=YsW5qw9NRQ980DmqR7I0AKAyBlH2mw3IDWiuDPiK5PcL9EeuX5xAwemDz4lY2v1H+P PHLtHkMDF/AgpV8+UThxQF2gm9LvzcooZzOrhwy7m7/cXDLWa7fAjMjJIT0aQTY1AsfO xzUZT6gI+uPaKAnyKPfueeZ6eMWqTqWJHtDTQOsluZCITK1RTA2F2ZvZ7wau4Ju0YVLS XBrkbMK4FSESTy616HPAaK1DxUqvvy/pNIMOqvuFftH9+V1h+EhuNNSdDVhY2vaG1Wxj Oikq55hNMBi3727bfh95NcVp5rIWsyWQ+wC8LWRXWIX9cPD/IESHUPUjsUGrC3isgP14 clhA== 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=70PFaXHmNSmd92XMUWhul5KjsiDucw6zRMXg1MiBgH8=; b=T7GVSAerFYOfaeLN95TQ5V2wb4Uex53m7uUP8+EOQGxn4WC4xW/c2+FwVeEvnFhiAA Hdj1QWGdcs9y9YL6Ep6nY8AUGGU4WXxnwjqOlfZhpPbQqnIGCDHPtSpinX18AIXlZJ69 VrBYVkdHHUx0srVUntcUJ3mGRleP4U3zv1z6s1rAYwrfUyj4vlwWtjh/Wcx0enz3cYGa RF18kklEYlumbOMmxAzO/aAwMXCoIsXsbFAZP+0DUUSsDYMP/yYRq1GlFXxsvwJ61pwj g8194gJUUbf59kMARV3KogLLZuLigE37B+GbM412rlz8zvi2v1lz0XDXz5D3IKwhupIA LnbA== X-Gm-Message-State: AOAM532xa1jMh91DFT7YdVfPP9qBHdhZifI61nx40BrvkOYXWYEok1DI BR9RaAqK3yqOaHyOYqB5XfA= X-Google-Smtp-Source: ABdhPJxkJc7DyhK1mDYdyU2581enLqosMCxTakWV3V2k6PuHjYp2kxVpf+h+fHSOmD19Aql6dm5KyA== X-Received: by 2002:a17:90a:24e6:: with SMTP id i93mr11415482pje.231.1597651871493; Mon, 17 Aug 2020 01:11:11 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:11 -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 Subject: [PATCH 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:37 +0530 Message-Id: <20200817080941.19227-16-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041113_879906_B3138132 X-CRM114-Status: GOOD ( 13.29 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1041 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/qce/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index cb6d61eb7302..0b171ef9e3b7 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -116,9 +116,9 @@ static int qce_handle_queue(struct qce_device *qce, return ret; } -static void qce_tasklet_req_done(unsigned long data) +static void qce_tasklet_req_done(struct tasklet_struct *t) { - struct qce_device *qce = (struct qce_device *)data; + struct qce_device *qce = from_tasklet(qce, t, done_tasklet); struct crypto_async_request *req; unsigned long flags; @@ -221,8 +221,7 @@ static int qce_crypto_probe(struct platform_device *pdev) goto err_clks; spin_lock_init(&qce->lock); - tasklet_init(&qce->done_tasklet, qce_tasklet_req_done, - (unsigned long)qce); + tasklet_setup(&qce->done_tasklet, qce_tasklet_req_done); crypto_init_queue(&qce->queue, QCE_QUEUE_LENGTH); qce->async_req_enqueue = qce_async_request_enqueue; From patchwork Mon Aug 17 08:09:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6421F13A4 for ; Mon, 17 Aug 2020 08:14:50 +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 3C3282078D for ; Mon, 17 Aug 2020 08:14:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IbNZJFC1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XBOxEYVL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C3282078D 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=TFgEh3H+wrbAGtBbXP/aphQj+tZeVeBtQjLz7bJUAjE=; b=IbNZJFC1Sz9m2pNT/T9Me2iU1C SuwEQdBd5dfvUOkCJywEhQELHNLvL4umPT/BBePiq9WERMnZoUbm3S1ue/r5+wWV/A3gfIcj+TSuE O1rMia6f0jBvsSnMDbk7zFq1h8GLXdZiT/zaZji5pNrDgespBUnJog5+4LAHyQBRxs0yrkiDv5zVJ 9y4O4VqsU0jIFUJkKUDauK8CEY+KmK0IsDIt5MiqtveVmWS4O/BFRktiNqO9jflDhghpfB1yrfCM1 fJgMc/Mt2zWljU5HjNWovxHO6nDG2EFis8JDGh/ob2Cvj+U9ncxumXW9OW8neCPQZlj/FsQBQGMZ5 4MAiVSOQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aHt-0005Gf-1t; Mon, 17 Aug 2020 08:14:37 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEg-0003DW-Ez; Mon, 17 Aug 2020 08:11:20 +0000 Received: by mail-pl1-x642.google.com with SMTP id y6so7128959plt.3; Mon, 17 Aug 2020 01:11:17 -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=0I0WPdb+Lnw0T9UwVRKshyQRyAmBHfkv+OIhMK0TwCo=; b=XBOxEYVLtO2d2M09e9vTXjaL+F4HowWz6DhEtXsFNUd951C+5m4MzRyoZxFJWYzrnO mwikjKG2qiC1NFIgVCjXOgYdEh4rIRn2IF1R+D0Y2MOrmlsJGUFTYGGu5biSm5l4w55/ 4O0k0A77BOI+DcVDGguCfMX+9fARyOmTI7IeL7Ecg5dpxptZdvGN6wbD5zMQJnpAe+Z9 BdUlPY0isvAhdgwTfc7p/ItKyKbU6aJNjROrPBeECqASpe15Nd3BED/akhjyaRaaL9V6 wBjZ4MrFjHybqqJljXD89sOEqWkbOUGk09/Ov6gtyBSPb5MJaObTvCMDihr0WuYVhDQW 1r5w== 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=0I0WPdb+Lnw0T9UwVRKshyQRyAmBHfkv+OIhMK0TwCo=; b=beFEdg/Bf628H5pAQzLRGRqj8Meo0TVfSAtDOoEtO8585qIR7iVNxh73OWO+4q9d2+ gcF2wzx3xSD4oGCE5ujH1enML0foeJBfTZYAm4ejMrSuiuQhRD2G6H5Esc+EoCWnb5nZ Ej5x2JXKstDWk5SG6yS47yAjdbWt5wkTF/M5awDzxlHj8m9Y7xEgi+3bF/HUf9dO+8H3 UjfcEBIPLJzQtCm/3IggTMN+G4GlR9En6BYIvhA5m4qVRVndeDhHokDfXb2eBb/ExqCQ jUuEzJ4CyzKoSX8Sw9bbUY0G3nEjn8fCSuMuECjwJCaLUGU0PHDWb1EdhF26p4oKaryU e34Q== X-Gm-Message-State: AOAM532/oA9HMvM3hp/wmiX5mjhUA5xIWgUa+0Yct5aOHJtipqUGMYsN J83Hin0geYkOvrV3w3lo+44= X-Google-Smtp-Source: ABdhPJz2yRlSGkjkyLzNCiZu5WWMgo5Ib2xo7ul7gKuWuKj/0odSFXT4lG38fkzXMXkYK2N9DxmmjA== X-Received: by 2002:a17:902:bb90:: with SMTP id m16mr4634935pls.144.1597651875281; Mon, 17 Aug 2020 01:11:15 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:14 -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 Subject: [PATCH 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:38 +0530 Message-Id: <20200817080941.19227-17-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041118_644204_6EA086C1 X-CRM114-Status: GOOD ( 14.53 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index f385587f99af..23a695f31d1d 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -200,9 +200,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *T) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -230,9 +230,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -388,10 +388,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; From patchwork Mon Aug 17 08:09:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9AE17109B for ; Mon, 17 Aug 2020 08:15:15 +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 73641207FF for ; Mon, 17 Aug 2020 08:15:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U7PenHlW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r3GLZCJW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73641207FF 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=UMeRMgSg4pZ+94/sVVLBqixp7AzXdNnKq86ebccIBO8=; b=U7PenHlWAt/jqpvTSHJcEBLMts 4/26lL1gcu+zy/0Fj1k4Uwg1VAmJ1sx3OgMT3qbxP+nffQaOQPp1RN29YTBQRxm/hJhgXDBz3Ug7D /yWmE5EhgVGnugvcDJ0X8pc+x5wdxElVqdgAjrVaaHRN2Y1FySqLKnMyGFJqK4ZcPx/A0EUOxXIt3 RzI52ikLvTpoQZoiQNdtPI3Pfhn8i+rSmD0yqKaWt04i9sb6i3lwhjOde6U9yH3FYYUCdnJfltU6w jjWVLByZIUu9VIEi36GCXGh1KcL0Y5D8hmXF3DCoI63vG8W+LAliCw8wKgWh3FLW0G7YQsLh3LiaP I8tFPy5w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aIQ-0005Vf-0q; Mon, 17 Aug 2020 08:15:10 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEk-0003Fk-40; Mon, 17 Aug 2020 08:11:23 +0000 Received: by mail-pl1-x642.google.com with SMTP id bh1so7110377plb.12; Mon, 17 Aug 2020 01:11:20 -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=kbxG8PbuUgRYW0FNJ7wX3wLmqWA1Y2ml3xxUPZ0o0WPkT6gejWoxYJs0LiEYuV+7V+ yuzmBciZfu9H8l3XUgb/RmbsLT7sl3s/UNDGtpzC7ggl3TOR6DzR6XcWc4VNbyBk2P8k YLruf/UxDofjLNHvwEphcSgdPhjKBfPzCoIshnfhDdz86KzNxvJbdkQdrVEsdI/WFHu/ e3nBaklFYCiJGtKl+MBV5N6HFw9YDUvURQW/p0n8z3yP9HvUwV4xEWyS/sPZsE5LPiI4 wqb+sIHAWNQ9RfAmLWHgDpWTf9qlerVmzCXprBDDTGskexZS/qq+EqMTjrvKkw6zFPcN snug== X-Gm-Message-State: AOAM530nSgbAUBYK/5/HrSQi//YcaTvjeX6eLEy4qGLZ2KFWDbQjU4iH hizL0cbeiOdrqrj19MDrSB4= X-Google-Smtp-Source: ABdhPJxTMIDoLuD0wfD5gOa8F8cIxaCsYKHgtCExwrUW8xhgxL6VK0Q3dQ22P3FK+4kYogWSGoyK5A== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041122_574055_FE17B352 X-CRM114-Status: GOOD ( 14.94 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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); From patchwork Mon Aug 17 08:09:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716813 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0809109B for ; Mon, 17 Aug 2020 08:15:18 +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 7A0F720738 for ; Mon, 17 Aug 2020 08:15:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cHHR3AqX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C8Stt0Ol" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A0F720738 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=NUIIcRDL2a/okzmupK5e0iOAtalOrzXg2CmNzuYEP6g=; b=cHHR3AqX9FjMG8CPX27aE1C4MJ mxYThMswAr632eqlxDtqAoLY6gh45rPrSaUGaZEXpMlL+wuTUR+xMb+ixRqTzH1Co5OD5tgnzRUrB vrnmkJupNV+Si2qjfr3xMupEubw3pfADxyk+WWC4NPwq8RxIqNuLxjP/IB/cFbsOjzhkWEWv6aYam A3ECqyuPKSVSRgX/JyQ1w2oku6se1+ecdOEVfHvlmgPayyhN7s8r9oH1TYGkZveqxwpMm2j+3sA4n TBzTYeFoGGkrYoeH+onuUoLs/wjGnesbyTyMOuJN398TLHgjpXvNaB/qLA60FYpcsabQ7QhhoDib2 5MxrVjbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aIS-0005Xa-Fs; Mon, 17 Aug 2020 08:15:12 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEn-0003HG-1g; Mon, 17 Aug 2020 08:11:26 +0000 Received: by mail-pg1-x543.google.com with SMTP id p37so7754187pgl.3; Mon, 17 Aug 2020 01:11:24 -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=igR/75gxadmtMWi9MLkMfLLU0IUv0P9kjxxPayYPRNc=; b=C8Stt0OlJzlkc6BUmSvLpowDIaQDIjMoBeWtXArari9zGfvxvs69bK6rIOYcHidnxL FNqKY9k4Dc2qknAn0rwYORoNYLIevPVUaTyGpky1jzUzxcewRYgV1iP6yDu8EYr3cKXg cE6Lz3EkRB1oKuR6L5bXfe/HEHI/K9Oc85allpXmSSU/xQUpE66GsanpaDM4zCTATb8c tjEGO834txneUa7AMWjcT4ht3zwMUYmG5tFFeucrRg0z5GNq23ZgiCy4YlAyr1Lycho9 QbeBA1e6Q/NgXVSqgRk7KGdNEuBkvp5z5rALg635boIFg1PgshxFBzdsNDr4SVkVVrYA 6UCA== 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=igR/75gxadmtMWi9MLkMfLLU0IUv0P9kjxxPayYPRNc=; b=F+Mn5NweausZZCWwHXBDZj7cRFPFcb8M6wgYU63TNfprJt1r1zGXZYzD9aElt44Aw0 cs4LRwd6/KBNeLlxX+rUtTYcbCVg3CVKF1tIRzepYcgAFahu7WGZNUOtYoOnlq33/U3x FmmSbeBkXAolxwMAGcKq76tl1rXBho5AWOFciXaQLFUuvhLqmLd8A8RLu0bcvRtiEcx3 IHKxHPLuGfkhM3VgcKIOw/Oaeb938ju878NXUxJdoBUZg+HQiOTtVTGLA8TFKL5ic3Tw t0gDVEnEW8dH/iJC4pVeT1UzblP1w2bMTNv0kTOPKczfSll1rYMD6d+qFl81otOU2yHQ heXA== X-Gm-Message-State: AOAM530c+xh5/n2S1t4noJEY3FNP44qgyJWsWrl0ITftPksp0rvXG7lg lHOF4IDZM88D3TdpaXSRyYI= X-Google-Smtp-Source: ABdhPJxyvl5y2FHfcn9LZz/PK7f9uH0f1QB5TX5zO4RPaiypNoYfiqUAdNULSj/MXIrliafQrT7w0g== X-Received: by 2002:aa7:9e45:: with SMTP id z5mr10816004pfq.166.1597651882821; Mon, 17 Aug 2020 01:11:22 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:22 -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 Subject: [PATCH 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:40 +0530 Message-Id: <20200817080941.19227-19-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041125_207762_1FD9B273 X-CRM114-Status: GOOD ( 15.98 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:543 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Perier , keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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 Reported-by: kernel test robot --- drivers/crypto/talitos.c | 42 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 7c547352a862..6d729af1f8e4 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -402,10 +402,11 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch) * process completed requests for channels that have done status */ #define DEF_TALITOS1_DONE(name, ch_done_mask) \ -static void talitos1_done_##name(unsigned long data) \ +static void talitos1_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[0]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 0x10000000) \ @@ -428,11 +429,12 @@ static void talitos1_done_##name(unsigned long data) \ DEF_TALITOS1_DONE(4ch, TALITOS1_ISR_4CHDONE) DEF_TALITOS1_DONE(ch0, TALITOS1_ISR_CH_0_DONE) -#define DEF_TALITOS2_DONE(name, ch_done_mask) \ -static void talitos2_done_##name(unsigned long data) \ +#define DEF_TALITOS2_DONE(name, ch_done_mask, tasklet_idx) \ +static void talitos2_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[tasklet_idx]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 1) \ @@ -452,10 +454,10 @@ static void talitos2_done_##name(unsigned long data) \ spin_unlock_irqrestore(&priv->reg_lock, flags); \ } -DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE) -DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE) -DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE) -DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE) +DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE, 0) +DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE), 0 +DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE, 0) +DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE, 1) /* * locate current (offending) descriptor @@ -3385,23 +3387,17 @@ static int talitos_probe(struct platform_device *ofdev) if (has_ftr_sec1(priv)) { if (priv->num_channels == 1) - tasklet_init(&priv->done_task[0], talitos1_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_ch0); else - tasklet_init(&priv->done_task[0], talitos1_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_4ch); } else { if (priv->irq[1]) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0_2, - (unsigned long)dev); - tasklet_init(&priv->done_task[1], talitos2_done_ch1_3, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0_2); + tasklet_setup(&priv->done_task[1], talitos2_done_ch1_3); } else if (priv->num_channels == 1) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0); } else { - tasklet_init(&priv->done_task[0], talitos2_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_4ch); } } From patchwork Mon Aug 17 08:09:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11716815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 24534618 for ; Mon, 17 Aug 2020 08:15:23 +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 EEE92207FB for ; Mon, 17 Aug 2020 08:15:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CQLVmW+P"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t2MQSO33" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEE92207FB 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=hFVrBJWkSZuVZN2rJyGFDiOyJ7/Tbw5nMHKL0PEB/G4=; b=CQLVmW+PR+z9Nks6MutDx/Dkpu lLV4iIXKmT3pEBmKSeyndijO+S5b5TZxNMvdWK/SQ+gI/bWQwfo7hpnM8iWQMm3XofZBAsEuCNTTd SZVGVryLntnoUokfLKFpNYTMoRcrlyh84MX/0NTipxxSPA5EYpS5Ad7f6JulHQqZ4130sSnrqFvvU 7cfBVBbN40rn1jr4EPcEZuRcVFIfqqLM7iZjhPDZ1cOrAWp3Y71EkS3Vomox5+uy9npo0b5XlBCIH 3QayvxxbcDxyNjuZ94aJPHTgV2em4+3GX4OaJN0+H/EAS5ucZ/JHNHVzDh8X0z1uRSpbiSIUgm+v6 63urcr7w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aIW-0005at-HF; Mon, 17 Aug 2020 08:15:16 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7aEq-0003JH-Dw; Mon, 17 Aug 2020 08:11:29 +0000 Received: by mail-pl1-x641.google.com with SMTP id k13so7104369plk.13; Mon, 17 Aug 2020 01:11:28 -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=2jlucAzcv0W9eM59+GUn2Gh+5IEHgp5g50ux6o6FWwQ=; b=t2MQSO33f1vjbVEQeuo3aU++uKHVnUyyrTtB3geB2I08q7ydG1kWWexSrXGDcLWNdv 1DlHUBJ+biSN3baHJHgEWZwCeTElOGpgVYrWDI0Kt/zPqL3vkhdg3i/ZiLZdHXIFaczn +F2ygDuPckoakT4oIKq67rcj8g59qwcFwR24DHvn38NgRh0fQjl8TUE4mmLnwGxszJh2 Np0X12q/PXnv5FYcMAJTQujiLVQdM6TsVxViUJGMM2vO8opwWf6WON7JoHHS6DMOZhKN JZvHL/ffslNv006PR5pAvZ6RuLuD1L5kS+I8cwnPyQlpfEWmuAQU/MTin6aK8Hy4YNza nfjg== 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=2jlucAzcv0W9eM59+GUn2Gh+5IEHgp5g50ux6o6FWwQ=; b=TzWjFp3a2ROwUqWGBnUMvwt7nMku8/shxBbdoGsb/wZCKlsfRAed+eBGSNfVGgFbqv WydPW4+CR1F9jR5UrW/FRIlcimEov6N3pi+lb4jeK0W6Iy5RtCteiHCDAKHQg/fZQnge gVLzJZVWFFZoQw/nBwJ6KJjKsVjCWqjzFv624C22vIjTiidodPkfKR1fgMkc9cNjYqVB +CWfKNSk/VkXkcfthWDZEjFn/axD3TlQqVrtMxk3F9B6ovMyBipRfHLXS0CcmgZTAzsx Gc5fwLnGUrk+BxZ3GpvnZU0f8Qdt6V6Wr+K9pFIdSbGy8hMVEJs2BRMxgqsZCwLgfg5l GZ8g== X-Gm-Message-State: AOAM531MsMPdca5n3rrp8RxcCcVFl6LB9MHyJ6UVsja59n8L2FQzcgmI WLXgHtGNPpLIpP3N71KgKR0= X-Google-Smtp-Source: ABdhPJyjoI0JkeOWbU0bb5kX5eCoqltfYh3yZoAKu+OpTQJh7RAmgYhlWJE4RsqnMrAcaumgImJMNg== X-Received: by 2002:a17:90a:5b:: with SMTP id 27mr10822949pjb.188.1597651886671; Mon, 17 Aug 2020 01:11:26 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id 77sm18499751pfx.85.2020.08.17.01.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:11:26 -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 Subject: [PATCH 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:39:41 +0530 Message-Id: <20200817080941.19227-20-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_041128_627907_7E5291E4 X-CRM114-Status: GOOD ( 14.72 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [49.207.202.98 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [allen.lkml[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keescook@chromium.org, Allen Pais , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, inux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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: Allen Pais --- drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c index 228fe8e47e0e..515049cca9e3 100644 --- a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c @@ -17,11 +17,12 @@ #define DRV_NAME "octeontx-cptvf" #define DRV_VERSION "1.0" -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct otx_cptvf_wqe_info *cwqe_info = - (struct otx_cptvf_wqe_info *) data; - + struct otx_cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct otx_cptvf_wqe_info *cwqe_info = container_of(cwqe, + typeof(*cwqe_info), + vq_wqe[0]); otx_cpt_post_process(&cwqe_info->vq_wqe[0]); } @@ -41,8 +42,7 @@ static int init_worker_threads(struct otx_cptvf *cptvf) } for (i = 0; i < cptvf->num_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].cptvf = cptvf; } cptvf->wqe_info = cwqe_info;