[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210427093809.GU1463@shell.armlinux.org.uk>
Date: Tue, 27 Apr 2021 10:38:09 +0100
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH] clk: <linux/clk.h>: correct clk_get_parent()
documentation
On Mon, Apr 26, 2021 at 08:13:42PM -0700, Randy Dunlap wrote:
> Make the kernel-doc return value agree with both the stub implementation
> in <linux/clk.h> and the non-stub function in drivers/clk/clk.c.
>
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: linux-clk@...r.kernel.org
> ---
> There are several drivers that call clk_get_parent() and use its
> return value as though it returns an ERR_PTR(). I am working on a
> patch series to fix those.
The whole premise of the CLK API is that:
- clk values that IS_ERR() returns true are errors
- clk values that IS_ERR() returns false are valid
and that is that - nice, simple, easy to understand. So the
documentation is correct. If clk_get_parent() needs to return an
error, it does so by returning an error-pointer, not by returning
NULL.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists