From patchwork Thu Dec 23 17:11:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4BE4C433F5 for ; Thu, 23 Dec 2021 17:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eHySzvgvmqwQuMYWPyZi5/6lRtqvHda2jowt1AjOvIY=; b=InUfUiNfqz7jMg ICocSp8P392vEKxBp88240BsO2Ks2dlgHUohkjs3tFP9r7POwnPNM3ARHt0D9U8U3G4OjPJmpLtc+ 2NljuO3Swov3bPI2JWlEM2+G3hCvzOvFRp9JK+rQjijedV+cXwnzJoTcNFB0woeDXV1RMBd8T0fqP J4Gx/OboUdffqYq1h+49T0NbuipRjAaeu7yDxe9ijuR9c4bYXFD6jjYPde32E//e4jnX3oy+UIT8N 6o0Nz6KoQNSmBENiM+ud4djQsXA28WmswFKilWcPy3DsFKlinZ6Vu0hw8JrJXDM0k9KquKfWWqS6y f40Ki75YF0+hHGqU/ciQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Re5-00D8OP-5X; Thu, 23 Dec 2021 17:12:49 +0000 Received: from mxout03.lancloud.ru ([45.84.86.113]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdY-00D8G1-Bu; Thu, 23 Dec 2021 17:12:19 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru C6A3E20326C0 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , , , Subject: [PATCH RFC 01/13] mmc: bcm2835: fix deferred probing Date: Thu, 23 Dec 2021 20:11:50 +0300 Message-ID: <20211223171202.8224-2-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091216_646444_14893FA3 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.") Signed-off-by: Sergey Shtylyov Acked-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 8c2361e66277..985079943be7 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1413,8 +1413,8 @@ static int bcm2835_probe(struct platform_device *pdev) host->max_clk = clk_get_rate(clk); host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto err; } From patchwork Thu Dec 23 17:11:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698517 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6C4BC433F5 for ; Thu, 23 Dec 2021 17:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UEkVJJPib5WjCKKefEkntM0pQqXcENtZVkGPQKqLS3o=; b=CZTlf+w9IM5ArD 30msg2QmadajOIxCKmiYF66b1cXdZbFfJ+1BsB3nPNp5sbFyDU4l87+isWfLxVg7MI7pRLykmGSI5 5mFSEAzZMvh2iIAK3+SLoVmmTyezpXi1zgZ7SgKX1JWS5zsdI/kfiZHJSJQQS8t2/1mpL69hDWG4I c83axZzdM+VriIPRqO4uEjiG7hZ5M/iQ0GS+JypIR76rfcpAXMjb+cY50luSq/aBg9d/2l0AT/hJw JSalMe7KO9YhRKvlLKtmgMZlBZE4cmHCroRYgDECKsppYvJXAjiK1PtcLlnfbHikbyi4Oz+3DgU3W by3GVD88/jA1pzUhXD+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0ReR-00D8X4-Sk; Thu, 23 Dec 2021 17:13:11 +0000 Received: from mxout04.lancloud.ru ([45.84.86.114]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdY-00D8G2-Bj; Thu, 23 Dec 2021 17:12:19 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 8913B209FA31 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Neil Armstrong , Kevin Hilman , Jerome Brunet , "Martin Blumenstingl" , , Subject: [PATCH RFC 02/13] mmc: meson-gx: fix deferred probing Date: Thu, 23 Dec 2021 20:11:51 +0300 Message-ID: <20211223171202.8224-3-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091216_628736_9D7D5012 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: cbcaac6d7dd2 ("mmc: meson-gx-mmc: Fix platform_get_irq's error checking ") Signed-off-by: Sergey Shtylyov Reviewed-by: Martin Blumenstingl --- drivers/mmc/host/meson-gx-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 8f36536cb1b6..c765653ee4d0 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1182,8 +1182,8 @@ static int meson_mmc_probe(struct platform_device *pdev) } host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto free_host; } From patchwork Thu Dec 23 17:11:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5117C4332F for ; Thu, 23 Dec 2021 17:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pX6IdiSI5wWswl6SA9TQ58QXKJ2kkBdkKFW9Z+YYcW0=; b=j/EOU0EGO56CPR JAvrznZ38q3zPRQiBoRiqsYDQMBqevl8ht/uixgw6RbVEmqVOWSLWQMEDCxRLMg4t2ClZ1MHJUy8S vA3VJzUbGUgdu9Yh8/op7F7KklzUephKn6zExci3wb6DewjxWabk4rpnSYMLqCp9BC8Sjabc5SjaB WUKyFKNky/C+vaNjR0LknQuscOK4u0IfCmWZBIJUs3zjkngddgGpbAqEGNdUyWtK7IkoD/vrLG4e5 jL7BWSRbT7jDlcl6z+4sURESjEc29VqkQQndNcshWXEi9VXSa2TCoy6ejJE7/JfCzjNiDPWDyVrtK X+6PBOLfOyC0v4sUG5+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Rdu-00D8Lq-Tv; Thu, 23 Dec 2021 17:12:39 +0000 Received: from mxout04.lancloud.ru ([45.84.86.114]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdY-00D8G3-Bv; Thu, 23 Dec 2021 17:12:19 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 021F8209FA39 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Chaotian Jing , Matthias Brugger , , Subject: [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing Date: Thu, 23 Dec 2021 20:11:52 +0300 Message-ID: <20211223171202.8224-4-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091216_646321_27733B73 X-CRM114-Status: GOOD ( 12.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Sergey Shtylyov Reviewed-by: AngeloGioacchino Del Regno --- drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 632775217d35..4bd070a458e9 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2590,7 +2590,7 @@ static int msdc_drv_probe(struct platform_device *pdev) host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) { - ret = -EINVAL; + ret = host->irq; goto host_free; } From patchwork Thu Dec 23 17:11:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698516 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0635C433EF for ; Thu, 23 Dec 2021 17:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SXbX+T71egGidI6jJcGhnZbQjPfVHUzMsKqzfAbmNwk=; b=22E1Nsb/kUtJ+q WpM8KNujRfS3VTd8K31SZnZ8y/bmEzvonM1YQRrGggohHn2zX1rvvDlFVdL2kUL8smTOB9pyjfAaf M+t5Tl5DDH44fSx/5YbQBvvmfcgdzLYsT1KxDUIR5q2fP3BPe8wnK9upttBLUEJJcPOFZTrGaeto0 ZYjE1l+7kyBi7q2qWfTQEpMUpVXxPyH/3iGY5xC9VMfTX15FbIG5gsPABiHpcEkNzWmb4THLvR1HS 9CJChsdLa/kLxezKpYYSpyNQm60dZj6jJH1ADpnZlVaOkX0OHAw670JBZQVaZel8ibTYrw10Tqfry gOkHE97iltRuJOhJlovQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0ReG-00D8SW-LO; Thu, 23 Dec 2021 17:13:00 +0000 Received: from mxout02.lancloud.ru ([45.84.86.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdZ-00D8G5-0R; Thu, 23 Dec 2021 17:12:19 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru C97372022B87 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: =?utf-8?q?Andreas_F=C3=A4rber?= , "Manivannan Sadhasivam" , , Subject: [PATCH RFC 07/13] mmc: owl: fix deferred probing Date: Thu, 23 Dec 2021 20:11:56 +0300 Message-ID: <20211223171202.8224-8-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091217_268886_F7A45754 X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") Signed-off-by: Sergey Shtylyov Reviewed-by: Manivannan Sadhasivam --- drivers/mmc/host/owl-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 3dc143b03939..679b8b0b310e 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -638,7 +638,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->irq = platform_get_irq(pdev, 0); if (owl_host->irq < 0) { - ret = -EINVAL; + ret = owl_host->irq; goto err_release_channel; } From patchwork Thu Dec 23 17:11:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C7F1C433FE for ; Thu, 23 Dec 2021 17:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7ms4yTBPSgv6HHp5Q/jHX3XUHtrm9kgv3DQzNUMqBXA=; b=OBuzAeH9yd+5Ty YWVa8YMDq8c51gUUE4ezWRskx2BzLfjbbBVavTW+tYEMqJ1jCIM5TccYlQpeV2mFpxV/tCBPDAmWt dMHdnrdfRTLtW57ltnnv6qLCzUfh4bNCfAQXRQ5smlIVqeJjKoqBH1WgdQzmaTD4y1x2s4Vim6fbo O5Ro/5JF97Y8FU7VBg5et2OhzVYXAAF9e2Ss+7RvGy+uRzuIn93swgz43KceWWLhXaAHBuFxG5rW2 jNvHBwzr4Vv5Kb0uRQBQPZeoYybGjOOdj+71+Zpl9uYISCkEorxX2+FtwE8HYF/ABc84LnE/s13Ka Di4eyXV8EW0dcaVKJRYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Rdc-00D8Jg-0w; Thu, 23 Dec 2021 17:12:20 +0000 Received: from mxout01.lancloud.ru ([45.84.86.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdY-00D8G6-2a for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 17:12:17 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 4B0B520279EF Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Ben Dooks , Subject: [PATCH RFC 08/13] mmc: s3mci: fix deferred probing Date: Thu, 23 Dec 2021 20:11:57 +0300 Message-ID: <20211223171202.8224-9-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091216_317237_546FA67A X-CRM114-Status: GOOD ( 12.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: e584e0750213 ("mmc: host: s3cmci: allow probing from device tree") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/s3cmci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 8d5929a32d34..719a0b9a2c9e 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1573,8 +1573,8 @@ static int s3cmci_probe(struct platform_device *pdev) } host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto probe_iounmap; } From patchwork Thu Dec 23 17:12:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12698512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BC58C433EF for ; Thu, 23 Dec 2021 17:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EKlB7v5oac/bixHN6F3NTpom9eXLZQrRIoEmKNsdKgw=; b=F2KBKK+IMByajA Hu26/ALTo/PQKIJFvYC8Slqlxfn+ZhCOh/kuyXlCJrQoWa4cnjBxSUKI6DsCraDgl7y5Gh/RbH6C2 RZOX+0J5u61iJlWRojVPyxyPOh3kTrXGqtpXOpe8XDp8yXylJW7hUFCnJ9S2XmO+YXzujtdmz3uyV iFr5BYi7gP229KzOgNhG0NRHmWQnUmRdPBn7wai8D4suXUZi2U62DhDBTOLrKH6sO3BZ07xg9NMUw /vp3MZ8CG/+fwSyvtNGIJZcxFgvG5lZCOkTJGy/s+95Z0cYsmoGHlBN76CRGBotCO3MxyV99KdJfZ DtNUkgVKO6nl1Z8XC1PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Rdk-00D8Ka-Tr; Thu, 23 Dec 2021 17:12:29 +0000 Received: from mxout01.lancloud.ru ([45.84.86.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0RdX-00D8GI-MY for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 17:12:17 +0000 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 302F42027AC6 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Maxime Ripard , Chen-Yu Tsai , "Jernej Skrabec" , , Subject: [PATCH RFC 12/13] mmc: sunxi: fix deferred probing Date: Thu, 23 Dec 2021 20:12:01 +0300 Message-ID: <20211223171202.8224-13-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211223_091215_957036_CEBC77E3 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: 2408a08583d ("mmc: sunxi-mmc: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/sunxi-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 2702736a1c57..b3256708756b 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1340,8 +1340,8 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, return ret; host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto error_disable_mmc; }