All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH] clksrc-of: warn if no clock sources are found
Date: Wed, 20 Nov 2013 10:09:43 +0100	[thread overview]
Message-ID: <528C7C57.7000107@linaro.org> (raw)
In-Reply-To: <1384937936-14267-1-git-send-email-linus.walleij@linaro.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 <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+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__);
>   }
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2013-11-20  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  8:58 [PATCH] clksrc-of: warn if no clock sources are found Linus Walleij
2013-11-20  9:09 ` Daniel Lezcano [this message]
2013-11-25  8:54 ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528C7C57.7000107@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.