All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
@ 2015-01-17  9:46 Laurent Pinchart
  2015-01-25 21:52 ` Daniel Lezcano
  0 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2015-01-17  9:46 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 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;
 	}
 
-- 
Regards,

Laurent Pinchart

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  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
  2015-03-01 13:00   ` Laurent Pinchart
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Lezcano @ 2015-01-25 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  2015-01-25 21:52 ` Daniel Lezcano
@ 2015-03-01 13:00   ` Laurent Pinchart
  2015-03-03 11:28     ` Daniel Lezcano
  2015-03-03 11:56     ` Sudeep Holla
  0 siblings, 2 replies; 7+ messages in thread
From: Laurent Pinchart @ 2015-03-01 13:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
> 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.

Sudeep, Mark, ping ?

> > ---
> > 
> >   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;
> >   	}

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Lezcano @ 2015-03-03 11:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/01/2015 02:00 PM, Laurent Pinchart wrote:
> Hello,
>
> On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
>> 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.
>
> Sudeep, Mark, ping ?

Last call :)

>>> ---
>>>
>>>    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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  2015-03-03 11:28     ` Daniel Lezcano
@ 2015-03-03 11:34       ` Marc Zyngier
  0 siblings, 0 replies; 7+ messages in thread
From: Marc Zyngier @ 2015-03-03 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/03/15 11:28, Daniel Lezcano wrote:
> On 03/01/2015 02:00 PM, Laurent Pinchart wrote:
>> Hello,
>>
>> On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
>>> 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.
>>
>> Sudeep, Mark, ping ?
> 
> Last call :)

By Mark, I assume you mean Mark Rutland (which is oddly not CC-ed).

Adding him.

	M.

>>>> ---
>>>>
>>>>    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;
>>>>    	}
>>
> 
> 


-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  2015-03-01 13:00   ` Laurent Pinchart
  2015-03-03 11:28     ` Daniel Lezcano
@ 2015-03-03 11:56     ` Sudeep Holla
  2015-03-03 15:41       ` Daniel Lezcano
  1 sibling, 1 reply; 7+ messages in thread
From: Sudeep Holla @ 2015-03-03 11:56 UTC (permalink / raw)
  To: linux-arm-kernel



On 01/03/15 13:00, Laurent Pinchart wrote:
> Hello,
>
> On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
>> 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.
>
> Sudeep, Mark, ping ?
>

Looks fine to me. I just wanted to test on KVM which I had broke once
previously though this change is pretty straight forward and simple.

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour
  2015-03-03 11:56     ` Sudeep Holla
@ 2015-03-03 15:41       ` Daniel Lezcano
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Lezcano @ 2015-03-03 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/03/2015 12:56 PM, Sudeep Holla wrote:
>
>
> On 01/03/15 13:00, Laurent Pinchart wrote:
>> Hello,
>>
>> On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
>>> 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.
>>
>> Sudeep, Mark, ping ?
>>
>
> Looks fine to me. I just wanted to test on KVM which I had broke once
> previously though this change is pretty straight forward and simple.
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

I applied the patch for 4.1.

Thanks !
   -- Daniel


-- 
  <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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-03 15:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.