* [PATCH] drm/nouveau/therm: remove unreachable fan update branch
@ 2026-07-02 19:45 Anas Khan
0 siblings, 0 replies; only message in thread
From: Anas Khan @ 2026-07-02 19:45 UTC (permalink / raw)
To: Lyude Paul, Danilo Krummrich; +Cc: dri-devel, nouveau, linux-kernel, Anas Khan
The fan re-scheduling logic sits inside an "if (target != duty)" block,
so by the time the inner if/else-if chain runs, duty can never equal
target. The "else if (duty == target)" branch is therefore dead code and
has been since it was introduced. Drop it; the two reachable cases
(duty > target and duty < target) are unchanged, so behaviour is
identical.
Signed-off-by: Anas Khan <anxkhn28@gmail.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c
index f8fa43c8a7d2..c4aaf7473065 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c
@@ -90,8 +90,6 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target)
if (duty > target)
delay = slow_down_period;
- else if (duty == target)
- delay = min(bump_period, slow_down_period) ;
else
delay = bump_period;
--
2.54.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-02 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 19:45 [PATCH] drm/nouveau/therm: remove unreachable fan update branch Anas Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®