From 3e0043876d00fd89a187e0a0c447db0ea03ab195 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 5 Mar 2025 17:02:39 +0000 Subject: [PATCH] Revert "OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized" This reverts commit 8532fd078d2a5286915d03bb0a0893ee1955acef which is commit b44b9bc7cab2967c3d6a791b1cd542c89fc07f0e upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I2ae4174ecb2214b5c1bc30b07970dd3468c1b43f Signed-off-by: Greg Kroah-Hartman --- drivers/opp/core.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 437283fe38fa..6f8d2c0b2064 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -119,15 +119,6 @@ static bool assert_clk_index(struct opp_table *opp_table, return opp_table->clk_count > index; } -/* - * Returns true if bandwidth table is large enough to contain the bandwidth index. - */ -static bool assert_bandwidth_index(struct opp_table *opp_table, - unsigned int index) -{ - return opp_table->path_count > index; -} - /** * dev_pm_opp_get_voltage() - Gets the voltage corresponding to an opp * @opp: opp for which voltage has to be returned for @@ -856,8 +847,7 @@ struct dev_pm_opp *dev_pm_opp_find_bw_ceil(struct device *dev, unsigned int *bw, unsigned long temp = *bw; struct dev_pm_opp *opp; - opp = _find_key_ceil(dev, &temp, index, true, _read_bw, - assert_bandwidth_index); + opp = _find_key_ceil(dev, &temp, index, true, _read_bw, NULL); *bw = temp; return opp; } @@ -888,8 +878,7 @@ struct dev_pm_opp *dev_pm_opp_find_bw_floor(struct device *dev, unsigned long temp = *bw; struct dev_pm_opp *opp; - opp = _find_key_floor(dev, &temp, index, true, _read_bw, - assert_bandwidth_index); + opp = _find_key_floor(dev, &temp, index, true, _read_bw, NULL); *bw = temp; return opp; }