From patchwork Mon Oct 13 14:21:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 399213 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5208B14008C for ; Tue, 14 Oct 2014 01:26:58 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XdgWR-0005QG-QW; Mon, 13 Oct 2014 14:22:51 +0000 Received: from relay1.mentorg.com ([192.94.38.131]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XdgWH-0005MA-Tj for linux-arm-kernel@lists.infradead.org; Mon, 13 Oct 2014 14:22:42 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XdgVx-00051Z-GG from Vladimir_Zapolskiy@mentor.com ; Mon, 13 Oct 2014 07:22:21 -0700 Received: from eyas.fin.mentorg.com (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 13 Oct 2014 15:22:20 +0100 From: Vladimir Zapolskiy To: Subject: [PATCHv2 2/3] pwm: push up dynamic printk level on errors in of_pwm_get() Date: Mon, 13 Oct 2014 17:21:38 +0300 Message-ID: <1413210099-7862-4-git-send-email-vladimir_zapolskiy@mentor.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1413210099-7862-1-git-send-email-vladimir_zapolskiy@mentor.com> References: <1412956207-24008-1-git-send-email-vladimir_zapolskiy@mentor.com> <1413210099-7862-1-git-send-email-vladimir_zapolskiy@mentor.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.76] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141013_072242_014028_00249176 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [192.94.38.131 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Shawn Guo , Sascha Hauer , Thierry Reding , linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The changed three user messages on fault are printed under pr_debug(), however all of them are unrecoverable and result in failed pwm device registration, report this to a user. Signed-off-by: Vladimir Zapolskiy Cc: Lothar Waßmann Cc: Sascha Hauer Cc: Thierry Reding Cc: Shawn Guo --- Changes from v1 to v2: - corrected the proper kernel log level, thanks to Lothar Waßmann. drivers/pwm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 681d154..f6231c6 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -532,19 +532,19 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id) err = of_parse_phandle_with_args(np, "pwms", "#pwm-cells", index, &args); if (err) { - pr_debug("%s(): can't parse \"pwms\" property\n", __func__); + pr_err("%s(): can't parse \"pwms\" property\n", __func__); return ERR_PTR(err); } pc = of_node_to_pwmchip(args.np); if (IS_ERR(pc)) { - pr_debug("%s(): PWM chip not found\n", __func__); + pr_err("%s(): PWM chip not found\n", __func__); pwm = ERR_CAST(pc); goto put; } if (args.args_count != pc->of_pwm_n_cells) { - pr_debug("%s: wrong #pwm-cells for %s\n", np->full_name, + pr_err("%s: wrong #pwm-cells for %s\n", np->full_name, args.np->full_name); pwm = ERR_PTR(-EINVAL); goto put;