From patchwork Fri May 3 21:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10929207 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 DFE931395 for ; Fri, 3 May 2019 21:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D082428714 for ; Fri, 3 May 2019 21:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C491728796; Fri, 3 May 2019 21:22:34 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76AAD28714 for ; Fri, 3 May 2019 21:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=eO0zb7dXvM8bycMtwjXclLFvXdhaMytiPXKrjq6G46A=; b=kGWrhFZgTuEmqa kpDZMEf4ruqSnA4EQL9y2V1uJ4Ee/M8nKdCB0wuhEIIeCGg5TGy03nDQmC7a29oOc4YRzO4Tk0cJr lGTUXq12g08nLQilJT8Sv2P+YMiNBd5KgODKvnlDy9nsW8+QDIBp1u3+o0S8gcsDgq5QfRvsRL+Tl mDv0ID3xO5FCjunCPh/tqK14eza/Fa09u3b74kACW8KwkhYOswWXwlY4B90VQ2wVwVhD7ZaFx9p1H Ot9XdDj3wilxtQcBEZ9l595X7gP9JiP3tkWYdPg4ywPszXlt+H84tjwZ/o8Cpc+gDJe2Q9/g0TyTq 4/EOHWR0OPJiW/nhnVBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMfdU-00033g-Ex; Fri, 03 May 2019 21:22:28 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMfdQ-00032J-UL for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2019 21:22:26 +0000 Received: by mail-pf1-x441.google.com with SMTP id b3so3499330pfd.1 for ; Fri, 03 May 2019 14:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AZfe6Xnlp8VFcttQXUP5Y4s8do4K2Dab61b+eO+6utA=; b=Ywbl7kJHsqNmfa+P0RIOnALkQVqOBZ3rOjAKRARApKe6qorHXO9plEnJ/E6KwmYq9p zZLP1ryFyIwSpDYvxAgWBdgSVsDbm8/Y40/VsTq7CjRlcbtLl6TmN18VUjgl0m4+nbGn Y+IoChQEJB/RlVWi/5OUaY6N6KwVRUrqKLgH4= 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=AZfe6Xnlp8VFcttQXUP5Y4s8do4K2Dab61b+eO+6utA=; b=pZ+a7GxxbCSSgDsgrrzUkmlj7yyyzhP7+ldJZqImCxFoOE2iBa78mnXNhWUHClCNnE nl5Gby9qHwocipBSyRfxQHaDhALThB3p1T6Y95IjyuCD9axbSEepqRAChlW1V26BEc8F wz3baAQzJRTi/uXicHZ0M/1M8LFy35QjSFRNZBkP3sx36O/IoTrpZADzDtrWkGQfBMgX AVG+KSt11ReK8Hal5HhmsiEtODOH8/l9hrWMKOMau48XtVTr/sOGBW0vPS+8XrYVzCHL 1wbmnwAfQDjDQ+6hWZXpMGNgwV5PmG2zfZLDrCGmKMXuwofIqI5feKKzv71Slx2BClAG m8dw== X-Gm-Message-State: APjAAAXwxL9KeF5ieTz5XhDvv6G2RsXUNRjDopWhkzdG3qh5U5sr3uyS N38Fw+tDjVsJ3Ds2pUpzYPgTzg== X-Google-Smtp-Source: APXvYqxHbkpyVU3AFiwBC4zYibpjEWUdOnTxjcv/gquMISFOa13IJ3gYibHW3sbdWh1EyzOUBzcDlA== X-Received: by 2002:a62:3501:: with SMTP id c1mr14483708pfa.184.1556918542223; Fri, 03 May 2019 14:22:22 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id b77sm9206722pfj.99.2019.05.03.14.22.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 14:22:21 -0700 (PDT) From: Douglas Anderson To: Heiko Stuebner , Shawn Lin Subject: [PATCH] clk: rockchip: Don't yell about bad mmc phases when getting Date: Fri, 3 May 2019 14:22:08 -0700 Message-Id: <20190503212208.223232-1-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190503_142224_983995_7FE4176D X-CRM114-Status: GOOD ( 13.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hal@halemmerich.com, Stephen Boyd , Michael Turquette , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, mka@chromium.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP At boot time, my rk3288-veyron devices yell with 8 lines that look like this: [ 0.000000] rockchip_mmc_get_phase: invalid clk rate This is because the clock framework at clk_register() time tries to get the phase but we don't have a parent yet. While the errors appear to be harmless they are still ugly and, in general, we don't want yells like this in the log unless they are important. There's no real reason to be yelling here. We can still return -EINVAL to indicate that the phase makes no sense without a parent. If someone really tries to do tuning and the clock is reported as 0 then we'll see the yells in rockchip_mmc_set_phase(). Fixes: 4bf59902b500 ("clk: rockchip: Prevent calculating mmc phase if clock rate is zero") Signed-off-by: Douglas Anderson Reviewed-by: Heiko Stuebner --- drivers/clk/rockchip/clk-mmc-phase.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c index 026a26bb702d..dbec84238ecd 100644 --- a/drivers/clk/rockchip/clk-mmc-phase.c +++ b/drivers/clk/rockchip/clk-mmc-phase.c @@ -61,10 +61,8 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw) u32 delay_num = 0; /* See the comment for rockchip_mmc_set_phase below */ - if (!rate) { - pr_err("%s: invalid clk rate\n", __func__); + if (!rate) return -EINVAL; - } raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift);