Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp172925imn; Fri, 29 Jul 2022 03:37:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR5glw5ue8tIbP+agaX4UNRiiySYv0Y7QLBOv2xLf8GF/Dz2bYhZXU+ckL3Dy+HhclX8ilWW X-Received: by 2002:a17:90b:a46:b0:1f2:f7fb:3ed7 with SMTP id gw6-20020a17090b0a4600b001f2f7fb3ed7mr4195761pjb.244.1659091021331; Fri, 29 Jul 2022 03:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659091021; cv=none; d=google.com; s=arc-20160816; b=WYPvlF5Ih/YAxFaXBZ3hrz1l2vh9bhJlz94eyfcHsBNTrNnOo/tXU11VQ+twtGJzJY CNGChi7WWkzpO4jRdjj+DdtHFoTI5dDnVgWA7CFbjhsxrjF7Reyu59oOUtAVhwRH05rL 5YylH4RaBUCX5nzifx4rBjQL1ImbFKmE+LD1JyDIPpZN21WrUCesca3+c2F/x+fB5GHc h6b1F6uQJ4zz4pFNJSaDPIhRbCyBFIkcCpKW8lFGij2a5RWi8yERx2wCXLYZppNSkKNT MX4HqfumRHXENiy0z0316RmjurReQokq/S92nSaoiZBc9XQtMNgxWvF/RiNTNYL54CGm 6IdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=oJnf5j+s5WTsyAOHRv5VIXUw0J/4ynfAUwRsMRj02Y4=; b=CHii1qdMbvd1eC1sHmnCTUnA1Xm+PzhyBsfWuE46t5vh/lbGANSS5GoNSS/ZsjVhD6 x5On/+IWWhZgvTrAd2fiT3RENQz0pGvR+rSRh+5jBGem/lUJ7u36h7KFEVUritU1XeVl kl3Dmz0et1ZyUQDcSiFGhXUOdiWvfaN0TBEU9QR0nnI+Vsj0AZW9BbxOpFRU8lOGB8Ya LbFJWY6iJ3RsAeEHIOf6+5mtfrAg3OD2qxbDHfsIJx1na/DG9mvmUfTVOYeDIlwwIehJ Wrw130lAgXeKIOemz/Zt/LP+GVJOWu6RPSY44aSI1uWriMor/JaznJojtGprePoTVjOl BurA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a630d14000000b004114427e980si2826363pgl.285.2022.07.29.03.36.46; Fri, 29 Jul 2022 03:37:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbiG2KgH (ORCPT + 99 others); Fri, 29 Jul 2022 06:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbiG2KgH (ORCPT ); Fri, 29 Jul 2022 06:36:07 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18867DF5F; Fri, 29 Jul 2022 03:36:06 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oHNLJ-005ocA-AS; Fri, 29 Jul 2022 20:35:42 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 29 Jul 2022 18:35:41 +0800 Date: Fri, 29 Jul 2022 18:35:41 +0800 From: Herbert Xu To: Christophe JAILLET Cc: Gilad Ben-Yossef , "David S. Miller" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christoph Hellwig , linux-crypto@vger.kernel.org Subject: Re: [PATCH v2] crypto: ccree - Remove a useless dma_supported() call Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jul 20, 2022 at 03:28:44PM +0200, Christophe JAILLET wrote: > There is no point in calling dma_supported() before calling > dma_set_coherent_mask(). This function already calls dma_supported() and > returns an error (-EIO) if it fails. > > So remove the superfluous dma_supported() call. > > Moreover, setting a larger DMA mask will never fail when setting a smaller > one will succeed, so the whole "while" loop can be removed as well. (see > [1]) > > While at it, fix the name of the function reported in a dev_err(). > > [1]: https://lore.kernel.org/all/YteQ6Vx2C03UtCkG@infradead.org/ > > Suggested-by: Christoph Hellwig > Signed-off-by: Christophe JAILLET > --- > drivers/crypto/ccree/cc_driver.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt