Page MenuHomeFreeBSD

Use __containerof() instead of home-rolled versions.
ClosedPublic

Authored by jhb on Dec 11 2020, 9:26 PM.
Tags
None
Referenced Files
F136195718: D27582.diff
Sun, Nov 16, 2:59 PM
Unknown Object (File)
Fri, Nov 14, 12:40 PM
Unknown Object (File)
Sun, Nov 9, 5:48 AM
Unknown Object (File)
Sat, Nov 1, 8:19 AM
Unknown Object (File)
Sat, Oct 25, 5:47 PM
Unknown Object (File)
Sat, Oct 25, 5:43 PM
Unknown Object (File)
Sat, Oct 25, 3:59 PM
Unknown Object (File)
Sat, Oct 18, 8:23 PM
Subscribers

Diff Detail

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

Event Timeline

jhb requested review of this revision.Dec 11 2020, 9:26 PM

Might need to make sure stand/usb doesn't need __container_of() defined. It's not built by default.

This revision is now accepted and ready to land.Dec 11 2020, 10:29 PM

Just make sure stand/usb builds after this change too.

cd stand/usb
make all

That's it.

sys/dev/usb/controller/uhci.c
86 ↗(On Diff #80611)

There is no need for parenthesis around (bus). Macro arguments are already separated by comma!

Ditto for the other places too.

stand/usb builds ok for both this and the previous review.

sys/dev/usb/controller/uhci.c
86 ↗(On Diff #80611)

It is FreeBSD's style to always add parens around macro arguments in the macro's expansion.

jhb marked an inline comment as done.Dec 17 2020, 8:40 PM
jhb added inline comments.
sys/dev/usb/controller/uhci.c
86 ↗(On Diff #80611)

OTOH, it the lack of ()'s does seem consistent in these files.

This revision was automatically updated to reflect the committed changes.