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)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 1 Jun 2017 09:13:11 +0000 (02:13 -0700)
commit7374aec95636ca39409545eba4ef5ff3125c2346
treea27e5d91cdd7f3be460e69ede94d717c6d68c8cb
parent80b4ae7acea48774761a54ba8432206b20e4d8f1
clk: scpi: fix return type of __scpi_dvfs_round_rate

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>
drivers/clk/clk-scpi.c