Skip to contentSkip to conversation

clocksource/timer-imx-tpm: define tpm_read_sched_clock() conditionally for arm

PATCH In review [email protected] 2 participants 2 messages Mar 5, 2022

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

PATCH 1/1 clocksource/timer-imx-tpm: define tpm_read_sched_clock() conditionally for arm

From: Tom Rix <[email protected]>

On aarch64 allyesconfig there is this error timer-imx-tpm.c:78:20: error: 'tpm_read_sched_clock'
defined but not used [-Werror=unused-function]
78 | static u64 notrace tpm_read_sched_clock(void)

      |                    ^~~~~~~~~~~~~~~~~~~~

tpm_read_sched_clock() is only used conditionally
for arm. So also define conditionally for arm.

---
 drivers/clocksource/timer-imx-tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
index 60cefc247b715..bd64a8a8427f3 100644
@@ -73,12 +73,12 @@ static unsigned long tpm_read_current_timer(void)
 {
 	return tpm_read_counter();
 }
-#endif
 
 static u64 notrace tpm_read_sched_clock(void)
 {
 	return tpm_read_counter();
 }
+#endif
 
 static int tpm_set_next_event(unsigned long delta,
 				struct clock_event_device *evt)
Signature · 1 line
2.26.3
#1 lore raw

Hi,

thanks for your patch.

It was already fixed by:

https://lore.kernel.org/r/[email protected]

Quoted 34 lines · On 05/03/2022 21:56, [email protected] wrote:

From: Tom Rix <[email protected]>

On aarch64 allyesconfig there is this error timer-imx-tpm.c:78:20: error: 'tpm_read_sched_clock'
defined but not used [-Werror=unused-function]
78 | static u64 notrace tpm_read_sched_clock(void)
| ^~~~~~~~~~~~~~~~~~~~

tpm_read_sched_clock() is only used conditionally
for arm. So also define conditionally for arm.

---
  drivers/clocksource/timer-imx-tpm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
index 60cefc247b715..bd64a8a8427f3 100644
@@ -73,12 +73,12 @@ static unsigned long tpm_read_current_timer(void)
  {
  	return tpm_read_counter();
  }
-#endif
 
  static u64 notrace tpm_read_sched_clock(void)
  {
  	return tpm_read_counter();
  }
+#endif
 
  static int tpm_set_next_event(unsigned long delta,
  				struct clock_event_device *evt)
Signature · 10 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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel