Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbbDME4f (ORCPT ); Mon, 13 Apr 2015 00:56:35 -0400 Received: from mail-ig0-f180.google.com ([209.85.213.180]:33297 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbbDME4b convert rfc822-to-8bit (ORCPT ); Mon, 13 Apr 2015 00:56:31 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Chanwoo Choi , sboyd@codeaurora.org From: Michael Turquette In-Reply-To: <1427956836-31382-1-git-send-email-cw00.choi@samsung.com> Cc: linux-kernel@vger.kernel.org, "Chanwoo Choi" , Sylwester Nawrocki References: <1427956836-31382-1-git-send-email-cw00.choi@samsung.com> Message-ID: <20150413045624.19585.73264@quantum> User-Agent: alot/0.3.5 Subject: Re: [PATCH] clk: Show clock rate instead of return value Date: Sun, 12 Apr 2015 21:56:24 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1652 Lines: 44 +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... Regards, Mike > clk_put(clk); > } > index++; > -- > 1.8.5.5 > -- 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/