Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp706410pxv; Thu, 15 Jul 2021 14:02:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOz+Q8v25mK1LeSuvwy3yLQjZ7X9swQAT5StbK+/uFSt4oey2hlZSLr4/UKvXRFclOhx92 X-Received: by 2002:a05:6402:c96:: with SMTP id cm22mr9553317edb.132.1626382917802; Thu, 15 Jul 2021 14:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626382917; cv=none; d=google.com; s=arc-20160816; b=G1vmUp2tRNT4/GGCAAMXfWdZl0+sR/UGrQk8/TV/TMjllgX84LoP+hDYNzF7oZolNW mQAWeoTdXOA5wRk+PJxAG3QXCmhC1ytWZRxpeaFVtpfKfe6RRXVxPahykUegbNvH4Hdr GF7PltuquzB8L6BoY7FFy+ztSOPUu1b81ma37Id8sFXfJVk8ZMlyFlPQrzyp+wgIXrsV aByiKHjkFuOvWb46tMJr9Xw+B1CKabF7MfkBf0/135NiYUkHkkQA6yfngPJqburoVrpJ WHqmhO60MHqVhjFBJjr6iq+8l930jQWuWzKktg23AdZe7ZCv0hhR7nhr2/25D9OxxnRp UqIw== 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=5q5HrJN5z01eX+XAG2EfKItHnqLG5Bo1fOvwGUnV4O4=; b=jjubTqJt9gGXhM/9KzmCvriiGz/rFqNnQSbDgfwUSGGKpr+GjDVkRtvb8HvyBDT5hj dEmOuG5+ANPlYH6V4wZlb5RM6fq308DnBvs+Qy0GrMGCa8SQ5zZJ4MQnDp/dduMJ9cRi wYZBxq3xtKX5t1uYnQUZlLdRJUGsQwi9G7hiSQoE0pCDrQdrV0+pVFLlvd4K24zlfe4P 0jA5M4BnYZ0MCLXoO/gGV+wRt4x8ZIzuZvTMSXCRmLZ/7iM91ifTC7UFsMAcGT95YcIY bD81Wy3n9x+vpDuDk3a7lFwJq26G/P3W5PqIWywNu8Zrhw+HLka9aRlNUXoTOVAgyB05 jUvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=oVKqj1qx; 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 n22si6575781eje.429.2021.07.15.14.01.34; Thu, 15 Jul 2021 14:01:57 -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=oVKqj1qx; 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 S235762AbhGOQux (ORCPT + 99 others); Thu, 15 Jul 2021 12:50:53 -0400 Received: from ale.deltatee.com ([204.191.154.188]:49960 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233692AbhGOQtE (ORCPT ); Thu, 15 Jul 2021 12:49:04 -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=5q5HrJN5z01eX+XAG2EfKItHnqLG5Bo1fOvwGUnV4O4=; b=oVKqj1qxGhVN9ixr6TLSsC4ZBO UTD1MZ1POYG3KI27eIMLMFxYbxzslShIpA6YWVrJkGi8+wWJ/wcVjvI1+Jf302nsbpn08IP0HnrjG oh9pK+zmvzVkSIE1LmiCYRQEMg/n7BKDDFN1GhirqNtUZZY85nV7dWg7yr93fsfot42jaRm2mqSn+ wA3i/zh7pUzR0TP8bgsZsoHOwBQn2dWZ41mvNoesxsAdL31ytt8u53ohsynd3SOTknscoWtbi7kQX eUTXIk0RVW11sAtm1oHi0qiO2SdAZ7zV+zvHAQY6D/M0Zv5t6bRmqKI4wJIkqLx4KZbsVyYpCrClV /+yGg5Kg==; 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 1m44Ut-0001yb-T5; Thu, 15 Jul 2021 10:46:04 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1m44Up-0001no-O1; Thu, 15 Jul 2021 10:45:59 -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: Thu, 15 Jul 2021 10:45:43 -0600 Message-Id: <20210715164544.6827-16-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210715164544.6827-1-logang@deltatee.com> References: <20210715164544.6827-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 v1 15/16] 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 -ENODEV 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..ae9abebed0c4 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 -ENODEV; } static int dma_dummy_supported(struct device *hwdev, u64 mask) -- 2.20.1