From 765b73fca70319416ebc805fb971588147968696 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 28 Jan 2025 19:27:41 -0800 Subject: [PATCH] lib-plistc-add-shortcut-for-plist_requeue-fix tweak comment and code layout Cc: Ching-Chun (Jim) Huang Cc: I Hsin Cheng Signed-off-by: Andrew Morton --- lib/plist.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/plist.c b/lib/plist.c index 5071b1eb2a12..330febb4bd7d 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -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; } -- 2.47.3