Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1036111pxv; Thu, 15 Jul 2021 23:32:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZAW+/O5IqlfrbUJqiUa/DS5wgzdQ+mk+plxkWkaW7gxvjagGkoGS+nFSWJMgScqUms/Ul X-Received: by 2002:a6b:8b0d:: with SMTP id n13mr5633631iod.169.1626417138025; Thu, 15 Jul 2021 23:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626417138; cv=none; d=google.com; s=arc-20160816; b=sbmDfQKLB78zUDOM7JJ9wejsf+y8AqS8qT2GvsQeAW5GMWfHZoF3VCbUu8yUPL6cV9 NqqXENwlwUORgHHFaws8WTG8N05HaAKZjwJWvPXnVqNlJr6fNBPz0UZmbYGHJcikeZLF qUt04ziW0CCRR0fRHg/HPfNiYd0mXRxPOH96+jtoTDloOCxxbQG8ECk15LTm8AmBCaa7 YSuqNdiHUwn1uN1Dl2qGQVKuRQleBcg1wrM9F6PYud4lbYQk2eo3vM/rPgUBC+OsOOYB yHhYoyABljicOK8CnxRUtR9HTtjN/BICo2FXGDChre9Z7SzThq7z4o5gfWxzyz20hgNT BM1g== 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=/j/YASUm/wt/mSF7Gzk5t6G2Q5yUr/BAML+AId6071A=; b=cXyOUNynbrL6eVZqcPYrYsZsHwZvBzRaLh4SgcAmYFwFQgSw1HJpvZihpUydKW5NfF UXiMXQeCclvO8OChKrh3yVn+TQ9x4CLgjZiabyvSX5lN/yQ5pZXJmn4tMeHAep5uoJ2l kqNtZSWtQy4GsdLKWCwnbmg7AzHLKV+JNGVAQJHW+6oLrQUtvlni0lR6OZyyq5OZ878t TR1X0HmYBUSo80J5A0C7A5jjbCk836TjGGXsYvclf3VmcHNIU0PzUcFis9qkb6fNRoA8 AeqrvFrQJ7tPeehppiznduVlAP91O1Me6fWm+yXAWAgaf17T0AYVw7G1GHU1u1VqMAvW cWKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 d1si6351270ilg.44.2021.07.15.23.32.05; Thu, 15 Jul 2021 23:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbhGPGe1 (ORCPT + 99 others); Fri, 16 Jul 2021 02:34:27 -0400 Received: from verein.lst.de ([213.95.11.211]:41942 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbhGPGe0 (ORCPT ); Fri, 16 Jul 2021 02:34:26 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3C31267373; Fri, 16 Jul 2021 08:31:28 +0200 (CEST) Date: Fri, 16 Jul 2021 08:31:27 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, iommu@lists.linux-foundation.org, linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org, Christoph Hellwig , Marek Szyprowski , Robin Murphy , Stephen Bates , Martin Oliveira , Joerg Roedel , Will Deacon Subject: Re: [PATCH v1 04/16] dma-iommu: Return error code from iommu_dma_map_sg() Message-ID: <20210716063127.GB13345@lst.de> References: <20210715164544.6827-1-logang@deltatee.com> <20210715164544.6827-5-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715164544.6827-5-logang@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Careful here. What do all these errors from the low-level code mean here? I think we need to clearly standardize on what we actually return from ->map_sg and possibly document what the callers expect and can do, and enforce that only those error are reported.