Page MenuHomeFreeBSD

acpi_system76: fix mis-spelled words and style headers
ClosedPublic

Authored by pouria on Fri, Mar 13, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 6, 7:59 AM
Unknown Object (File)
Sun, Apr 5, 1:19 PM
Unknown Object (File)
Wed, Mar 25, 2:36 AM
Unknown Object (File)
Tue, Mar 24, 11:19 AM
Unknown Object (File)
Sat, Mar 21, 7:09 PM
Unknown Object (File)
Sat, Mar 21, 10:58 AM
Unknown Object (File)
Fri, Mar 20, 6:58 AM
Unknown Object (File)
Fri, Mar 20, 3:05 AM
Subscribers

Details

Summary

Fixes: f87ba4522ec9e7 ("acpi_system76: Add support for ...")
Reported by: olce, jhb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/acpi_support/acpi_system76.c
31–35

Sort headers (but not sys/param.h, see style(9)).

40–41

Move this line up in the #include <sys/XXX.h> block.

41–42

Please regroup this #include <dev/XXX> with the other above.

I'd also put the <contrib/dev/XXX> group after the <dev/XXX> one.

129–132

While here, there's only one low threshold. I'd suggest also to change the knob name as indicated, at least if the level passed is easy to correlate to the charge level. "min" (or "minimum") sees more explicit than "low", even if that is their EC's terminology.

133–139

Same as above.

pouria marked 4 inline comments as done.

Thank you!
@olce done.

olce added inline comments.
sys/dev/acpi_support/acpi_system76.c
132

For another change/revision, but while here: It would be nice to have the unit of this value in the description (percentage?), as well as some check that the value is in range when setting (if the range can be reliably known; if not, just let setting fail, hopefully). For the latter, you can use either another type than SYSCTL_UINT or just add a range test in the handler for S76_CTRL_BCTL (set direction; same for S76_CTRL_BCTH).

This revision is now accepted and ready to land.Fri, Mar 13, 10:11 PM
sys/dev/acpi_support/acpi_system76.c
41–42

I can't. <dev/acpica/acpivar.h> requires <contrib/...> to be included first.

129–132

Done. Yes, it's their terminology.

132

Yes, it's in percentage. should I add " (percentage)" at the end of its description?
For input validation see below.

399–410

@olce I'm validating the sysctl inputs here.

sys/dev/acpi_support/acpi_system76.c
41–42

That's fine. I suspected such a problem.

132

Yes, that would be great.

399–410

Oh, right, missed that on second read (on first read I had seen it).

update sysctl descriptions.

This revision now requires review to proceed.Sat, Mar 14, 9:31 AM
This revision was not accepted when it landed; it landed in state Needs Review.Sat, Mar 14, 9:38 AM
This revision was automatically updated to reflect the committed changes.
pouria marked an inline comment as done.