-
Sivaram Nair authored
BPMP firmware ABI expects the rate inputs in int64_t. However, tegra_bpmp_clk_round_rate() and tegra_bpmp_clk_set_rate() functions directly assign 'unsigned long' inputs to a int64_t value causing unexpected rounding errors. Fix this by clipping the input rate to S64_MAX. Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> [mperttunen: slight cleanup] Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: Sivaram Nair <sivaramn@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
a886c310