From patchwork Thu Feb 27 12:37:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 183941 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4463593ile; Thu, 27 Feb 2020 04:40:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwtTxAsJQQvKiAlVsOL9gtWHcx3Cqq9d+LHDv4pwnYxwfNpvpRbSoqQW7VvABilezRDaXlD X-Received: by 2002:a17:902:b116:: with SMTP id q22mr4528768plr.324.1582807236761; Thu, 27 Feb 2020 04:40:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582807236; cv=none; d=google.com; s=arc-20160816; b=sLQDChc3H0yeAdGk4vGiGfabvYnIdtAVRh76eJKqfnpYX1aNc73YYefw6cCQEJcP8u twld4INVRVENl2sQ5n7v3il/pgiOI13M6xEWiNwKgQB81DXasZAGnCvh8uQNelCRTu/R LizhJkGGe9JqHEDiRSo63LGTBAu9J2HFhOzj0I7r8uTLzS4JZH3RfcuRXzhZ4gTyRJPX 0fGfgzrOMP6zu9WTYZdMqeJNFRzUBfz56WDhla0bOMAHrlG1fY2iC3JY9mqJyJWckXsN 214ZJPc09TJt3NP+M9zBvrDtnTVphrSOwFUx8R2+IdFGKlbTUaKtGQFDtKt236mE1C4s M89A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=gx8dILQ97O4aVxgGAKmyBu32eGlQpyE+wu3x5pkRVtk=; b=OHyq6etw0MtPA+ncW3hO+Uw9TEGFMT0iYMDD6fZ+e6hZhP0wDHPCokN1lhUxMKXOA1 w25LzEEb74WGdn03KfLod1EaTs6C/K1yqNkON0n9cApLm9Zdq7Qu81dll+uR/devd80S vjqR+vhjlYW7NMA2Mc6+8E2vfN4yR1xAWBSuXDFeI45tJFN4SfLagNeTILGoMlvGQAh1 Ryt5vKYiZO8qvsCRftCvUEzHPdEyAj3bNppez98tSRpXiEwExBrdxGpuG3EZ0Jv4kqi8 pq6noG+PGJ/crlVOIH41a5LxdifMTJ/PJ01R5/DDcBGEgLHze2KCQaNwOuX79uvJC5rf EMXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=oaRVO7ux; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=dgkuGMcG; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id g18si2972365pfo.175.2020.02.27.04.40.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:40:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=oaRVO7ux; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=dgkuGMcG; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gx8dILQ97O4aVxgGAKmyBu32eGlQpyE+wu3x5pkRVtk=; b=oaRVO7uxS3L7HX 9U9x6irM7ZrCSJ13O1afV7zVvLRXflme+hfWSXCdWTIOL+pTCOvB/DJvsnAnXuLj1AQ9hDCjsi/Ym oXDbEbOG54PxHWKguABOWFxbxvO4ZODFXNNO1vLYe2HWtpTFK4+Mja74O2QYm8292OBqxYythXp5m 3bgkw67drZWlpp5N2MFfvu1yXb3OouyplLjKE7lCf/X5SG0+sEAVyQGN/n6E5ZRKjVCt6rvFfPJMn rTgoctrNynCINVUUZhiGvDRujGANC6HzGuUrftPwuZ7jZfgdaWiVaJ+GCcvcGSxrXnd0LQMmYtKz8 YxOIRmrKLDD88Drq40sg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7ISp-0004yb-BR; Thu, 27 Feb 2020 12:40:27 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7IQb-0001lP-IY; Thu, 27 Feb 2020 12:38:12 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01RCc3dC033099; Thu, 27 Feb 2020 06:38:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1582807083; bh=rBvL/jTgQtXPQwaQj/9VSebj/1cBnnhVjwXy8JgbaGE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dgkuGMcGK4+dJG4uVpsTVpbhwKUVjfYHbed1kNfQiEGTBacM+oSvcrx5+YxzM92Ea qDQgLxYx1ae4916jGjaFobCdRyT1bIlA01wePmx5wwn14GRMPTFxbmuFmkJA23bCRG ASl5y3zKjaxE3d4RXbrvNV/kRgcM8u1nXaYwArmc= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 01RCc2n9116708 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 27 Feb 2020 06:38:02 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 27 Feb 2020 06:38:02 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 27 Feb 2020 06:38:01 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01RCbnvQ100207; Thu, 27 Feb 2020 06:37:59 -0600 From: Peter Ujfalusi To: , , , , , , , Subject: [PATCH 3/7] mtd: rawnand: marvell: Use dma_request_chan() instead dma_request_slave_channel() Date: Thu, 27 Feb 2020 14:37:45 +0200 Message-ID: <20200227123749.24064-4-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227123749.24064-1-peter.ujfalusi@ti.com> References: <20200227123749.24064-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200227_043809_725310_0952F6E0 X-CRM114-Status: GOOD ( 13.68 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.47.23.249 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vkoul@kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. Use using dma_request_chan() directly to return the real error code. Signed-off-by: Peter Ujfalusi --- drivers/mtd/nand/raw/marvell_nand.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c index b6c7e1903396..911430cca7c8 100644 --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c @@ -2743,11 +2743,14 @@ static int marvell_nfc_init_dma(struct marvell_nfc *nfc) if (ret) return ret; - nfc->dma_chan = dma_request_slave_channel(nfc->dev, "data"); - if (!nfc->dma_chan) { - dev_err(nfc->dev, - "Unable to request data DMA channel\n"); - return -ENODEV; + nfc->dma_chan = dma_request_chan(nfc->dev, "data"); + if (IS_ERR(nfc->dma_chan)) { + ret = PTR_ERR(nfc->dma_chan); + nfc->dma_chan = NULL; + if (ret != -EPROBE_DEFER) + dev_err(nfc->dev, "DMA channel request failed: %d\n", + ret); + return ret; } r = platform_get_resource(pdev, IORESOURCE_MEM, 0);