Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5133406imw; Tue, 19 Jul 2022 22:29:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ucTy2Y0dhmYTxF+0BfzMdFNkDKTWe2XxUAVmWpnGg8p30FJCuOOxa78qW5HJoKITLQAI8c X-Received: by 2002:a05:6402:cba:b0:43a:6b17:f6b5 with SMTP id cn26-20020a0564020cba00b0043a6b17f6b5mr49422374edb.330.1658294946103; Tue, 19 Jul 2022 22:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658294946; cv=none; d=google.com; s=arc-20160816; b=P0sp6t2e/+G+SIjfAhIkK6NdFdPaXGo3UOjnF+jnvcVO1iUF6DLesRwOH4+BO0Xwbd y/6sW8dA+k/VgrXDJonEfN9m5bpsX0wuM6UDJ03Y+K+cy/bPZr5/sSYOSEFcdMqWjy4h bXtFJgWSXzfSFrIXR/DkwKWnrwIlri1S+BiZGYv+xVqgp/UjVQdG3HL4z+CfEDadzQr3 0p0oKOdIaxPTkpKd/cXCCa91icUyBbDOfKeIqCF1y7+gvDQL5xkxxR2yh7jAmvGqSpxt X3V+LJXNK9/tp40dk9CiWAU2Oc1DtN08v5ZN7+PLv00/0343UZkHiOuh/qOzOjv7LvQF fpMQ== 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:dkim-signature; bh=boLfVd9fuge8AsSo8Lqc9AK2r41spPeym0X+T4qNK8s=; b=JRwgWtQpYYrl3WoxDzDxeCSTtPwU1OnaMTb8JtlZTdnxjQwxMjOLG1MCEI+o22oBHh 88jmNS49WYK7bOsE6A27Pja+1bh7lhYm28EGSJgKMGNmu3th1Y+l0b5xFhWaE0hAN2/u UeYJidbtbMQS/r32e7AEzlWcdvS7OFDmnDEfiVr9p4Urq0e6HO0cVpCzec/qYECrSwSi IMeYO3V4PAVoVMooU16ziAxqtOK5teG0IXAXl2ei2qo/JrvBEIZJvkXkHIU/Vlc2lQu4 y7AeKJL5e1nbMGDXK8Olq/19TCUmT1XwNVoOKgW2j5tA8wF7nVzj88+nardKqhnxm2gm mCZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OFEfSVym; 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 hp41-20020a1709073e2900b00722e7e8b484si23965102ejc.625.2022.07.19.22.28.29; Tue, 19 Jul 2022 22:29:06 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OFEfSVym; 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 S230002AbiGTFVz (ORCPT + 99 others); Wed, 20 Jul 2022 01:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiGTFVz (ORCPT ); Wed, 20 Jul 2022 01:21:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9349349B41; Tue, 19 Jul 2022 22:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=boLfVd9fuge8AsSo8Lqc9AK2r41spPeym0X+T4qNK8s=; b=OFEfSVymQy+fOVmh65guw0pXoC 1eTebu4gM8/j24oy06KL6H8IgxRUBjauXyA3dsueRnULP35ZR247w20DMM19Wzor8n6H0GDtKaVUi BtnvjBQs/lq/lGwtFjIBmr1I/OKIbuzzMiSHLrKbNS0VnPV6aq/X3n8+B3wGPRMDME3KEbz2RCroV lHAU8uoHi+BG7o2rrhd+XsI5453DOyi4upJUj5wvemnXj5hfd1t5Q66mB3FDlv3zpbOj5LlAqVtQA pELv3+fQe6+VXFsFobeL6/C8/JBsDf8XrkOfCrZ04uZd/LXEnokYLgs2kgfXTo/DUf3iHioGd1bpU 1YOUnQcg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oE29Z-000UlQ-Ro; Wed, 20 Jul 2022 05:21:45 +0000 Date: Tue, 19 Jul 2022 22:21:45 -0700 From: Christoph Hellwig To: Christophe JAILLET Cc: Gilad Ben-Yossef , Herbert Xu , "David S. Miller" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH] 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-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE 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 Tue, Jul 19, 2022 at 10:27:50PM +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. > > While at it, fix the name of the function reported in a dev_err(). > > Signed-off-by: Christophe JAILLET > --- > I guess that the whole while loop could be removed, but I don't remind the > thread with the corresponding explanation, so leave it as-is :( The loop should go away. Setting a larger DMA mask will never fail when setting a smaller one will succeed. Also after this patch dma_supported can be marked static (Yay!)