Skip to content

Commit 0da04f8

Browse files
committed
Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull operating performance points (OPP) framework fixes for v5.14 from iresh Kumar: "This removes few WARN() statements from the OPP core." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Drop empty-table checks from _put functions opp: remove WARN when no valid OPPs remain
2 parents 7c60610 + c3ddfe6 commit 0da04f8

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

drivers/opp/core.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,9 +1856,6 @@ void dev_pm_opp_put_supported_hw(struct opp_table *opp_table)
18561856
if (unlikely(!opp_table))
18571857
return;
18581858

1859-
/* Make sure there are no concurrent readers while updating opp_table */
1860-
WARN_ON(!list_empty(&opp_table->opp_list));
1861-
18621859
kfree(opp_table->supported_hw);
18631860
opp_table->supported_hw = NULL;
18641861
opp_table->supported_hw_count = 0;
@@ -1944,9 +1941,6 @@ void dev_pm_opp_put_prop_name(struct opp_table *opp_table)
19441941
if (unlikely(!opp_table))
19451942
return;
19461943

1947-
/* Make sure there are no concurrent readers while updating opp_table */
1948-
WARN_ON(!list_empty(&opp_table->opp_list));
1949-
19501944
kfree(opp_table->prop_name);
19511945
opp_table->prop_name = NULL;
19521946

@@ -2056,9 +2050,6 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table)
20562050
if (!opp_table->regulators)
20572051
goto put_opp_table;
20582052

2059-
/* Make sure there are no concurrent readers while updating opp_table */
2060-
WARN_ON(!list_empty(&opp_table->opp_list));
2061-
20622053
if (opp_table->enabled) {
20632054
for (i = opp_table->regulator_count - 1; i >= 0; i--)
20642055
regulator_disable(opp_table->regulators[i]);
@@ -2178,9 +2169,6 @@ void dev_pm_opp_put_clkname(struct opp_table *opp_table)
21782169
if (unlikely(!opp_table))
21792170
return;
21802171

2181-
/* Make sure there are no concurrent readers while updating opp_table */
2182-
WARN_ON(!list_empty(&opp_table->opp_list));
2183-
21842172
clk_put(opp_table->clk);
21852173
opp_table->clk = ERR_PTR(-EINVAL);
21862174

@@ -2279,9 +2267,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table)
22792267
if (unlikely(!opp_table))
22802268
return;
22812269

2282-
/* Make sure there are no concurrent readers while updating opp_table */
2283-
WARN_ON(!list_empty(&opp_table->opp_list));
2284-
22852270
opp_table->set_opp = NULL;
22862271

22872272
mutex_lock(&opp_table->lock);

drivers/opp/of.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,9 @@ static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
964964
}
965965
}
966966

967-
/* There should be one of more OPP defined */
968-
if (WARN_ON(!count)) {
967+
/* There should be one or more OPPs defined */
968+
if (!count) {
969+
dev_err(dev, "%s: no supported OPPs", __func__);
969970
ret = -ENOENT;
970971
goto remove_static_opp;
971972
}

0 commit comments

Comments
 (0)