public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hrtimer: Remove unused function hrtimer_hres_active
@ 2024-04-17  7:23 Jiapeng Chong
  2024-04-17 14:32 ` Anna-Maria Behnsen
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-04-17  7:23 UTC (permalink / raw)
  To: anna-maria; +Cc: frederic, tglx, linux-kernel, Jiapeng Chong, Abaci Robot

The function are defined in the hrtimer.c file, but not called
elsewhere, so delete the unused function.

kernel/time/hrtimer.c:653:19: warning: unused function 'hrtimer_hres_active'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8778
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 kernel/time/hrtimer.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index cae9d04b5584..bdaf23356d4b 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -650,11 +650,6 @@ static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
 		cpu_base->hres_active : 0;
 }
 
-static inline int hrtimer_hres_active(void)
-{
-	return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
-}
-
 static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
 				struct hrtimer *next_timer,
 				ktime_t expires_next)
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] hrtimer: Remove unused function hrtimer_hres_active
  2024-04-17  7:23 [PATCH] hrtimer: Remove unused function hrtimer_hres_active Jiapeng Chong
@ 2024-04-17 14:32 ` Anna-Maria Behnsen
  0 siblings, 0 replies; 2+ messages in thread
From: Anna-Maria Behnsen @ 2024-04-17 14:32 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: frederic, tglx, linux-kernel, Jiapeng Chong, Abaci Robot

Jiapeng Chong <jiapeng.chong@linux.alibaba.com> writes:

> The function are defined in the hrtimer.c file, but not called
> elsewhere, so delete the unused function.
>
> kernel/time/hrtimer.c:653:19: warning: unused function 'hrtimer_hres_active'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8778
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  kernel/time/hrtimer.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> index cae9d04b5584..bdaf23356d4b 100644
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -650,11 +650,6 @@ static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
>  		cpu_base->hres_active : 0;
>  }
>  
> -static inline int hrtimer_hres_active(void)
> -{
> -	return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
> -}
> -
>  static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
>  				struct hrtimer *next_timer,
>  				ktime_t expires_next)


Can you please rename __hrtimer_hres_active() to hrtimer_hres_active()
and remove the old hrtimer_hres_active() function?

Btw. you could add a

  Fixes: 82ccdf062a64 ("hrtimer: Remove unused function")

as the warning was introduced by removing the last (unused) callsite
__hrtimer_peek_ahead_timers().

Thanks,

	Anna-Maria

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

end of thread, other threads:[~2024-04-17 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-17  7:23 [PATCH] hrtimer: Remove unused function hrtimer_hres_active Jiapeng Chong
2024-04-17 14:32 ` Anna-Maria Behnsen

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