Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp752652pxj; Fri, 14 May 2021 15:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBXSNixVhSeAqLkd91eJN6D2MvwCpU5mTUk/dc+WTanAE6CZRPPg2NpxQm3hGJK9Ulhu/h X-Received: by 2002:a6b:f808:: with SMTP id o8mr37142456ioh.140.1621030335025; Fri, 14 May 2021 15:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621030335; cv=none; d=google.com; s=arc-20160816; b=lhNqL8Oi8rzXE5DiTU2vQyCHOB8v51SPsl6OgpSbMS1atdoZGjx8++qy0NOhuZRuOv 6WiQtRtNiqZRo/2qDvSuYg62ls9TrAdptzRfqhN7o2QThL33o4vPQ/+ze0hEUuyIWQ58 xc/Sb/gRGiID53yYRprjXVLaBUa5wkx6khGSENaUSNqlj0hYAzwYI62thpf3czwz08uw p+NSJo4tIGVUbgAEAkESI5w49hO9nhtrDHUmSlnVsHGvtthAskixLGY0eaLJgKLb/Z3R 2jdB/C9M18I4eYfSDcGew8AxJAOrD6W8u9mhhh5x6LVOXXkWzenYdFr403ksSXZsMBeX RoVQ== 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=hft/toSWDBmRgmUey65z0TkNis0F4nNkU44LMc/hi9c=; b=uYyBwwjLaGsDuTWaHMsZ7MNIFE+CRwTPVunyf7h3idPtmtgkhgOLov/qE8uCkOvgdy 5OAQkd351XcgMiz30yGO84Q0vscaHcqslyGV2NHb8rPz6k8mmtUMOZe1++LmIgaGrdyO q1rDIYlGO30aPYN83QD0rW4kxR81/TKzSxgCdycz+I2+7dcrjeiS0MWELOlkMZ3FutJ4 vdYwZCJ2kz/tA6fv7dIpUggYLpW+BEnaodw9j5BEagVtyKbx3wAbfEjPM7jgHL0CwyyZ CwK7z7mJbJ/v2kwGl395F6Yz4F6ifNbSiNTlLfH654J/Aj+9kHQB7bvjK2KoM+uuBYJN gfGA== 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 k17si9675691iok.27.2021.05.14.15.12.02; Fri, 14 May 2021 15:12:14 -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 S231713AbhENNwl (ORCPT + 99 others); Fri, 14 May 2021 09:52:41 -0400 Received: from verein.lst.de ([213.95.11.211]:50586 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbhENNwl (ORCPT ); Fri, 14 May 2021 09:52:41 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2C7076736F; Fri, 14 May 2021 15:51:26 +0200 (CEST) Date: Fri, 14 May 2021 15:51:26 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Christoph Hellwig , Dan Williams , Jason Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy Subject: Re: [PATCH v2 08/22] dma-mapping: Allow map_sg() ops to return negative error codes Message-ID: <20210514135126.GB4715@lst.de> References: <20210513223203.5542-1-logang@deltatee.com> <20210513223203.5542-9-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210513223203.5542-9-logang@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +int __dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, > enum dma_data_direction dir, unsigned long attrs); I don't think it makes sense to expose this __dma_map_sg_attrs helper. Just keep it static and move the sgtable helper to kernel/dma/mapping.c as well.