* [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 related [flat|nested] 2+ messages in thread
* Re: [PATCH] clocksource/timer-imx-tpm: define tpm_read_sched_clock() conditionally for arm
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
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2022-03-05 22:30 UTC (permalink / raw)
To: trix, tglx, shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: linux-kernel, linux-arm-kernel
Hi,
thanks for your patch.
It was already fixed by:
https://lore.kernel.org/r/20220303184212.2356245-1-nathan@kernel.org
On 05/03/2022 21:56, trix@redhat.com wrote:
> 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)
--
<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] 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;
as well as URLs for NNTP newsgroup(s).