Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp57709pxb; Fri, 19 Feb 2021 17:55:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqKTxSh+CI1tqsB/3fxcwln4uaj4qbHh+uOhVPUJ8RQAFlVzQSeF12LB2iy08N07I5pbQr X-Received: by 2002:aa7:c314:: with SMTP id l20mr216117edq.148.1613786109148; Fri, 19 Feb 2021 17:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613786109; cv=none; d=google.com; s=arc-20160816; b=BXFkWYTqXGX8f4X6r4y8M/4YfPqQXQBkzhFi6sANqUgK5H2HJyuqI191A4YOfLnOPf YemCvWgZZXAo9ZN9Xcazr8m4OOox6Bb0jc7T89BMYp8EjGY+nGPrDEp7HAxXuqM9JPgu WnlLHFGOXB60AXRlnvQ1e7m+y7giJ06Jrn0ld+2O6gDTHfIQsf8PYbpnvv/yNsOO8csm +GJfzdRg2pTC9dU1pzqcNjlJSte5EzEXTjupUMg4c6ljPaVZu/N21uZHGQfwZie79L3k vcihZeba0N9hy7j3WVrYK/+AJU7ZCPVHZNEf/dYtwueaHEIlpVVaCPk10TMQDE7pJF4x H4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=voWvrbaLmIq18J2uSe3ySgYfcUFDoD86gbDxr3NGv44=; b=nIfdvO8AlCfirWX6dFr28Y+EzX05qJgp/znwsjE+6iCShIVEwy6YrB2+EcQvEvGzty zoHKTOUCRnlvytNmt+3YUIyfoWRpXc6OmMui7txSdpZ9Hs1DhrsZ9TeghrpSkm1lL4+v D8Q73rAv6IRduhoZNAeshHRRbBy/g6PeoGBoVRuHRp9JZCXIZHtY0DOtaxIa/XBJ3Inh LwBZNTB9zx2DfkiMu/rVNJgKg18VRB4ioB3kTWzUQligNOyFnYQK0UIWfG2dRf8nKtO6 koxBZjm+Mb/BcqfFXk/XaMQRxioYG31lLdN2c+83Hap4//nYZckodUZ4DQnCPETCUw2n AeOQ== 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 dn19si6800512ejc.106.2021.02.19.17.54.10; Fri, 19 Feb 2021 17:55:09 -0800 (PST) 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 S229678AbhBTBwU (ORCPT + 99 others); Fri, 19 Feb 2021 20:52:20 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:13364 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbhBTBwT (ORCPT ); Fri, 19 Feb 2021 20:52:19 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DjBGM3m24z7kG9; Sat, 20 Feb 2021 09:50:03 +0800 (CST) Received: from [127.0.0.1] (10.40.193.166) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Sat, 20 Feb 2021 09:51:28 +0800 Subject: Re: [PATCH 0/4] Fix the parameter of dma_map_sg() To: , , , , References: <1612853965-67777-1-git-send-email-chenxiang66@hisilicon.com> CC: , , From: "chenxiang (M)" Message-ID: <54b73ba3-54f9-bb73-e398-4f12bc359b26@hisilicon.com> Date: Sat, 20 Feb 2021 09:51:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1612853965-67777-1-git-send-email-chenxiang66@hisilicon.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.40.193.166] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Ping... ?? 2021/2/9 14:59, chenxiang ะด??: > 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. > > chenxiang (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 | 8 ++++---- > drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- > drivers/crypto/ux500/hash/hash_core.c | 2 +- > 8 files changed, 26 insertions(+), 18 deletions(-) >