
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> mainline inclusion from mainline-v6.9-rc5 commit 7f1dd39aedfccf60772328c5b88d56dbd39954c3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IACTBX CVE: CVE-2024-40965 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- To be able to compile drivers using devm_clk_rate_exclusive_get() also on platforms without the common clk framework, add a dummy implementation that does the same as clk_rate_exclusive_get() in that case (i.e. nothing). Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/ Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240327073310.520950-2-u.kleine-koenig@pengutroni... Signed-off-by: Stephen Boyd <sboyd@kernel.org> Conflicts: include/linux/clk.h [context conflicts] Signed-off-by: dinglongwei <dinglongwei1@huawei.com> --- include/linux/clk.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/clk.h b/include/linux/clk.h index 3ad039b4056d..3e6d80036802 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -830,6 +830,11 @@ static inline int clk_rate_exclusive_get(struct clk *clk) return 0; } +static inline int devm_clk_rate_exclusive_get(struct device *dev, struct clk *clk) +{ + return 0; +} + static inline void clk_rate_exclusive_put(struct clk *clk) {} static inline int clk_enable(struct clk *clk) -- 2.17.1