Skip to contentSkip to conversation

clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

PATCH New Laurent Pinchart 5 participants 7 messages Jan 17, 2015 – Mar 3, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

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.

---
 drivers/clocksource/arm_arch_timer.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/clocksource/arm_arch_timer.c +7 -6
index 095c1774592c..3cbdd563a967 100644
@@ -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;
 	}
 
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

Quoted 8 lines · Laurent Pinchart

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.

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

Thanks
-- Daniel

Quoted 44 lines
---
  drivers/clocksource/arm_arch_timer.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
drivers/clocksource/arm_arch_timer.c +7 -6
index 095c1774592c..3cbdd563a967 100644
@@ -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;
  	}
 
Signature · 5 lines
  <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
#2 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

Hello,

Quoted 5 lines · On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
Quoted 4 lines · Laurent Pinchart

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.

Quoted 8 lines
Quoted 5 lines

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
<[email protected]>

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

Sudeep, Mark, ping ?

Quoted 45 lines
Quoted 45 lines

---

  drivers/clocksource/arm_arch_timer.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/drivers/clocksource/arm_arch_timer.c index 095c1774592c..3cbdd563a967 100644

drivers/clocksource/arm_arch_timer.c +4 -4
@@ -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)

drivers/clocksource/arm_arch_timer.c +3 -2
@@ -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;
  	}
Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

Quoted 11 lines · Laurent Pinchart

Hello,

Quoted 8 lines · On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
Quoted 7 lines · Laurent Pinchart

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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Signed-off-by: Laurent Pinchart
<[email protected]>

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

Sudeep, Mark, ping ?

Last call :)

Quoted 46 lines
Quoted 45 lines
Quoted 45 lines

---

   drivers/clocksource/arm_arch_timer.c | 13 +++++++------
   1 file changed, 7 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/drivers/clocksource/arm_arch_timer.c index 095c1774592c..3cbdd563a967 100644

drivers/clocksource/arm_arch_timer.c +4 -4
@@ -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)

drivers/clocksource/arm_arch_timer.c +3 -2
@@ -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;
   	}
Signature · 5 lines
  <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
#4 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

Quoted 15 lines · Daniel Lezcano
Quoted 14 lines · Laurent Pinchart

Hello,

Quoted 11 lines · On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
Quoted 9 lines · Laurent Pinchart

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
<[email protected]>

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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.
Quoted 48 lines
Quoted 46 lines
Quoted 45 lines
Quoted 45 lines

---

   drivers/clocksource/arm_arch_timer.c | 13 +++++++------
   1 file changed, 7 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/drivers/clocksource/arm_arch_timer.c index 095c1774592c..3cbdd563a967 100644

drivers/clocksource/arm_arch_timer.c +4 -4
@@ -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)

drivers/clocksource/arm_arch_timer.c +3 -2
@@ -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;
   	}
Signature · 1 line
Jazz is not dead. It just smells funny...
#5 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

In reply to Laurent Pinchart
Quoted 11 lines · Laurent Pinchart

Hello,

Quoted 8 lines · On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
Quoted 7 lines · Laurent Pinchart

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.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Signed-off-by: Laurent Pinchart
<[email protected]>

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.

Regards,
Sudeep

#6 lore raw

PATCH 1/1 clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour

Quoted 21 lines · Sudeep Holla
Quoted 18 lines · Laurent Pinchart

Hello,

Quoted 14 lines · On Sunday 25 January 2015 22:52:02 Daniel Lezcano wrote:
Quoted 10 lines · Laurent Pinchart

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
<[email protected]>

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

Quoted 7 lines
Quoted 2 lines

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.

I applied the patch for 4.1.

Thanks !
-- Daniel

Signature · 5 lines
  <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