diff mbox series

[05/15] timers: Rename sleep_idle_range() to sleep_range_idle()

Message ID 20240904-devel-anna-maria-b4-timers-flseep-v1-5-e98760256370@linutronix.de (mailing list archive)
State New
Headers show
Series timers: Cleanup delay/sleep related mess | expand

Commit Message

Anna-Maria Behnsen Sept. 4, 2024, 1:04 p.m. UTC
sleep_idle_range() is a variant of sleep_range(). Both are using
sleep_range_state() as a base. To be able to find all the related functions
in one go, rename it sleep_idle_range() to sleep_range_idle().

No functional change.

Cc: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: damon@lists.linux.dev
Cc: linux-mm@kvack.org
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
 include/linux/delay.h | 2 +-
 mm/damon/core.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Frederic Weisbecker Sept. 6, 2024, 1:45 p.m. UTC | #1
Le Wed, Sep 04, 2024 at 03:04:55PM +0200, Anna-Maria Behnsen a écrit :
> sleep_idle_range() is a variant of sleep_range(). Both are using
> sleep_range_state() as a base. To be able to find all the related functions
> in one go, rename it sleep_idle_range() to sleep_range_idle().
> 
> No functional change.
> 
> Cc: SeongJae Park <sj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: damon@lists.linux.dev
> Cc: linux-mm@kvack.org
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
SeongJae Park Sept. 6, 2024, 4:25 p.m. UTC | #2
On Wed, 04 Sep 2024 15:04:55 +0200 Anna-Maria Behnsen <anna-maria@linutronix.de> wrote:

> sleep_idle_range() is a variant of sleep_range(). Both are using
> sleep_range_state() as a base. To be able to find all the related functions
> in one go, rename it sleep_idle_range() to sleep_range_idle().

Nit.  s/sleep_/usleep_/?

> 
> No functional change.
> 
> Cc: SeongJae Park <sj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: damon@lists.linux.dev
> Cc: linux-mm@kvack.org
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> ---
>  include/linux/delay.h | 2 +-
>  mm/damon/core.c       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/delay.h b/include/linux/delay.h
> index ff9cda975e30..2bc586aa2068 100644
> --- a/include/linux/delay.h
> +++ b/include/linux/delay.h
> @@ -68,7 +68,7 @@ static inline void usleep_range(unsigned long min, unsigned long max)
>  	usleep_range_state(min, max, TASK_UNINTERRUPTIBLE);
>  }
>  
> -static inline void usleep_idle_range(unsigned long min, unsigned long max)
> +static inline void usleep_range_idle(unsigned long min, unsigned long max)
>  {
>  	usleep_range_state(min, max, TASK_IDLE);
>  }
> diff --git a/mm/damon/core.c b/mm/damon/core.c
> index 7a87628b76ab..94fe2f1f9b0e 100644
> --- a/mm/damon/core.c
> +++ b/mm/damon/core.c
> @@ -1887,7 +1887,7 @@ static void kdamond_usleep(unsigned long usecs)
>  	if (usecs > 20 * USEC_PER_MSEC)
>  		schedule_timeout_idle(usecs_to_jiffies(usecs));
>  	else
> -		usleep_idle_range(usecs, usecs + 1);
> +		usleep_range_idle(usecs, usecs + 1);
>  }
>  
>  /* Returns negative error code if it's not activated but should return */


Other than the trivial nit,

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

> 
> -- 
> 2.39.2
> 
>
diff mbox series

Patch

diff --git a/include/linux/delay.h b/include/linux/delay.h
index ff9cda975e30..2bc586aa2068 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -68,7 +68,7 @@  static inline void usleep_range(unsigned long min, unsigned long max)
 	usleep_range_state(min, max, TASK_UNINTERRUPTIBLE);
 }
 
-static inline void usleep_idle_range(unsigned long min, unsigned long max)
+static inline void usleep_range_idle(unsigned long min, unsigned long max)
 {
 	usleep_range_state(min, max, TASK_IDLE);
 }
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 7a87628b76ab..94fe2f1f9b0e 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1887,7 +1887,7 @@  static void kdamond_usleep(unsigned long usecs)
 	if (usecs > 20 * USEC_PER_MSEC)
 		schedule_timeout_idle(usecs_to_jiffies(usecs));
 	else
-		usleep_idle_range(usecs, usecs + 1);
+		usleep_range_idle(usecs, usecs + 1);
 }
 
 /* Returns negative error code if it's not activated but should return */