Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1646726pxb; Fri, 22 Oct 2021 05:12:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzivHc28dbYvlhl8F5UfYKrxIQh8SGdIZVreqw2mI2sfRE0+ySAU0yS1d/qBmkUTbbyUAIL X-Received: by 2002:a17:907:2dac:: with SMTP id gt44mr15448660ejc.265.1634904740054; Fri, 22 Oct 2021 05:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634904740; cv=none; d=google.com; s=arc-20160816; b=dj40pX3QLnAiuNnUuvCuli1ZTW/Z90eP2/Zxt7UH5mKGLXIfikLmxYQWROL695m6+p lmOGQO8tssV1euTWBNTd6qByml0HZA1l4XFvl32dQ/ddlmgZ0Dqxj/hIySVveZAoggU+ Hi/8phkBi1kLsXjOfL+mkf6glyeKTlXeJ46A664KJnZiaOg/mzDRzMbGal1n8Mjn6r4d 1VBc1CKj2bU6Ur2ayjbS5UQPiLMUDdWLuSZHnM5rzjEdxIVM/Osl6GOZZNSMRU2owFyC tgM86NCcyXhr3MdX1Gukt88HPvUwRzHIUUNfNSbwjMz+krp5n3/cqrjHFtp4s7TyE385 Rblw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:organization:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=esPkh1vyXuxoCcSNm1jMbJYTrDMMRg41e06oixIcVfs=; b=rONMQ1vtMZwbbRB2UE8Jf+DfwKbOxTatT+781SP+O80x5Kq3BEUL/drpGNCRUkUqpH B/OWCZ/e5bBkQzlkYNM2KGC120YL3X7aVVz5UiJNACc/e5mqINvW/lLDZpia6yMfTL3Y 7x6rf5vJieqU5DeM3SAcmytjkFiQd7PfHhUZ6NYCzsR+/6mYmibp6hLVXGteGaNdd7UL EDaWqg2J0Pzc3xpgiPkuEGVFS6q8q97yjc2mmoHW+2mw4Wa4ZLFcc6cIY0yDhfTGHgvX iDiv4U+VeyyyKqYhpOsclYFDwuATKnxHiQyhbPJirYhWshu3oiE4QPt00KaXMKV4UEnP JSww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji14si14682193ejc.732.2021.10.22.05.11.46; Fri, 22 Oct 2021 05:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230105AbhJVMNk (ORCPT + 99 others); Fri, 22 Oct 2021 08:13:40 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:56238 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbhJVMNk (ORCPT ); Fri, 22 Oct 2021 08:13:40 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mdtO7-0001zR-UP; Fri, 22 Oct 2021 20:11:08 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mdtO2-0007Lr-IS; Fri, 22 Oct 2021 20:11:02 +0800 Date: Fri, 22 Oct 2021 20:11:02 +0800 From: Herbert Xu To: Cai Huoqing Cc: hch@infradead.org, caihuoqing@baidu.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] crypto: octeontx2 - Use dma_alloc_noncoherent() instead of kzalloc/dma_map_single() Message-ID: <20211022121102.GA28240@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211012032229.2307-1-caihuoqing@baidu.com> X-Newsgroups: apana.lists.os.linux.cryptoapi,apana.lists.os.linux.kernel Organization: Core User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Cai Huoqing wrote: > > @@ -1489,11 +1482,9 @@ int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf) > > cptpf->eng_caps[etype].u = be64_to_cpup(rptr); > } > - dma_unmap_single(&pdev->dev, rptr_baddr, len, DMA_BIDIRECTIONAL); > + dma_free_noncoherent(&pdev->dev, len, (void *)result, rptr_baddr, DMA_BIDIRECTIONAL); Why the cast? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt