clk: scpi: fix return type of __scpi_dvfs_round_rate
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 18 May 2017 16:19:28 +0000 (17:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:15 +0000 (19:48 +0200)
commit82a19094f113b8177e920a48a4bb4cd1054c3142
tree122f0e2a0ff889b19bd1fd3a38424ae0b85eb2db
parent0a4546e716b200e47767f39ec44765884a6c6d63
clk: scpi: fix return type of __scpi_dvfs_round_rate

[ Upstream commit 7374aec95636ca39409545eba4ef5ff3125c2346 ]

The frequencies above the maximum value of signed integer(i.e. 2^31 -1)
will overflow with the current code.

This patch fixes the return type of __scpi_dvfs_round_rate from 'int'
to 'unsigned long'.

Fixes: cd52c2a4b5c4 ("clk: add support for clocks provided by SCP(System Control Processor)")
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/clk-scpi.c