The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] thermal: intel: powerclamp: Drop redundant clamp() in duration_set()
@ 2026-08-15  9:51 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-08-15  9:51 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Yury Norov
  Cc: Thorsten Blum, Rafael J. Wysocki, linux-pm, linux-kernel

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@linux.dev>
---
 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:
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-15  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15  9:51 [PATCH] thermal: intel: powerclamp: Drop redundant clamp() in duration_set() Thorsten Blum

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