Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3424920ybf; Tue, 3 Mar 2020 05:52:33 -0800 (PST) X-Google-Smtp-Source: ADFU+vtfj47VZRLQozohrDpXN58PPmAtL5z+3l0y23A5dglYCkY8Mwb32MbStVKSTarmpe3j0BWl X-Received: by 2002:aca:cc4b:: with SMTP id c72mr2585322oig.139.1583243553308; Tue, 03 Mar 2020 05:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583243553; cv=none; d=google.com; s=arc-20160816; b=s9AXx/t7B6VcHm5n+iC2L/fw+UnMPJAJY3ZP8mPJeYfsmWcIx7SmVVnGihO2DztAkR Wh+JFm5vygi6v5Snp6T0u9JJY7xPHu+UiNcrLTns3dtuqc5Twv7CtQko5hh7kALOhBaZ SzLpsDL1lV5f2+AWIg0pDTRvnOSGze4u6HxFsVUJuOSl3GnQ62Y3wqeMYyWu0jk1lZhB 2VMKE18bx/Xgxx/14oW9jqQZAgBd2i1Dhv+lK+Af+tsT8z05UV3GX4409CBDB0jJigXi MmKCMk0k6CQccu4AxJI5E4VYQrAG2ysEg8qKAnDdNE1ZWuwPWRHthKirjI4PkBiJmAmC 5slQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=2Uc/eJY+3BE4wVfrZ6YHDR1iBCA7fmCINEqF3XsEt/s=; b=zmJ3vrUdX2IEGLqqOAuXNOyk3PPyWECe8av2StX98AuvFr+Iola1x0x6ZvCV5BNx9r ZoccjZzol2JKqLLVn7yrwKJ4WbOmcFnNhP76WXGmhvELBQ0dDdJi4EDFgJcoPVgmVrit fm/ZkkRWlKjGrVlRlqSazcIW2Jb+iOBILrl709JWKOsDzH0/mwwCuc4bv61MaIF401Ki i2J7J79UHL3iKDVUgozBuPhIhexAMFSeWwOBFTwQI0DC4IjIqNUYSKiY0iSk2AXEC5T9 vzNe3xObobiQcteKkE55m86AB+6T198O1rbXrEGvq9/JB/19amLlXqZ+Ox1BNtVszFNT K7XA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si8131632oig.25.2020.03.03.05.52.22; Tue, 03 Mar 2020 05:52:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729137AbgCCNuT (ORCPT + 99 others); Tue, 3 Mar 2020 08:50:19 -0500 Received: from inva021.nxp.com ([92.121.34.21]:42612 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728350AbgCCNuS (ORCPT ); Tue, 3 Mar 2020 08:50:18 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 50CA7200EF4; Tue, 3 Mar 2020 14:50:17 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BFBC2200A5C; Tue, 3 Mar 2020 14:50:14 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4CA8F402A7; Tue, 3 Mar 2020 21:50:11 +0800 (SGT) From: Anson Huang To: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V2] regulator: anatop: Lower error message level for -EPROBE_DEFER Date: Tue, 3 Mar 2020 21:44:12 +0800 Message-Id: <1583243052-1930-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devm_regulator_register() could return -EPROBE_DEFER when trying to get init data and NOT all resources are available at that time, for this case, error message is better to be present for debug level ONLY. Signed-off-by: Anson Huang --- Changes since V1: - lower the defer error message to debug level instead of dropping it. --- drivers/regulator/anatop-regulator.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 754739d..ca92b3d 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -305,9 +305,13 @@ static int anatop_regulator_probe(struct platform_device *pdev) /* register regulator */ rdev = devm_regulator_register(dev, rdesc, &config); if (IS_ERR(rdev)) { - dev_err(dev, "failed to register %s\n", - rdesc->name); - return PTR_ERR(rdev); + ret = PTR_ERR(rdev); + if (ret == -EPROBE_DEFER) + dev_dbg(dev, "failed to register %s, deferring...\n", + rdesc->name); + else + dev_err(dev, "failed to register %s\n", rdesc->name); + return ret; } platform_set_drvdata(pdev, rdev); -- 2.7.4