u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH] clk: fix clk_get_rate() documentation
Date: Sat, 13 Feb 2021 11:24:00 -0700	[thread overview]
Message-ID: <CAPnjgZ3kwsCoBDUSZqe6Bdqfu0NjLrTVCXGmatEzoXZsq1TpCw@mail.gmail.com> (raw)
In-Reply-To: <923AE82E-B5EF-4247-A439-E3B782CDFCD3@benettiengineering.com>

Hi Giulio,

On Sat, 13 Feb 2021 at 01:47, Giulio Benetti
<giulio.benetti@benettiengineering.com> wrote:
>
> Hi Simon, Sean,
>
> > Il giorno 13 feb 2021, alle ore 05:17, Simon Glass <sjg@chromium.org> ha scritto:
> >
> > ?On Fri, 12 Feb 2021 at 18:17, Giulio Benetti
> > <giulio.benetti@benettiengineering.com> wrote:
> >>
> >>> On 2/13/21 12:25 AM, Sean Anderson wrote:
> >>> On 2/10/21 12:37 PM, Giulio Benetti wrote:
> >>>> clk_get_rate() can't and doesn't return -ve on error, it actually returns 0
> >>>> on error or a value greater than 0 on success. So let's fix its
> >>>> documentation.
> >>>>
> >>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> >>>> ---
> >>>>   include/clk.h | 2 +-
> >>>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Sean has already given me a NAK because this function actually return negative values through a ulong return types.
> I didn?t check into clk-uclass.c and there if get_rate() pointer is not found then it returns a negative value.

Yes, wrong email...see below.

>
> Since it?s a bit ambiguous I?ve tried to find a different approach but nothing that easy came into my mind.

Something like this:

* @return clock rate in Hz, 0 for invalid clock, or -ve error code for
other error

You can use
Regards,
Simon

  reply	other threads:[~2021-02-13 18:24 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 [this message]
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
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=CAPnjgZ3kwsCoBDUSZqe6Bdqfu0NjLrTVCXGmatEzoXZsq1TpCw@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 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).