mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/timer-imx-tpm: define tpm_read_sched_clock() conditionally for arm
@ 2022-03-05 20:56 trix
  2022-03-05 22:30 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2022-03-05 20:56 UTC (permalink / raw)
  To: daniel.lezcano, tglx, shawnguo, s.hauer, kernel, festevam, linux-imx
  Cc: linux-kernel, linux-arm-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/clocksource/timer-imx-tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c
index 60cefc247b715..bd64a8a8427f3 100644
--- a/drivers/clocksource/timer-imx-tpm.c
+++ b/drivers/clocksource/timer-imx-tpm.c
@@ -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)
-- 
2.26.3


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

end of thread, other threads:[~2022-03-05 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-05 20:56 [PATCH] clocksource/timer-imx-tpm: define tpm_read_sched_clock() conditionally for arm trix
2022-03-05 22:30 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®