lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 1/2] clk: Add comment about __of_clk_get_by_name() error values
On Mon, Dec 03, 2018 at 11:13:08AM +0000, Phil Edworthy wrote:
> It's not immediately obvious from the code that failure to get a
> clock provider can return either -ENOENT or -EINVAL. Therefore, add
> a comment to highlight this.

> +/*
> + * Beware the return values when np is valid, but no clock provider is found.
> + * If name = NULL, the function returns -ENOENT.
> + * If name != NULL, the function returns -EINVAL. This is because __of_clk_get()

I would start new sentence from new line
(this will emphasize the possible variants)

* This is ...

Otherwise looks good to me:

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> + * is called even if of_property_match_string() returns an error.
> + */
> static struct clk *__of_clk_get_by_name(struct device_node *np,
> const char *dev_id,
> const char *name)
> --
> 2.17.1
>

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2018-12-03 14:31    [W:0.082 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site