summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2026-10-20 15:39:38 +0200
committerUwe Kleine-König <ukleinek@kernel.org>2026-11-02 11:51:58 +0100
commit9ad5602d4943635ea2b3b73d1a720161f88da1a1 (patch)
treef772f5f60c8d983cf336bd8a21ca6176b3c51571 /scripts/Makefile.thinlto
parent83d417d19e62314b97800ae62482607880a8dfe1 (diff)
downloadlinux-next-9ad5602d4943635ea2b3b73d1a720161f88da1a1.tar.gz
linux-next-9ad5602d4943635ea2b3b73d1a720161f88da1a1.zip
pwm: tegra: Fix value discarding for duty and period
tegra_pwm_config() is called with u64 values passed for duty_ns and period_ns in tegra_pwm_apply(). Make these parameters u64 instead of int to not lose the upper bits for bigger values. If such a discard happens the values that are written to hardware become wrong, or (if the discarded period value becomes 0) a division by zero happens. Adapt the math functions accordingly to not let the now potentially bigger values result in overflows. While touching these, also limit the scope of the required_clk_rate variable. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/bug/linux-5c5b97d6-4da6-4d06-9dc7-957419dcd832 Fixes: fd3ddd4355c0 ("pwm: tegra: Implement .apply() callback") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Tested-by: Karl Mehltretter <kmehltretter@gmail.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Tested-by: Mikko Perttunen <mperttunen@nvidia.com> # Jetson AGX Thor (fan) Link: https://patch.msgid.link/20261020133938.191013-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions