Skip to content

Commit

Permalink
opp: use list_del_init instead of list_del/INIT_LIST_HEAD
Browse files Browse the repository at this point in the history
Using list_del_init() instead of list_del() + INIT_LIST_HEAD()
to simpify the code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Yang Yingliang authored and Viresh Kumar committed May 20, 2021
1 parent 6efb943 commit ac9fd3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/opp/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac9fd3c

Please sign in to comment.