Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbbDMIMU (ORCPT ); Mon, 13 Apr 2015 04:12:20 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:58192 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752298AbbDMIMR (ORCPT ); Mon, 13 Apr 2015 04:12:17 -0400 X-AuditID: cbfec7f5-b7f1e6d00000617c-f2-552b79ac1694 Message-id: <552B7A54.3070309@samsung.com> Date: Mon, 13 Apr 2015 10:12:04 +0200 From: Sylwester Nawrocki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-version: 1.0 To: Michael Turquette , Chanwoo Choi , sboyd@codeaurora.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: Show clock rate instead of return value References: <1427956836-31382-1-git-send-email-cw00.choi@samsung.com> <20150413045624.19585.73264@quantum> In-reply-to: <20150413045624.19585.73264@quantum> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xy7prKrVDDZ5sVbS4/uU5q8XlXXPY LJ5OuMhm8eNMN4sDi8flvl4mjzvX9rB59G1ZxejxeZNcAEsUl01Kak5mWWqRvl0CV8bck2wF X3kqXk5/xNzAuJmzi5GTQ0LARGLv1XfsELaYxIV769m6GLk4hASWMko0r/rECOF8YpSYc+Ii UBUHB6+AlsT6V7IgDSwCqhIN93aCNbMJGEr0Hu1jBCkRFYiQuH0ZbD6vgKDEj8n3WEBsEYFs iU/3FjKD2MwCChK/7m1iBbGFBRwlGldvBosLCeRILPyxBizOCTTy46qrzCAjmQXUJaZMyYVo lZfYvOYt8wRGgVlINsxCqJqFpGoBI/MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJCg/bqD cekxq0OMAhyMSjy8Hm7aoUKsiWXFlbmHGCU4mJVEeOsygUK8KYmVValF+fFFpTmpxYcYmTg4 pRoYWyentL18oeuo9mzn04c7vNibczl41O0uz9z/j+lrp3jes6k8vSv6ppw45/Fy8RuvZUve rlc/eK0wfM7WugbrK+32u55MMbQ+/s4qIiy4vCz2bLVX7qx8m1NxIa4SueZScit9C9lyUxvv f17xJfkXi+PrPS5mfN/nvOvZU/xImXdPf++Sg+otSizFGYmGWsxFxYkAl1wzujgCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1855 Lines: 48 Hello, On 13/04/15 06:56, Michael Turquette wrote: > +Sylwester > > Quoting Chanwoo Choi (2015-04-01 23:40:36) >> This patch shows the current clock rate instead of return value >> when clk_set_rate() return fail because log message means the clock rate. >> >> Cc: Mike Turquette >> Cc: Stephen Boyd >> Signed-off-by: Chanwoo Choi >> --- >> drivers/clk/clk-conf.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c >> index aad4796..fb1ee65 100644 >> --- a/drivers/clk/clk-conf.c >> +++ b/drivers/clk/clk-conf.c >> @@ -107,8 +107,8 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier) >> >> rc = clk_set_rate(clk, rate); >> if (rc < 0) >> - pr_err("clk: couldn't set %s clock rate: %d\n", >> - __clk_get_name(clk), rc); >> + pr_err("clk: couldn't set %s clock rate: %ld\n", >> + __clk_get_name(clk), clk_get_rate(clk)); > > Change seems OK, but what was Sylwester's original intent? We can always > look up the original/current rate in sysfs, but getting the error code > printed might be useful for debugging... Indeed, I thought it was more useful to have the error code shown here. Alternatively we could make it: pr_err("clk: couldn't set %s clock rate to %ld (%d)\n", __clk_get_name(clk), clk_get_rate(clk), rc); -- Thanks Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/