From nobody Fri Nov 29 23:36:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=deltatee.com ARC-Seal: i=1; a=rsa-sha256; t=1626367610; cv=none; d=zohomail.com; s=zohoarc; b=Fal+EmiG04t5pAF9TxPVlGxmyGowePv3tC4m32eCBuETdx7xFwFlv9GW+Os60y7xpDPyqsiuB88taL7Y+dH/prwCvvi5snjxejD7Od8Nh7gsNmrh9lyqv8RlDgFm34A0zkutUJj63bUYfouhnuORgzAWZJ7XVrLR5RvovqKsvcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626367610; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Vh7idcp8uIAqCBUcnPlWtiOoHOTF3pKwZ9tjpJkyjBs=; b=kJ9j7l6OLg2/PenJntkuizWiCEFCSnFq0k0235rLEjcPyglIQrep5fUdRCewlaF09dp4MbfNoT4LrC+/KZEa0s+OhhCT3iNKiE4IQAiThpe7TTN340TUaZdXITQnTrGvQRXS9tctBj8b4DeurXTvvvluLIpaK4Ne/9QPYZX8z90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1626367610672585.931921754171; Thu, 15 Jul 2021 09:46:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.156735.289320 (Exim 4.92) (envelope-from ) id 1m44VS-0003x3-HM; Thu, 15 Jul 2021 16:46:38 +0000 Received: by outflank-mailman (output) from mailman id 156735.289320; Thu, 15 Jul 2021 16:46:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m44VS-0003vf-9I; Thu, 15 Jul 2021 16:46:38 +0000 Received: by outflank-mailman (input) for mailman id 156735; Thu, 15 Jul 2021 16:46:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m44VR-0008SR-DQ for xen-devel@lists.xenproject.org; Thu, 15 Jul 2021 16:46:37 +0000 Received: from ale.deltatee.com (unknown [204.191.154.188]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e968ff3e-fc23-49f9-90ee-fa4a62cf3eee; Thu, 15 Jul 2021 16:46:13 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e968ff3e-fc23-49f9-90ee-fa4a62cf3eee 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==; 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: quoted-printable 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) X-ZohoMail-DKIM: pass (identity @deltatee.com) X-ZM-MESSAGEID: 1626367611104100009 Content-Type: text/plain; charset="utf-8" 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 *sgl= ist, int nents, BUG_ON(!dev); ioc =3D GET_IOC(dev); if (!ioc) - return 0; + return -ENODEV; =09 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); =20 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 *sgli= st, int nents, =20 ioc =3D GET_IOC(dev); if (!ioc) - return 0; + return -ENODEV; =20 /* Fast path single entry scatterlists. */ if (nents =3D=3D 1) { --=20 2.20.1