Page MenuHomeFreeBSD

jedec_ts(4) is broken on stable/10
ClosedPublic

Authored by rpokala on Jan 26 2018, 12:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 12:57 PM
Unknown Object (File)
Tue, Nov 26, 9:56 AM
Unknown Object (File)
Tue, Nov 26, 9:41 AM
Unknown Object (File)
Sun, Nov 24, 4:56 PM
Unknown Object (File)
Tue, Nov 19, 6:44 PM
Unknown Object (File)
Tue, Nov 19, 5:11 PM
Unknown Object (File)
Tue, Nov 19, 10:04 AM
Unknown Object (File)
Tue, Nov 19, 7:28 AM
Subscribers

Details

Summary

jedec_ts(4) uses a sysctl format specifier of "IK4", to indicate that it
reports milliKelvin. However, sysctl(8) on stable/10 only knows about "IK",
without a numeric suffix, which represents deciKelvin.

Adjust the format specifier, and round the temperature value reported.

Test Plan

Load jedec_ts(4) on stable/10; note that the temperature reported is reasonable.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14702
Build 14825: arc lint + arc unit

Event Timeline

sys/dev/jedec_ts/jedec_ts.c
197

Would (temp + 500) / 1000 work just well here?

sys/dev/jedec_ts/jedec_ts.c
197

Yes, of course. That was the exact one-liner idiom I was thinking of, but couldn't remember at the time.

Use the obvious one-liner, which somehow escaped me at the time of the
original diff. Thanks, avg@!

LGTM.
Please fix the whitespace issue.

sys/dev/jedec_ts/jedec_ts.c
197

Thanks! Seems like indentation of this line is incorrect now (spaces vs tabs).

This revision is now accepted and ready to land.Jan 31 2018, 3:31 PM

Leading 8-space -> hard-tab. Whoops!

This revision now requires review to proceed.Jan 31 2018, 4:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 8 2018, 9:24 AM
This revision was automatically updated to reflect the committed changes.