linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
Date: Sun, 25 Jan 2015 22:52:02 +0100	[thread overview]
Message-ID: <54C56582.6080809@linaro.org> (raw)
In-Reply-To: <1421488012-5098-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

On 01/17/2015 10:46 AM, Laurent Pinchart wrote:
> The arch_timer_probed function returns whether the given time doesn't
> need to be probed. This can be the case when the timer has been probed
> already, but also when it has no corresponding enabled node in DT.
>
> Rename the function to arch_timer_need_probe and invert its return value
> to better reflect the function's purpose and behaviour.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

I would like to have an ack from Sudeep or Mark (Cc'ed) before taking 
this patch.

Thanks
   -- Daniel

> ---
>   drivers/clocksource/arm_arch_timer.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index 095c1774592c..3cbdd563a967 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -660,17 +660,17 @@ static const struct of_device_id arch_timer_mem_of_match[] __initconst = {
>   };
>
>   static bool __init
> -arch_timer_probed(int type, const struct of_device_id *matches)
> +arch_timer_need_probe(int type, const struct of_device_id *matches)
>   {
>   	struct device_node *dn;
> -	bool probed = true;
> +	bool need_probe = false;
>
>   	dn = of_find_matching_node(NULL, matches);
>   	if (dn && of_device_is_available(dn) && !(arch_timers_present & type))
> -		probed = false;
> +		need_probe = true;
>   	of_node_put(dn);
>
> -	return probed;
> +	return need_probe;
>   }
>
>   static void __init arch_timer_common_init(void)
> @@ -679,9 +679,10 @@ static void __init arch_timer_common_init(void)
>
>   	/* Wait until both nodes are probed if we have two timers */
>   	if ((arch_timers_present & mask) != mask) {
> -		if (!arch_timer_probed(ARCH_MEM_TIMER, arch_timer_mem_of_match))
> +		if (arch_timer_need_probe(ARCH_MEM_TIMER,
> +					  arch_timer_mem_of_match))
>   			return;
> -		if (!arch_timer_probed(ARCH_CP15_TIMER, arch_timer_of_match))
> +		if (arch_timer_need_probe(ARCH_CP15_TIMER, arch_timer_of_match))
>   			return;
>   	}
>
>


-- 
  <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:[~2015-01-25 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-17  9:46 [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour Laurent Pinchart
2015-01-25 21:52 ` Daniel Lezcano [this message]
2015-03-01 13:00   ` Laurent Pinchart
2015-03-03 11:28     ` Daniel Lezcano
2015-03-03 11:34       ` Marc Zyngier
2015-03-03 11:56     ` Sudeep Holla
2015-03-03 15:41       ` 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=54C56582.6080809@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).