From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732Ab3KTJJp (ORCPT ); Wed, 20 Nov 2013 04:09:45 -0500 Received: from mail-ea0-f182.google.com ([209.85.215.182]:44555 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312Ab3KTJJk (ORCPT ); Wed, 20 Nov 2013 04:09:40 -0500 Message-ID: <528C7C57.7000107@linaro.org> Date: Wed, 20 Nov 2013 10:09:43 +0100 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Linus Walleij , linux-kernel@vger.kernel.org, Thomas Gleixner , Stephen Warren Subject: Re: [PATCH] clksrc-of: warn if no clock sources are found References: <1384937936-14267-1-git-send-email-linus.walleij@linaro.org> In-Reply-To: <1384937936-14267-1-git-send-email-linus.walleij@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/20/2013 09:58 AM, Linus Walleij wrote: > Many platforms rely on clocksource_of_init() being implicitly > called for registering clock sources and will get zero warnings > if no working clock source is available. Let's print a critical > error message if no clock source is found. > > Acked-by: Lee Jones > Signed-off-by: Linus Walleij +1. Added Stephen Warren in Cc. > --- > drivers/clocksource/clksrc-of.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c > index 35639cf4e5a2..a30b42c3ac3b 100644 > --- a/drivers/clocksource/clksrc-of.c > +++ b/drivers/clocksource/clksrc-of.c > @@ -28,6 +28,7 @@ void __init clocksource_of_init(void) > struct device_node *np; > const struct of_device_id *match; > clocksource_of_init_fn init_func; > + unsigned clocksources = 0; > > for_each_matching_node_and_match(np, __clksrc_of_table, &match) { > if (!of_device_is_available(np)) > @@ -36,5 +37,8 @@ void __init clocksource_of_init(void) > init_func = match->data; > init_func(np); > of_node_put(np); > + clocksources++; > } > + if (!clocksources) > + pr_crit("%s: no matching clocksources found\n", __func__); > } > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog