linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* clk: clk_round_rate() should return 0, not negative numbers, upon error
@ 2013-11-25 23:55 Paul Walmsley
  2013-11-26  0:01 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2013-11-25 23:55 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: Mike Turquette, Russell King


Update the documentation for clk_round_rate() to state that it should
return 0 rather than a negative error code when it encounters an
error.  This describes how the common clock framework currently works;
howeever, some clock code does not yet align to this.

This change is to prepare for returning unsigned values from
clk_round_rate().

Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
---
Applies on v3.13-rc1.

  include/linux/clk.h |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 9a6d04524b1a..ffbbb7b2de43 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -228,7 +228,7 @@ void devm_clk_put(struct device *dev, struct clk *clk);
   * @clk: clock source
   * @rate: desired clock rate in Hz
   *
- * Returns rounded clock rate in Hz, or negative errno.
+ * Returns rounded clock rate in Hz, or 0 upon error.
   */
  long clk_round_rate(struct clk *clk, unsigned long rate);


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

* Re: clk: clk_round_rate() should return 0, not negative numbers, upon error
  2013-11-25 23:55 clk: clk_round_rate() should return 0, not negative numbers, upon error Paul Walmsley
@ 2013-11-26  0:01 ` Russell King - ARM Linux
  2013-11-26  0:03   ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2013-11-26  0:01 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-kernel, linux-arm-kernel, Mike Turquette

On Mon, Nov 25, 2013 at 03:55:33PM -0800, Paul Walmsley wrote:
>
> Update the documentation for clk_round_rate() to state that it should
> return 0 rather than a negative error code when it encounters an
> error.  This describes how the common clock framework currently works;
> howeever, some clock code does not yet align to this.
>
> This change is to prepare for returning unsigned values from
> clk_round_rate().

You really ought to document why this is being changed here, to help
sell the change to parties who are not aware of the background.
Otherwise, it just looks like a gratuitous API change.

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

* Re: clk: clk_round_rate() should return 0, not negative numbers, upon error
  2013-11-26  0:01 ` Russell King - ARM Linux
@ 2013-11-26  0:03   ` Paul Walmsley
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2013-11-26  0:03 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-kernel, linux-arm-kernel, Mike Turquette

On 11/25/2013 04:01 PM, Russell King - ARM Linux wrote:
> On Mon, Nov 25, 2013 at 03:55:33PM -0800, Paul Walmsley wrote:
>> Update the documentation for clk_round_rate() to state that it should
>> return 0 rather than a negative error code when it encounters an
>> error.  This describes how the common clock framework currently works;
>> howeever, some clock code does not yet align to this.
>>
>> This change is to prepare for returning unsigned values from
>> clk_round_rate().
> You really ought to document why this is being changed here, to help
> sell the change to parties who are not aware of the background.
> Otherwise, it just looks like a gratuitous API change.

Will do and resend.

- Paul

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

end of thread, other threads:[~2013-11-26  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 23:55 clk: clk_round_rate() should return 0, not negative numbers, upon error Paul Walmsley
2013-11-26  0:01 ` Russell King - ARM Linux
2013-11-26  0:03   ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).