From patchwork Sun Oct 9 12:49:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 9368433 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 981E56048F for ; Sun, 9 Oct 2016 12:44:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88A4B28F53 for ; Sun, 9 Oct 2016 12:44:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A46E28F8E; Sun, 9 Oct 2016 12:44:26 +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=-6.9 required=2.0 tests=BAYES_00,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 72EE428F53 for ; Sun, 9 Oct 2016 12:44:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751708AbcJIMoW (ORCPT ); Sun, 9 Oct 2016 08:44:22 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:34034 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbcJIMoW (ORCPT ); Sun, 9 Oct 2016 08:44:22 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.192]) by lucky1.263xmail.com (Postfix) with ESMTP id 08D534F9; Sun, 9 Oct 2016 20:43:47 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED4: 1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id BCC8D38C; Sun, 9 Oct 2016 20:43:46 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: edubezval@gmail.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 860629UA9W; Sun, 09 Oct 2016 20:43:47 +0800 (CST) From: Shawn Lin To: Eduardo Valentin , Zhang Rui Cc: linux-pm@vger.kernel.org, Caesar Wang , linux-rockchip@lists.infradead.org, Heiko Stuebner , Shawn Lin Subject: [PATCH] thermal: rockchip: improve the warning log Date: Sun, 9 Oct 2016 20:49:18 +0800 Message-Id: <1476017358-26143-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no necessary to print warning agian and again if we don't add rockchip,grf for dt, otherwise I saw the following log when doning suspend-2-resume. We only need to print it once when parsing dt. It looks quite trivial but the log is apparently verbose. [ 26.615415] PM: early resume of devices complete after 1.539 msecs [ 26.622002] rk_tsadcv2_initialize: Missing rockchip,grf property [ 26.629359] rk_gmac-dwmac ff290000.ethernet: init for RGMII [ 26.639794] PM: resume of devices complete after 18.109 msecs [ 26.646925] Restarting tasks ... done. Signed-off-by: Shawn Lin Reviewed-by: Caesar Wang --- drivers/thermal/rockchip_thermal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index e227a9f..b811b0f 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -524,11 +524,6 @@ static void rk_tsadcv2_initialize(struct regmap *grf, void __iomem *regs, regs + TSADCV2_AUTO_PERIOD_HT); writel_relaxed(TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT, regs + TSADCV2_HIGHT_TSHUT_DEBOUNCE); - - if (IS_ERR(grf)) { - pr_warn("%s: Missing rockchip,grf property\n", __func__); - return; - } } /** @@ -971,6 +966,8 @@ static int rockchip_configure_from_dt(struct device *dev, * need this property. */ thermal->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); + if (IS_ERR(thermal->grf)) + dev_warn(dev, "Missing rockchip,grf property\n"); return 0; }