Re: [PATCH] thermal: intel: powerclamp: Drop redundant clamp() in duration_set()
From: Rafael J. Wysocki (Intel)
Date: Fri Sep 04 2026 - 10:46:56 EST
On Sat, Aug 15, 2026 at 11:51 AM Thorsten Blum <thorsten.blum@xxxxxxxxx> wrote:
>
> duration_set() rejects any new_duration outside the valid range before
> the assignment, making the clamp() call redundant.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> drivers/thermal/intel/intel_powerclamp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
> index bd7fd98dc310..1efdaabc4bb8 100644
> --- a/drivers/thermal/intel/intel_powerclamp.c
> +++ b/drivers/thermal/intel/intel_powerclamp.c
> @@ -94,7 +94,7 @@ static int duration_set(const char *arg, const struct kernel_param *kp)
> }
>
> mutex_lock(&powerclamp_lock);
> - duration = clamp(new_duration, 6ul, 25ul) * 1000;
> + duration = new_duration * 1000;
> mutex_unlock(&powerclamp_lock);
> exit:
>
Applied as 7.4 material, thanks!