]> Gentwo Git Trees - linux/.git/commitdiff
lib-plistc-add-shortcut-for-plist_requeue-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 29 Jan 2025 03:27:41 +0000 (19:27 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 23 Feb 2025 06:26:11 +0000 (22:26 -0800)
tweak comment and code layout

Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: I Hsin Cheng <richard120310@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/plist.c

index 5071b1eb2a12358a147d5305deea390884b96e54..330febb4bd7d7be876e2d2642615ecc38d901e03 100644 (file)
@@ -171,12 +171,13 @@ void plist_requeue(struct plist_node *node, struct plist_head *head)
 
        plist_del(node, head);
 
-       /* After plist_del(), iter is the replacement of node
-        * , if node was on prio_list, then take shortcut to
-        * find node_next instead of looping.
+       /*
+        * After plist_del(), iter is the replacement of the node.  If the node
+        * was on prio_list, take shortcut to find node_next instead of looping.
         */
        if (!list_empty(&iter->prio_list)) {
-               iter = list_entry(iter->prio_list.next, struct plist_node, prio_list);
+               iter = list_entry(iter->prio_list.next, struct plist_node,
+                                 prio_list);
                node_next = &iter->node_list;
                goto queue;
        }