The branch main has been updated by christos:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9105ba047181a5b4a04046557d41849c92d6a787

commit 9105ba047181a5b4a04046557d41849c92d6a787
Author:     Christos Margiolis <chris...@freebsd.org>
AuthorDate: 2023-05-25 20:47:41 +0000
Commit:     Christos Margiolis <chris...@freebsd.org>
CommitDate: 2023-05-25 20:47:41 +0000

    ofw: remove redundant calls in ofwbus_attach()
    
    Since commit ecaecbc7d8bc212d8e854088106b3b21e631bb52, calling
    ofw_bus_gen_setup_devinfo() is redundant, as the call to
    device_set_ivars() now happens inside simplebus_add_device().
    
    Reviewed by:    markj
    Approved by:    markj (mentor)
    Differential Revision:  https://reviews.freebsd.org/D40271
---
 sys/dev/ofw/ofwbus.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index b35a3ce968e6..2b32d5a539c4 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -102,7 +102,6 @@ static int
 ofwbus_attach(device_t dev)
 {
        phandle_t node;
-       struct ofw_bus_devinfo obd;
 
        node = OF_peer(0);
 
@@ -126,12 +125,9 @@ ofwbus_attach(device_t dev)
        /*
         * Now walk the OFW tree and attach top-level devices.
         */
-       for (node = OF_child(node); node > 0; node = OF_peer(node)) {
-               if (ofw_bus_gen_setup_devinfo(&obd, node) != 0)
-                       continue;
+       for (node = OF_child(node); node > 0; node = OF_peer(node))
                simplebus_add_device(dev, node, 0, NULL, -1, NULL);
-               ofw_bus_gen_destroy_devinfo(&obd);
-       }
+
        return (bus_generic_attach(dev));
 }
 

Reply via email to