Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp607183pxv; Thu, 15 Jul 2021 11:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRVukqBzBGreC3XzGlFuNu037B/KQsyl6T8CBbIwzTEKthX2rnsX4Z0AumbVgjDXxyDpNf X-Received: by 2002:a05:6638:2516:: with SMTP id v22mr3085358jat.144.1626373338042; Thu, 15 Jul 2021 11:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626373338; cv=none; d=google.com; s=arc-20160816; b=WbRXLQxsA7I857sKb3gQ2u/RESyT/g615+5ogNxqZDQGwX3xtO3hltE8W9jQgegknJ QY/doUiQL4HuIWKuq2Q2HBjqnH3k5mimslA8nRMpMVwlKCNzVLY4yzQDudM47fpf9u7O 07Vegl5wLZO7ouJyWXdusbIRhGR++b0Rtz/kXlaDxGDNQFZGbJ1otTjs0mTtinDZZaVp AocU6NQeam4M+Q4saEheDDMPCcjdPmcAV4kvaIpoJzZT9QzDobN3+xYpqRv7v4uTOylx 5EqfJeVQTnXNSu6xwL2yGYKsoHNOfo1AuXkiFBwr+QsFIKrPN0M0tYMJPHsmFmO1ecM2 UTeA== 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=Vh7idcp8uIAqCBUcnPlWtiOoHOTF3pKwZ9tjpJkyjBs=; b=SRj4YkZy2KoUZFAmNbpdhryVANH8+lu9CF+EMJNqbAfDZBMDeA2IGiy5OFT8viquXH rCVP23ImYKdQvOZRR33uYZA319wP00b33eepguDruM1D6H2itIu8ZuGHfokvf1/1+EDH KKVammh2cTDifZfPQcu3Zy0Lyub7jSPocvFYxf5oSD9GWNMXrDAPT0AKD27VFN5qrzU9 1IBNmgW8o5tpOQ/UmaLiW5VcFvbZndVvi4UFDQrbppxA7Un4kErKx5xNo26zjdriRxDn FsYf6CrZkaRobVJKn3xuYUg9n2+kgKyPmuPZ1TEf1JC/CeNEkH/Dk9YjJISgiyNShF5a VTTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=JmcSAn2r; 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 g14si7602455jaj.31.2021.07.15.11.22.05; Thu, 15 Jul 2021 11:22: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; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=JmcSAn2r; 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 S235565AbhGOQt0 (ORCPT + 99 others); Thu, 15 Jul 2021 12:49:26 -0400 Received: from ale.deltatee.com ([204.191.154.188]:50048 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234045AbhGOQtG (ORCPT ); Thu, 15 Jul 2021 12:49:06 -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=Vh7idcp8uIAqCBUcnPlWtiOoHOTF3pKwZ9tjpJkyjBs=; b=JmcSAn2rvRQc5C7MrFSRK9pBrk GKVkxj+CKC5t4mYSimezSqrTpkyQiLqjRkiysuOkTo5xv4HNant2pQCww+QjxcAxV5QVqv7kQibHD Igtt3UtSYyGJX35W1Sy5JkYpSPmiKIkvOm4QY3kby4ft+qBjcTzrrx+eHWsugiQnsKU99QFdtUWjo RGKbXIpbYgM6wfJnEYPQ7nnjxKkVRl/NgOjCCDAKbeBnXVJUhW2sh6RcwENC4KOjVMf/8vOqW2Ffe ln4bBhV7KnL2jLL1wwfCDO+4ND4q58CbobKSfyeYQnG+t1VZ+BqxBrACk2rRQb5uSnYDIb7pF4f8K 8EuQ8rFA==; 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 1m44Ux-0001yg-6K; Thu, 15 Jul 2021 10:46:08 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1m44Up-0001nf-8u; 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 , "James E.J. Bottomley" , Helge Deller Date: Thu, 15 Jul 2021 10:45:40 -0600 Message-Id: <20210715164544.6827-13-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, James.Bottomley@HansenPartnership.com, deller@gmx.de 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 12/16] parisc: return error code from .map_sg() ops 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. Signed-off-by: Martin Oliveira Signed-off-by: Logan Gunthorpe Cc: "James E.J. Bottomley" Cc: Helge Deller --- drivers/parisc/ccio-dma.c | 2 +- drivers/parisc/sba_iommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index b5f9ee81a46c..a3a5cfda3d93 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -918,7 +918,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, BUG_ON(!dev); ioc = GET_IOC(dev); if (!ioc) - return 0; + return -ENODEV; DBG_RUN_SG("%s() START %d entries\n", __func__, nents); diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index dce4cdf786cd..9a6671a230ee 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -947,7 +947,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ioc = GET_IOC(dev); if (!ioc) - return 0; + return -ENODEV; /* Fast path single entry scatterlists. */ if (nents == 1) { -- 2.20.1