]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
aw_clk_nm: fix incorrect use of abs()
authorAndriy Gapon <avg@FreeBSD.org>
Mon, 7 Sep 2020 06:27:18 +0000 (06:27 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Mon, 7 Sep 2020 06:27:18 +0000 (06:27 +0000)
commitc3a7328be8b3269c49e3aa1fe29783f0c21d1e55
tree1fbd7915411004daa036e3c80f03ce29c5c63034
parent04bd07fd15e83b244a227c55726a433304d02641
aw_clk_nm: fix incorrect use of abs()

abs() takes a (signed) int as input.
Instead, it was used with unsigned 64-bit integers.

So, add and use a new helper function to calculate a difference between
two uint64_t-s.

Reviewed by: manu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26307
sys/arm/allwinner/clkng/aw_clk_nm.c
sys/dev/extres/clk/clk.h