From patchwork Mon Mar 9 23:22:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 5972431 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D61F9F2A9 for ; Mon, 9 Mar 2015 23:22:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9FB42043C for ; Mon, 9 Mar 2015 23:22:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C626520431 for ; Mon, 9 Mar 2015 23:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C87B86E633; Mon, 9 Mar 2015 16:22:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from gloria.sntech.de (gloria.sntech.de [95.129.55.99]) by gabe.freedesktop.org (Postfix) with ESMTP id E62236E633 for ; Mon, 9 Mar 2015 16:22:06 -0700 (PDT) Received: from ip545477c2.speed.planet.nl ([84.84.119.194] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YV6zp-0007Sm-Pd; Tue, 10 Mar 2015 00:22:01 +0100 From: Heiko Stuebner To: Philipp Zabel , broonie@kernel.org Subject: [PATCH 1/3] regulator: don't emit errors in {devm_}regulator_bulk_get when defering Date: Tue, 10 Mar 2015 00:22:06 +0100 Message-ID: <9261130.uPvufuEFrr@phil> User-Agent: KMail/4.14.1 (Linux/3.19.0+; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1429128.MSqYm0qZ9p@phil> References: <1429128.MSqYm0qZ9p@phil> MIME-Version: 1.0 Cc: Fabio Estevam , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , Kumar Gala , dianders@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , dri-devel@lists.freedesktop.org, Yakir Yang , Andy Yan , Mark Rutland , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When {devm_}regulator_get returns -EPROBE_DEFER the driver in question will try probing again at a later time. So don't spam the log with failure messages as this is an expected result of probe ordering. Signed-off-by: Heiko Stuebner --- drivers/regulator/core.c | 5 +++-- drivers/regulator/devres.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 52af1d7..07ca6cb 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3163,8 +3163,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { ret = PTR_ERR(consumers[i].consumer); - dev_err(dev, "Failed to get supply '%s': %d\n", - consumers[i].supply, ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get supply '%s': %d\n", + consumers[i].supply, ret); consumers[i].consumer = NULL; goto err; } diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c index 6ec1d40..78e460d 100644 --- a/drivers/regulator/devres.c +++ b/drivers/regulator/devres.c @@ -168,8 +168,9 @@ int devm_regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { ret = PTR_ERR(consumers[i].consumer); - dev_err(dev, "Failed to get supply '%s': %d\n", - consumers[i].supply, ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get supply '%s': %d\n", + consumers[i].supply, ret); consumers[i].consumer = NULL; goto err; }