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
F136449266: D26307.id76580.diff
Mon, Nov 17, 8:40 PM
Unknown Object (File)
Sat, Nov 15, 9:03 AM
Unknown Object (File)
Thu, Nov 13, 8:12 PM
Unknown Object (File)
Thu, Nov 13, 7:43 AM
Unknown Object (File)
Thu, Nov 13, 3:01 AM
Unknown Object (File)
Thu, Nov 13, 12:04 AM
Unknown Object (File)
Wed, Nov 12, 9:39 PM
Unknown Object (File)
Tue, Nov 11, 1:42 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 Passed
Unit
No Test Coverage
Build Status
Buildable 33352
Build 30661: arc lint + arc unit

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.