[U-Boot] [PATCH 2/2] clk: change the type of return value to long

Simon Glass sjg at chromium.org
Wed Jan 13 21:10:19 CET 2016


Hi Masahiro,

On 12 January 2016 at 00:40, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> The comments in include/clk.h state "or -ve error code" for these
> functions, and actually the functions return negative error code
> here and there.  Returning unsigned value is not suitable.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
>
>  drivers/clk/clk-uclass.c  |  8 ++++----
>  drivers/clk/clk_rk3036.c  |  6 +++---
>  drivers/clk/clk_rk3288.c  |  6 +++---
>  drivers/clk/clk_sandbox.c |  9 ++++-----
>  include/clk.h             | 16 ++++++++--------
>  5 files changed, 22 insertions(+), 23 deletions(-)

This limits us to about 2GHz which seems a bit dangerous. We are
starting to see things around that level. We can use IS_ERR_VALUE().

Regards,
Simon


More information about the U-Boot mailing list