From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-67.mta0.migadu.com [91.218.175.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 989591E98EF for ; Sat, 15 Aug 2026 09:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786787527; cv=none; b=K3pn3X6MdZkr1ijSVA+4DDIFKU/jp7IHXCxhR0030qhKeBjScsdUXHdTo0yrcMXpA3euJ5zcJX5G6PyhFbJMH4rxQkUBkZu56EPINvDigrO/M+XkOAbgGLsiRfByBK9lDt38ENBZXedJYdywaf125B8cOueEN8v5wZYeqC7FkqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786787527; c=relaxed/simple; bh=QWdTBcf0vqrmBmp4CDFL905KC/WN+kA12wxfTkcS118=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bvXW7jvsHV6zBqBh7c6vFAUdbmOHhUTw0J1+VRdiTzRNC80Mu3kNlTeMD6gH6bXZ7YoMAmmWncn/ZRuWIZ5RA11esNJouM0r62j17oOY/vyhMQ7OMGMCSdZPlImxQ1FAyd9Dc2wTQt3Akj33gW6g+8mkFTb7vuKb93kM21aVL1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ZYb1X65q; arc=none smtp.client-ip=91.218.175.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZYb1X65q" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=QWdTBcf0vqrmBmp4CDFL905KC/WN+kA12wxfTkcS118=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1786787523; v=1; x=1787392323; b=ZYb1X65qcLguhuHm0jlv6XV/mTnpKJbh3RahVNNn6wnguQhbxvMsD51sS4fiWTJ5ATIxI/sU bEdMPv1oEvpYFz+UmnN4GbWBxFXTmARobmzswQbWKhe+osjCvLE/rjU6rhdzyceYh7Rl7U0qfTy SCBIY1HrKf4A9ORge5d7QnsI= X-Envelope-To: linux-kernel@vger.kernel.org Received: from fedora.fritz.box (62.216.208.217) by mta11.migadu.com with ESMTPS id 5daa9b9628cb2088; Sat, 15 Aug 2026 09:51:53 +0000 X-Migadu-Flow: FLOW_OUT From: Thorsten Blum To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Yury Norov Cc: Thorsten Blum , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: intel: powerclamp: Drop redundant clamp() in duration_set() Date: Sat, 15 Aug 2026 11:51:41 +0200 Message-ID: <20260815095143.3821-2-thorsten.blum@linux.dev> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=788; i=thorsten.blum@linux.dev; h=from:subject; bh=QWdTBcf0vqrmBmp4CDFL905KC/WN+kA12wxfTkcS118=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFkNZutzfr0O9DUXEdB99JSn8WxY0dt5l3y/PikWlWzrf rxpyo6kjlIWBjEuBlkxRZYHs37M8C2tqdxkErETZg4rE8gQBi5OAZjIRwtGhl2dFnyfDEPMMk49 dT678obLlvlHqx7G7apefSFFM+PV0z+MDAsN+7/aPFeMy73G8zL/j8aBDH1P+fqydJWnL2X4v90 8zwgA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit duration_set() rejects any new_duration outside the valid range before the assignment, making the clamp() call redundant. Signed-off-by: Thorsten Blum --- 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: