From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Fri, 16 Jul 2021 06:32:41 +0000 Subject: Re: [PATCH v1 14/16] x86/amd_gart: return error code from gart_map_sg() Message-Id: <20210716063241.GC13345@lst.de> List-Id: References: <20210715164544.6827-1-logang@deltatee.com> <20210715164544.6827-15-logang@deltatee.com> In-Reply-To: <20210715164544.6827-15-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Niklas Schnelle , Thomas Bogendoerfer , Michael Ellerman On Thu, Jul 15, 2021 at 10:45:42AM -0600, Logan Gunthorpe wrote: > @@ -458,7 +460,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, > iommu_full(dev, pages << PAGE_SHIFT, dir); > for_each_sg(sg, s, nents, i) > s->dma_address = DMA_MAPPING_ERROR; > - return 0; > + return ret; While we're at it - setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention. Might be worth to fix up while we're at it.