[PATCH] clocksource/drivers/timer-rtl-otto: Make rttm_cs variable static

Krzysztof Kozlowski posted 1 patch 1 month ago
drivers/clocksource/timer-rtl-otto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] clocksource/drivers/timer-rtl-otto: Make rttm_cs variable static
Posted by Krzysztof Kozlowski 1 month ago
File-scope 'rttm_cs' is not used outside of this unit, so make it static
to silence sparse warning:

  timer-rtl-otto.c:228:16: warning: symbol 'rttm_cs' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/clocksource/timer-rtl-otto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-rtl-otto.c b/drivers/clocksource/timer-rtl-otto.c
index 6113d2fdd4de..dd236a7babee 100644
--- a/drivers/clocksource/timer-rtl-otto.c
+++ b/drivers/clocksource/timer-rtl-otto.c
@@ -225,7 +225,7 @@ static int rttm_enable_clocksource(struct clocksource *cs)
 	return 0;
 }
 
-struct rttm_cs rttm_cs = {
+static struct rttm_cs rttm_cs = {
 	.to = {
 		.flags	= TIMER_OF_BASE | TIMER_OF_CLOCK,
 	},
-- 
2.51.0
Re: [PATCH] clocksource/drivers/timer-rtl-otto: Make rttm_cs variable static
Posted by Daniel Lezcano 2 weeks ago
On Mon, Feb 16, 2026 at 12:03:07PM +0100, Krzysztof Kozlowski wrote:
> File-scope 'rttm_cs' is not used outside of this unit, so make it static
> to silence sparse warning:
> 
>   timer-rtl-otto.c:228:16: warning: symbol 'rttm_cs' was not declared. Should it be static?
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Applied, thanks

> ---
>  drivers/clocksource/timer-rtl-otto.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-rtl-otto.c b/drivers/clocksource/timer-rtl-otto.c
> index 6113d2fdd4de..dd236a7babee 100644
> --- a/drivers/clocksource/timer-rtl-otto.c
> +++ b/drivers/clocksource/timer-rtl-otto.c
> @@ -225,7 +225,7 @@ static int rttm_enable_clocksource(struct clocksource *cs)
>  	return 0;
>  }
>  
> -struct rttm_cs rttm_cs = {
> +static struct rttm_cs rttm_cs = {
>  	.to = {
>  		.flags	= TIMER_OF_BASE | TIMER_OF_CLOCK,
>  	},
> -- 
> 2.51.0
> 

--