Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1168124pxf; Fri, 26 Mar 2021 02:31:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrcEocZ6JZ+wnla2f8TsKQIvAw80f9acMrAwiBO7udSQCyesXJKWGWq4oPyJs1CyYY0sUw X-Received: by 2002:a05:6402:26ce:: with SMTP id x14mr13632199edd.359.1616751072728; Fri, 26 Mar 2021 02:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616751072; cv=none; d=google.com; s=arc-20160816; b=URdfTAxTvC/a0jrJ5G5mMX1G7z2kCaj9pkujjEYPZigC6sd2U1JhoUzuiiH6YSp1mh CUa5nJkA6b66/0vyMIdiQ2XNZcP5+LrYZiGCBldTu+Lz9UtlgNLCF5uIBAPbo8HEuPR4 vi2dCCkOIhWfG8d+CHAnZN00zDYJoiey2L3b85jUGxP/mlOeS6Qz0QvDwOQ1omCTDFjU hpPG+6n54qlp0w+IY2ntBzF6mM3AEg26guHoCs294FzXOHJdZP8NFKRloxkRopWJpKXJ W5e0gg6mHzhJxiRgVayeqPoepS0Lmgjd5XiI5UVzWLoFkfesBqWgT/js5lN6W8WhVxKP tMuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FM/FoxFOAdn04590QyOhXIdRJjYcW6KpFEcAN9kGRjg=; b=PiSqxS8HF9QsxUVQE0fnOPH7EerJqfeul6jQ0b602wS2B0LJlsi/ZkipFqBMTLhkF8 XcKVMEQtnf2gJ8ywxCYjGQUzKeDS7Nc6kDUY5TeyzE2Azv6xZsFPjajVOAS+cnuHW0MP hIjeXyjhrQCyBCEK+zbnLFuRpY2/ON7VGIEBLgDaBBDdGm+pLgjiEbuQU5d29tdAkK65 xEOsPLOlBujrdGOuc7w9pYjxVRzS1TTRHemx3iLiLTGApCt4kAvlnmnVArkAux+DtMFT PW4/buU7PiZ9bU72gtJHVFFdsJDFT7OszGLg8CqW0IVyrCNjtp7k9EWg7xpzd+Z/Eq5e LurQ== 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 a26si6266719edx.539.2021.03.26.02.30.48; Fri, 26 Mar 2021 02:31:12 -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 S229871AbhCZJaQ (ORCPT + 99 others); Fri, 26 Mar 2021 05:30:16 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:35340 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbhCZJ3m (ORCPT ); Fri, 26 Mar 2021 05:29:42 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lPimY-0003Ro-So; Fri, 26 Mar 2021 20:29:32 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 26 Mar 2021 20:29:30 +1100 Date: Fri, 26 Mar 2021 20:29:30 +1100 From: Herbert Xu To: chenxiang Cc: clabbe.montjoie@gmail.com, clabbe@baylibre.com, gcherian@marvell.com, davem@davemloft.net, linux-crypto@vger.kernel.org, linuxarm@openeuler.org Subject: Re: [PATCH v2 0/4] Fix the parameter of dma_map_sg() Message-ID: <20210326092930.GC12658@gondor.apana.org.au> References: <1615859726-57062-1-git-send-email-chenxiang66@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1615859726-57062-1-git-send-email-chenxiang66@hisilicon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Mar 16, 2021 at 09:55:22AM +0800, chenxiang wrote: > From: Xiang Chen > > According to Documentation/core-api/dma-api-howto.rst, the parameters > of dma_unmap_sg() must be the same as those which are passed in to the > scatter/gather mapping API. > But for some drivers under crypto, the parameter of dma_unmap_sg() > is number of elements after mapping. So fix them. > > Part of the document is as follows: > > To unmap a scatterlist, just call:: > > dma_unmap_sg(dev, sglist, nents, direction); > > Again, make sure DMA activity has already finished. > > .. note:: > > The 'nents' argument to the dma_unmap_sg call must be > the _same_ one you passed into the dma_map_sg call, > it should _NOT_ be the 'count' value _returned_ from the > dma_map_sg call. > > Change Log: > v1 -> v2: Remove changing the count passed to create_sg_component > in driver cavium; > > Xiang Chen (4): > crypto: amlogic - Fix the parameter of dma_unmap_sg() > crypto: cavium - Fix the parameter of dma_unmap_sg() > crypto: ux500 - Fix the parameter of dma_unmap_sg() > crypto: allwinner - Fix the parameter of dma_unmap_sg() > > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 9 ++++++--- > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 3 ++- > drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 9 ++++++--- > drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 3 ++- > drivers/crypto/amlogic/amlogic-gxl-cipher.c | 6 +++--- > drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 9 +++++---- > drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- > drivers/crypto/ux500/hash/hash_core.c | 2 +- > 8 files changed, 27 insertions(+), 18 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt