Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH] clk: document that clk_get_parent() returns NULL
@ 2026-07-14 15:50 Dan Carpenter
  2026-07-16 14:23 ` Brian Masney
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-07-14 15:50 UTC (permalink / raw)
  To: Russell King
  Cc: linux-clk, linux-kernel, kernel-janitors, Viresh Kumar,
	Zhongqiu Han

The documentation in the clk.h file says that clk_get_parent() returns
error pointers but it doesn't.  It's also not consistent with the
comments next to the clk_get_parent() implementation which say that
it returns NULL when the clk is NULL.  Update the comments so they
are consistent and accurate and say that it returns NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 include/linux/clk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 998ba3f261da..aa93ce1fbf37 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -951,8 +951,8 @@ int clk_set_parent(struct clk *clk, struct clk *parent);
  * clk_get_parent - get the parent clock source for this clock
  * @clk: clock source
  *
- * Returns struct clk corresponding to parent clock source, or
- * valid IS_ERR() condition containing errno.
+ * Returns struct clk corresponding to parent clock source, or NULL
+ * if clk is NULL.
  */
 struct clk *clk_get_parent(struct clk *clk);
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: document that clk_get_parent() returns NULL
  2026-07-14 15:50 [PATCH] clk: document that clk_get_parent() returns NULL Dan Carpenter
@ 2026-07-16 14:23 ` Brian Masney
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Masney @ 2026-07-16 14:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Russell King, linux-clk, linux-kernel, kernel-janitors,
	Viresh Kumar, Zhongqiu Han

On Tue, Jul 14, 2026 at 06:50:18PM +0300, Dan Carpenter wrote:
> The documentation in the clk.h file says that clk_get_parent() returns
> error pointers but it doesn't.  It's also not consistent with the
> comments next to the clk_get_parent() implementation which say that
> it returns NULL when the clk is NULL.  Update the comments so they
> are consistent and accurate and say that it returns NULL.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-16 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 15:50 [PATCH] clk: document that clk_get_parent() returns NULL Dan Carpenter
2026-07-16 14:23 ` Brian Masney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox