All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Simon Glass <sjg@chromium.org>
Cc: Walter Lozano <walter.lozano@collabora.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Dario Binacchi <dariobin@libero.it>,
	Jagan Teki <jagan@amarulasolutions.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Jesse T <mr.bossman075@gmail.com>
Subject: Re: [PATCH v2] clk: fix clk_get_rate() documentation
Date: Tue, 23 Nov 2021 23:01:57 -0500	[thread overview]
Message-ID: <20e951e0-fee0-e2da-9e15-9a35c9ec4181@gmail.com> (raw)
In-Reply-To: <20210214021718.2235342-1-giulio.benetti@benettiengineering.com>

On 2/13/21 9:17 PM, Giulio Benetti wrote:
> Improve clk_get_rate() @return documentation that otherwise is a bit
> ambiguous. At the moment I expect to return 0 as error since the return
> type is 'ulong', instead the function really returns negative value in
> case the corresponding function pointer is null and returns 0 if the clock
> is invalid.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
> V1->V2:
> * previous comment was wrong, this function returns negative value, so let's
>    improve it's @return documentation as suggested by Simon Glass
> ---
>   include/clk.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/clk.h b/include/clk.h
> index ca6b85fa6f..5a8c7244d0 100644
> --- a/include/clk.h
> +++ b/include/clk.h
> @@ -344,7 +344,8 @@ int clk_free(struct clk *clk);
>    *
>    * @clk:	A clock struct that was previously successfully requested by
>    *		clk_request/get_by_*().
> - * @return clock rate in Hz, or -ve error code.
> + * @return clock rate in Hz on success, 0 for invalid clock, or -ve error code
> + *	   for other errors.
>    */
>   ulong clk_get_rate(struct clk *clk);
>   
> 

Reviewed-by: Sean Anderson <seanga2@gmail.com>

  parent reply	other threads:[~2021-11-24  4:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 17:37 [PATCH] clk: fix clk_get_rate() documentation Giulio Benetti
2021-02-12 23:25 ` Sean Anderson
2021-02-13  1:17   ` Giulio Benetti
2021-02-13  4:17     ` Simon Glass
2021-02-13  8:47       ` Giulio Benetti
2021-02-13 18:24         ` Simon Glass
2021-02-14  2:05           ` Giulio Benetti
2021-02-14  2:17           ` [PATCH v2] " Giulio Benetti
2021-02-14  2:58             ` Jesse T
2021-02-14  3:17               ` Giulio Benetti
2021-02-14  3:49                 ` Jesse T
2021-02-22 19:13                   ` Heinrich Schuchardt
2021-02-23  0:25                     ` Giulio Benetti
2021-04-04 18:56                       ` Giulio Benetti
2021-11-24  4:01             ` Sean Anderson [this message]
2021-12-15 19:05             ` Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20e951e0-fee0-e2da-9e15-9a35c9ec4181@gmail.com \
    --to=seanga2@gmail.com \
    --cc=dariobin@libero.it \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=jagan@amarulasolutions.com \
    --cc=mr.bossman075@gmail.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=walter.lozano@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.