]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/core: Use clamp() helper in the stepwise governor
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 29 Jun 2022 15:10:11 +0000 (17:10 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 28 Jul 2022 15:29:47 +0000 (17:29 +0200)
commit960fc493e0a008c90f346dab1bfe8d9ca897b8d3
treec9afd7b59d84adf69216c64dedec4189439745d1
parent551ee30f66f0105f8da74eefe0962af1fee13430
thermal/core: Use clamp() helper in the stepwise governor

The code is actually clampling the next cooling device state using the
lowest and highest states of the thermal instance.

That code can be replaced by the clamp() macro which does exactly the
same. It results in a simpler routine to read.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20220629151012.3115773-1-daniel.lezcano@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/gov_step_wise.c