All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] opp: use list_del_init instead of list_del/INIT_LIST_HEAD
@ 2021-05-18  4:49 Yang Yingliang
  2021-05-20  4:03 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-05-18  4:49 UTC (permalink / raw)
  To: linux-kernel, linux-pm; +Cc: vireshk

Using list_del_init() instead of list_del() + INIT_LIST_HEAD()
to simpify the code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/opp/of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index c582a9ca397b..aa75a1caf08a 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -433,8 +433,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table)
 
 		/* All required opp-tables found, remove from lazy list */
 		if (!lazy) {
-			list_del(&opp_table->lazy);
-			INIT_LIST_HEAD(&opp_table->lazy);
+			list_del_init(&opp_table->lazy);
 
 			list_for_each_entry(opp, &opp_table->opp_list, node)
 				_required_opps_available(opp, opp_table->required_opp_count);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-20  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  4:49 [PATCH -next] opp: use list_del_init instead of list_del/INIT_LIST_HEAD Yang Yingliang
2021-05-20  4:03 ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.