From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 117A9C432C0 for ; Sat, 23 Nov 2019 13:52:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D98EB2071B for ; Sat, 23 Nov 2019 13:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbfKWNwp (ORCPT ); Sat, 23 Nov 2019 08:52:45 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:49426 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbfKWNwp (ORCPT ); Sat, 23 Nov 2019 08:52:45 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1iYVq5-0003gi-7I; Sat, 23 Nov 2019 21:52:41 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1iYVq0-00046X-Kk; Sat, 23 Nov 2019 21:52:36 +0800 Date: Sat, 23 Nov 2019 21:52:36 +0800 From: Herbert Xu To: Chuhong Yuan Cc: Jamie Iles , "David S . Miller" , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] crypto: picoxcell: adjust the position of tasklet_init and fix missed tasklet_kill Message-ID: <20191123135236.johugbmuwpecnhsf@gondor.apana.org.au> References: <20191123134817.30953-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191123134817.30953-1-hslester96@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Nov 23, 2019 at 09:48:17PM +0800, Chuhong Yuan wrote: > Since tasklet is needed to be initialized before registering IRQ > handler, adjust the position of tasklet_init to fix the wrong order. > > Besides, to fix the missed tasklet_kill, this patch adds a helper > function and uses devm_add_action_or_reset to kill the tasklet > automatically. > > Fixes: ce92136843cb ("crypto: picoxcell - add support for the picoxcell crypto engines") > Signed-off-by: Chuhong Yuan > --- > Changes in v3: > - Use devm_add_action_or_reset to simplify the patch. > > drivers/crypto/picoxcell_crypto.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) Thanks for the patch. It looks much nicer. > @@ -1655,6 +1660,14 @@ static int spacc_probe(struct platform_device *pdev) > return -ENXIO; > } > > + tasklet_init(&engine->complete, spacc_spacc_complete, > + (unsigned long)engine); > + > + ret = devm_add_action_or_reset(&pdev->dev, spacc_tasklet_kill, > + &engine->complete); Minor nit. You only need devm_add_action as calling tasklet_kill at this point should be a no-op. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38D95C432C0 for ; Sat, 23 Nov 2019 13:52:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0BFE920658 for ; Sat, 23 Nov 2019 13:52:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="t6jjaflF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BFE920658 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MM+IwTvRgPeehjtYPVkwI4+GRGPe4G4VV80voz+/hD8=; b=t6jjaflFsKbPYT l3ObeUjoH4sTqYy8u883Y64TJltX6GbPgFHKx0JngOQdnrel9oBxPp62AGURbQzyE8q7+FXfqEKNe oouxN4biTdj0hvWIRvm5hDHMb5WAG1zTkfT0rHQZK9SaMJMEBWw2SkID86eyRzaDV9/vzD3j8xEaJ MiGV4KrywsL/IYMXPtohdmQ65lvCLrWIV1AKZgVXyKwBZ6qex+e74dXujSs5UeqUMRPKwRik/Lkpy /2GGiLGUdjZNNRiMOB2BZb3kgxSlYfXYvs4uw+RRC1i6tbbwSq3CJwixIa9hV8c/NNw9mXrXiOAts jNX2Id9vhBZ68cXwW08Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iYVqE-0001Vb-SD; Sat, 23 Nov 2019 13:52:50 +0000 Received: from helcar.hmeau.com ([216.24.177.18] helo=deadmen.hmeau.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iYVqB-0001Uf-K6 for linux-arm-kernel@lists.infradead.org; Sat, 23 Nov 2019 13:52:49 +0000 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1iYVq5-0003gi-7I; Sat, 23 Nov 2019 21:52:41 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1iYVq0-00046X-Kk; Sat, 23 Nov 2019 21:52:36 +0800 Date: Sat, 23 Nov 2019 21:52:36 +0800 From: Herbert Xu To: Chuhong Yuan Subject: Re: [PATCH v3] crypto: picoxcell: adjust the position of tasklet_init and fix missed tasklet_kill Message-ID: <20191123135236.johugbmuwpecnhsf@gondor.apana.org.au> References: <20191123134817.30953-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191123134817.30953-1-hslester96@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191123_055247_804705_F710788B X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jamie Iles , linux-kernel@vger.kernel.org, "David S . Miller" , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 23, 2019 at 09:48:17PM +0800, Chuhong Yuan wrote: > Since tasklet is needed to be initialized before registering IRQ > handler, adjust the position of tasklet_init to fix the wrong order. > > Besides, to fix the missed tasklet_kill, this patch adds a helper > function and uses devm_add_action_or_reset to kill the tasklet > automatically. > > Fixes: ce92136843cb ("crypto: picoxcell - add support for the picoxcell crypto engines") > Signed-off-by: Chuhong Yuan > --- > Changes in v3: > - Use devm_add_action_or_reset to simplify the patch. > > drivers/crypto/picoxcell_crypto.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) Thanks for the patch. It looks much nicer. > @@ -1655,6 +1660,14 @@ static int spacc_probe(struct platform_device *pdev) > return -ENXIO; > } > > + tasklet_init(&engine->complete, spacc_spacc_complete, > + (unsigned long)engine); > + > + ret = devm_add_action_or_reset(&pdev->dev, spacc_tasklet_kill, > + &engine->complete); Minor nit. You only need devm_add_action as calling tasklet_kill at this point should be a no-op. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel