Skip to contentSkip to conversation

clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM

PATCH Applied Nathan Chancellor 4 participants 4 messages Mar 3, 2022 – Mar 14, 2022

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

PATCH 1/1 clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM

When building this driver for an architecture other than ARCH=arm:

drivers/clocksource/timer-imx-tpm.c:78:20: error: unused function 'tpm_read_sched_clock' [-Werror,-Wunused-function] static u64 notrace tpm_read_sched_clock(void)

                     ^

1 error generated.

Move the function definition under the existing CONFIG_ARM section so there is no more warning.

Fixes 10720e120e2b ("clocksource/drivers/imx-tpm: Exclude sched clock for ARM64")
---
 drivers/clocksource/timer-imx-tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
index 60cefc247b71..bd64a8a8427f 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)

base-commit: b22a1c270f533e30bc5d5d4cab6199a2cbb07b07

Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines

Subject: [PATCH -next] clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM

When building this driver for an architecture other than ARCH=arm:

drivers/clocksource/timer-imx-tpm.c:78:20: error: unused function
'tpm_read_sched_clock' [-Werror,-Wunused-function]
static u64 notrace tpm_read_sched_clock(void)

                     ^
Quoted 8 lines

1 error generated.

Move the function definition under the existing CONFIG_ARM section so there is no more warning.

Fixes 10720e120e2b ("clocksource/drivers/imx-tpm: Exclude sched clock for

ARM64")

Quoted 26 lines
---
 drivers/clocksource/timer-imx-tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
index 60cefc247b71..bd64a8a8427f 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)
 

base-commit: b22a1c270f533e30bc5d5d4cab6199a2cbb07b07 --
2.35.1

#2 lore raw
In reply to Nathan Chancellor
Quoted 5 lines · Nathan Chancellor

When building this driver for an architecture other than ARCH=arm:

drivers/clocksource/timer-imx-tpm.c:78:20: error: unused function 'tpm_read_sched_clock' [-Werror,-Wunused-function] static u64 notrace tpm_read_sched_clock(void)

                      ^
Quoted 8 lines

1 error generated.

Move the function definition under the existing CONFIG_ARM section so there is no more warning.

Fixes 10720e120e2b ("clocksource/drivers/imx-tpm: Exclude sched clock for ARM64")

---

Applied, thx

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
#3 lore raw
In reply to Nathan Chancellor
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     bf127df3cceada8693888fc86a3121c38ef25701
Gitweb:        https://git.kernel.org/tip/bf127df3cceada8693888fc86a3121c38ef25701
Author:        Nathan Chancellor <[email protected]>
AuthorDate:    Thu, 03 Mar 2022 11:42:12 -07:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Mon, 07 Mar 2022 18:27:22 +01:00

clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM

When building this driver for an architecture other than ARCH=arm:

drivers/clocksource/timer-imx-tpm.c:78:20: error: unused function 'tpm_read_sched_clock' [-Werror,-Wunused-function] static u64 notrace tpm_read_sched_clock(void)

                     ^

1 error generated.

Move the function definition under the existing CONFIG_ARM section so there is no more warning.

Fixes 10720e120e2b ("clocksource/drivers/imx-tpm: Exclude sched clock for ARM64")
---
 drivers/clocksource/timer-imx-tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
index 60cefc2..bd64a8a 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)