From patchwork Wed Apr 17 19:24:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10906039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C03D517E6 for ; Wed, 17 Apr 2019 19:24:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A32682848B for ; Wed, 17 Apr 2019 19:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 973BC28A54; Wed, 17 Apr 2019 19:24:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CBF7289E9 for ; Wed, 17 Apr 2019 19:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732634AbfDQTYs (ORCPT ); Wed, 17 Apr 2019 15:24:48 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:34358 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730230AbfDQTYs (ORCPT ); Wed, 17 Apr 2019 15:24:48 -0400 Received: by mail-wr1-f47.google.com with SMTP id w16so3461023wrl.1 for ; Wed, 17 Apr 2019 12:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xbkDshoRwG+I0w+DmgS1Lh94U4IFVKrRkWhOXAIbiIg=; b=FNfJ5k9aN8Zj682O9MfPTUexqXnljpSE+IcdsbyHR8l2Bnzxzvg4S8Uo5wSntA01mS G2q1ycJGyJz7dZR5V7jZJtnYFQbFl4KGrsKqew9O3m7FJpxIKfBxQLMLwj80+I+GxCK8 Z3cRfzvNHpsG8qtuH5QkWb0fCFOOm6rxampqAk+GWH7ioBIzn4x4H16z10fV6jLIP8hk 23AAkndgENtkGk3VL4KvGyn4ROjQ5IBnxpaGopwqSQLaXVjbZB2LzPxdC42JyHCnE12o UFF5qnlNr4nXFQQQUqGNQpoUBI+x+fSLLUvkCgsfMPXC+DRiY//E2uxCVBySEu7a+Y/y nKrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xbkDshoRwG+I0w+DmgS1Lh94U4IFVKrRkWhOXAIbiIg=; b=r4mW/NjbQ9XxsiCl0oknOrMVnwyEBm4jCiOc4v8wa/RwHLJh77QdvirZkN+G1s5HoG 6JnRjN5R3aeWvo+mSJMDRLr8ejkUa0sp4AvWKSkamNOTrK7dhcGv27hS6d20vEJIPLTj r2S6ZHAJoRal3hTUY8eb7sJ6607YPrg4gE0gV1bgvM73Ve7SsLtrJeqTIdn6cnGEmwpq 4dDuERK/XqW9cLiFxChlK3rKmdHRammcF/z/a+qIqF/IaHYnXZBrQsaJMtb4pAN2fYGs y7MFnfaudmcJ7wItug9jzPjjqHsZdeInaODhoiblWl9aK4oGNH4STWZhM+AAkPq45O+0 pgfQ== X-Gm-Message-State: APjAAAXhLC4zyujVO4WknWhFxwy2sTAnQQqRHyrCbKnSEKfJRUJhyC0O gFoRNFcoLiURnXNf/N+Vy1hiBw== X-Google-Smtp-Source: APXvYqx+6GfTYL6uoPD6e0+k9tHnAgsXxxt339BV3J+oJyx4/Zgk7ewFPDr1b1fgk4dzJpuEyADWHg== X-Received: by 2002:adf:f390:: with SMTP id m16mr4529765wro.25.1555529086982; Wed, 17 Apr 2019 12:24:46 -0700 (PDT) Received: from localhost.localdomain (200.red-83-34-200.dynamicip.rima-tde.net. [83.34.200.200]) by smtp.gmail.com with ESMTPSA id y9sm95076745wrn.18.2019.04.17.12.24.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Apr 2019 12:24:46 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2] regulator: core: do not report EPROBE_DEFER as error but as debug Date: Wed, 17 Apr 2019 21:24:43 +0200 Message-Id: <20190417192443.6501-1-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Temporary failures to get a regulator (EPROBE_DEFER) should be logged as debug information instead of errors. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/regulator/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 186a37675b50..a2725269a94a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4342,8 +4342,6 @@ 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); consumers[i].consumer = NULL; goto err; } @@ -4352,6 +4350,13 @@ int regulator_bulk_get(struct device *dev, int num_consumers, return 0; err: + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get supply '%s': %d\n", + consumers[i].supply, ret); + else + dev_dbg(dev, "Failed to get supply '%s', deferring\n", + consumers[i].supply); + while (--i >= 0) regulator_put(consumers[i].consumer);