Skip to contentSkip to conversation

OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc

PATCH Applied Karl Mehltretter 2 participants 2 messages Sep 11 – Oct 1 Operating performance points (OPP)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc

dev_pm_opp_get_of_node() returns NULL when the OPP is invalid, but its kernel-doc says "else 0 on success", which was never true. Say NULL.

Fixes e2f4b5f8dc59 ("PM / OPP: Implement dev_pm_opp_get_of_node()")
Assisted-by LLM
---
 drivers/opp/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/of.c +1 -1
index 2f3bbde9a9e1742a2d6b40be91a65d8fa7365bf3..ea93800795783f0595483742c0c10de42b25518a 100644
@@ -1409,7 +1409,7 @@ bool dev_pm_opp_of_has_required_opp(struct device *dev)
  * dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp
  * @opp:	opp for which DT node has to be returned for
  *
- * Return: DT node corresponding to the opp, else 0 on success.
+ * Return: DT node corresponding to the opp, else NULL.
  *
  * The caller needs to put the node with of_node_put() after using it.
  */
Applied
#1 lore raw
Quoted 15 lines · Karl Mehltretter

dev_pm_opp_get_of_node() returns NULL when the OPP is invalid, but its kernel-doc says "else 0 on success", which was never true. Say NULL.

Fixes e2f4b5f8dc59 ("PM / OPP: Implement dev_pm_opp_get_of_node()")
Assisted-by LLM
---
 drivers/opp/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/of.c +0 -0
index 2f3bbde9a9e1742a2d6b40be91a65d8fa7365bf3..ea93800795783f0595483742c0c10de42b25518a 100644

drivers/opp/of.c bool dev_pm_opp_of_has_required_opp(struct device *dev) · line 1415

Quoted 8 lines
drivers/opp/of.c +1 -1
@@ -1409,7 +1409,7 @@ bool dev_pm_opp_of_has_required_opp(struct device *dev)
  * dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp
  * @opp:	opp for which DT node has to be returned for
  *
- * Return: DT node corresponding to the opp, else 0 on success.
+ * Return: DT node corresponding to the opp, else NULL.
  *
  * The caller needs to put the node with of_node_put() after using it.
  */

Applied. Thanks.

Signature · 1 line
viresh