[PATCH 4/8] prom.c: use pSeries reconfig notifier

Nathan Lynch ntl at pobox.com
Fri Mar 11 12:37:53 EST 2005


On Thu, Mar 10, 2005 at 11:20:00AM -0600, John Rose wrote:
> Quick comment on this-
> 
> >  void of_add_node(struct device_node *np)
> >  {
> > -     int err;
> > -
> > -     /* This use of finish_node will be moved to a notifier so
> > -      * the error code can be used.
> > -      */
> > -     err = finish_node(np, NULL, of_finish_dynamic_node, 0, 0, 0);
> > -     if (err < 0)
> > -             return;
> > -
> >       write_lock(&devtree_lock);
> >       np->sibling = np->parent->child;
> >       np->allnext = allnodes;
> > @@ -1682,6 +1674,36 @@ void of_remove_node(const struct device_
> >       write_unlock(&devtree_lock);
> >  }
> 
> If I understand correctly, of_add_node() now simply adds the node to
> relevant lists and sets relational pointers to position it in the device
> tree.  The allocation and other setup has been moved out of the
> function.  Might it be more clear to rename it to of_attach_node() or
> something similar?  
> 

Yup, and perhaps rename of_remove_node to of_detach_node or similar,
since the semantics have changed slightly there also.


Nathan



More information about the Linuxppc64-dev mailing list