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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EE12C00144 for ; Fri, 29 Jul 2022 10:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbiG2KgJ (ORCPT ); Fri, 29 Jul 2022 06:36:09 -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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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