[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1319559968.14932.5.camel@Joe-Laptop>
Date: Tue, 25 Oct 2011 09:26:08 -0700
From: Joe Perches <joe@...ches.com>
To: pdeschrijver@...dia.com
Cc: Colin Cross <ccross@...roid.com>, Olof Johansson <olof@...om.net>,
Stephen Warren <swarren@...dia.com>,
Russell King <linux@....linux.org.uk>,
linux-tegra@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm/tegra: clk_get should not be fatal
On Tue, 2011-10-25 at 19:15 +0300, pdeschrijver@...dia.com wrote:
> The timer and rtc-timer clocks aren't gated by default, so there is no reason
> to crash the system if the dummy enable call failed.
[]
> diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
[]
> @@ -186,16 +186,20 @@ static void __init tegra_init_timer(void)
> int ret;
>
> clk = clk_get_sys("timer", NULL);
> - BUG_ON(IS_ERR(clk));
> - clk_enable(clk);
> + if (IS_ERR(clk))
> + pr_warning("Unable to get timer clock");
> + else
> + clk_enable(clk);
>
> /*
> * rtc registers are used by read_persistent_clock, keep the rtc clock
> * enabled
> */
> clk = clk_get_sys("rtc-tegra", NULL);
> - BUG_ON(IS_ERR(clk));
> - clk_enable(clk);
> + if (IS_ERR(clk))
> + pr_warning("Unable to get rtc-tegra clock");
> + else
> + clk_enable(clk);
Are these messages are really necessary?
Maybe just:
if (!IS_ERR(clk))
clk_enable(clk)
If these are really necessary, please use
pr_warn("Unable to get <foo>\n");
pr_warn and with a terminating newline.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists