Page MenuHomeFreeBSD

aw_clk_nm: fix incorrect use of abs()
ClosedPublic

Authored by avg on Sep 3 2020, 7:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 4 2024, 2:05 PM
Unknown Object (File)
Jan 17 2024, 8:43 PM
Unknown Object (File)
Dec 20 2023, 7:19 AM
Unknown Object (File)
Dec 10 2023, 10:19 PM
Unknown Object (File)
Nov 10 2023, 9:04 AM
Unknown Object (File)
Oct 9 2023, 8:02 AM
Unknown Object (File)
Sep 14 2023, 1:08 AM
Unknown Object (File)
Sep 6 2023, 9:56 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg requested review of this revision.Sep 3 2020, 7:37 AM

Thanks, I had no time to fix this.
abs is used on more clock drivers for allwinner so I think that adding the inline function to aw_clk.h would be better.

If this function to become more visible, do you think distance is still a good name?
Maybe something like freq_diff? Something else?
Thanks!

If this function to become more visible, do you think distance is still a good name?
Maybe something like freq_diff? Something else?
Thanks!

If this function to become more visible, do you think distance is still a good name?
Maybe something like freq_diff? Something else?
Thanks!

expose clk_freq_diff to other clk drivers

This revision is now accepted and ready to land.Sep 3 2020, 10:31 AM
This revision was automatically updated to reflect the committed changes.