lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 05/18] software_node: Alter software_node_unregister_nodes() to unregister the array in reverse order
    On Mon, Nov 30, 2020 at 01:31:16PM +0000, Daniel Scally wrote:
    > Software nodes that are children of another software node should be
    > unregistered before their parent. To allow easy unregistering of an array
    > of software_nodes ordered parent to child, reverse the order in which
    > this function unregisters software_nodes.

    Should be folded in the previous patch. Otherwise we will have a history point
    where register() behaves differently to unregister().

    ...

    > + * @nodes: Zero terminated array of software nodes to be unregistered. If
    > + * parent pointers are set up in any of the software nodes then the array
    > + * MUST be ordered such that parents come before their children.

    Please, leave field description short. Rather add another note to the
    Description below.

    > *
    > * Unregister multiple software nodes at once.
    > *
    > - * NOTE: Be careful using this call if the nodes had parent pointers set up in
    > - * them before registering. If so, it is wiser to remove the nodes
    > - * individually, in the correct order (child before parent) instead of relying
    > - * on the sequential order of the list of nodes in the array.
    > + * NOTE: If you are uncertain whether the array is ordered such that
    > + * parents will be unregistered before their children, it is wiser to
    > + * remove the nodes individually, in the correct order (child before
    > + * parent).
    > */

    --
    With Best Regards,
    Andy Shevchenko


    \
     
     \ /
      Last update: 2020-11-30 18:48    [W:4.157 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site