Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1542769pxv; Fri, 23 Jul 2021 10:51:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysnzKYsGh7IUczmKLamoe0aO5pi4CO8EJ6zzwbHEssehT2BKFPkQ2Nd/aKBLURUx6vavTk X-Received: by 2002:a05:6602:5de:: with SMTP id w30mr4834978iox.199.1627062685238; Fri, 23 Jul 2021 10:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627062685; cv=none; d=google.com; s=arc-20160816; b=ePg9Wb7b8Ve5u0UBK6j4sqgitMkl/EET7sRP97qr1XWfg0b6jrYvfuq7I66iOwdwjh 7SI1vLwt6QFQtiQq0mdJxs045p6SLU/1Ql5hZwYUgmfse/qX1El3PepIlKGeVtQvh4R4 VKfvQNJrs/pJIIQo3lIIE1CE9zYaElGODHM8lOTT9jxRJYqdJpkWIKmzX6lWVcsF/mME h9ZtGNhRVn+znSoe+kzXSXLoDmuPSQRTaC71z75PYUCmcT4qUcU0WCsSNgY7PunNeoLr AXYhd/5xJ0E8ZgzYMCeMvTn44PS+/MqEgzhnTnr4dLyt4cGiivo68iam/uk0wCgMyLH6 rKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=x3KSnhFQmhq0kDAcj69QIXa3ZhZHzFN2nEhizdLNjiI=; b=n50bauLXRKZAeBrIknhtz9BF8Gy06A27ObG+daUxAwfGXqkuoZzSalgkO0CFmcJIml DjLr1nRdrtuwyE9GImyk6EU7Kh4gxjwLQ3I1DivqVq+xhy6YNgx9Yw0t70b3R9/bLHCH btFsIYWtzYFDELatf5dZAXenh/wWSbveskoNBwgB6Anq/idFe4Fy8dhyCAxSZR1Pjd5f 8/ZikB6XNTpHxzabZoIXnJlEDzd0OLfmluKIRlTI0wE82GfjRX9WdTflIBQ8JbJ3RRIc 5o3aQ7S4Extbyw7hcyQftSIN/G3Py43uluoRgxn8OZF2/hvBzHRATfgcVZsxALtsoc+s 3fUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=M3qmRbqs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x14si34313237jab.2.2021.07.23.10.51.12; Fri, 23 Jul 2021 10:51:25 -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; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=M3qmRbqs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbhGWRJw (ORCPT + 99 others); Fri, 23 Jul 2021 13:09:52 -0400 Received: from ale.deltatee.com ([204.191.154.188]:50578 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231698AbhGWRJr (ORCPT ); Fri, 23 Jul 2021 13:09:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=x3KSnhFQmhq0kDAcj69QIXa3ZhZHzFN2nEhizdLNjiI=; b=M3qmRbqsKCC+FKzgIYDrT251SH Nzml0wv2K48qt2sJXjzM1DxP/eDRfrPjJ9bdzaj0HtsiKgS7pahyju0brznWg3AUJX+JatcVTcM4g 0wsnuMo5aYzvw314Ri5RUkrtzSp9HF/aXGG5ksmYAYRZ5BAnS1pC0gSFfSU2XiRUXllDLfF/3xgcP YUj9pjNTYWDHh8iHeimXsNZzv//XPnvhiWZXPpnRGhPZv18QuImLyc5EfuRCj99XGEoFia3P4JxFW zRK7JfICPO6TzZ/eLMEo6IcVqpEkBhDIJpDj5PqWbAxQ3M83go6+8pynIzl/aD4Jy3LIvtXsBIgDO p3nGybYg==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6zJQ-0005Lg-RK; Fri, 23 Jul 2021 11:50:17 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1m6zJN-0005rT-EK; Fri, 23 Jul 2021 11:50:13 -0600 From: Logan Gunthorpe To: 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 Cc: Christoph Hellwig , Marek Szyprowski , Robin Murphy , Stephen Bates , Martin Oliveira , Logan Gunthorpe Date: Fri, 23 Jul 2021 11:50:07 -0600 Message-Id: <20210723175008.22410-21-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210723175008.22410-1-logang@deltatee.com> References: <20210723175008.22410-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, sbates@raithlin.com, martin.oliveira@eideticom.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_NO_TEXT autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH v2 20/21] dma-mapping: return error code from dma_dummy_map_sg() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Oliveira The .map_sg() op now expects an error code instead of zero on failure. The only errno to return is -EINVAL in the case when DMA is not supported. Signed-off-by: Martin Oliveira Signed-off-by: Logan Gunthorpe --- kernel/dma/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/dummy.c b/kernel/dma/dummy.c index eacd4c5b10bf..b492d59ac77e 100644 --- a/kernel/dma/dummy.c +++ b/kernel/dma/dummy.c @@ -22,7 +22,7 @@ static int dma_dummy_map_sg(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, unsigned long attrs) { - return 0; + return -EINVAL; } static int dma_dummy_supported(struct device *hwdev, u64 mask) -- 2.20.1