Page MenuHomeFreeBSD

ofw: remove redundant calls in ofwbus_attach()
ClosedPublic

Authored by christos on May 25 2023, 7:05 PM.
Tags
None
Referenced Files
F161274387: D40271.diff
Thu, Jul 2, 8:40 AM
F161233678: D40271.diff
Wed, Jul 1, 11:40 PM
Unknown Object (File)
Mon, Jun 29, 6:53 PM
Unknown Object (File)
Sat, Jun 27, 4:35 PM
Unknown Object (File)
May 13 2026, 12:31 AM
Unknown Object (File)
May 13 2026, 12:31 AM
Unknown Object (File)
May 13 2026, 12:25 AM
Unknown Object (File)
Apr 30 2026, 1:20 AM
Subscribers

Details

Summary

This patch improves the fix introduced in 38594ff9c0c9. Calling
ofw_bus_gen_setup_devinfo() is redundant when we are calling
simplebus_add_device().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 51690
Build 48581: arc lint + arc unit

Event Timeline

This seems ok, but a good commit message will explain the what and the why a bit more.

If you look at the revision where ofwbus_attach() was introduced, the code structure is similar, but there the _setup_dinfo call was not redundant. It returned a structure which becomes the ivars ("instance variables") of a child device. Today, that device_set_ivars() call happens in simplebus_add_device(). This change happened in commit ecaecbc7d8bc212d8e854088106b3b21e631bb52.

Approved, but I suggest expanding the commit message a bit.

This revision is now accepted and ready to land.May 25 2023, 8:19 PM
christos retitled this revision from ofw: remove useless calls in ofwbus_attach() to ofw: remove redundant calls in ofwbus_attach().May 25 2023, 8:46 PM