From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
Yang Xiwen via B4 Relay
<devnull+forbidden405.outlook.com@kernel.org>,
forbidden405@outlook.com
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Yang Xiwen <forbidden405@outlook.com>
Subject: Re: [PATCH] clk: use ULONG_MAX as the initial value for the iteration in clk_mux_determine_rate_flags()
Date: Mon, 24 Apr 2023 18:24:44 -0700 [thread overview]
Message-ID: <c428d3a4466b1a608e3e8b2434e8d5d9.sboyd@kernel.org> (raw)
In-Reply-To: <20230421-clk-v1-1-bb503f2f2cf3@outlook.com>
Quoting Yang Xiwen via B4 Relay (2023-04-21 08:56:38)
> From: Yang Xiwen <forbidden405@outlook.com>
>
> Currently, clk_mux_determine_rate_flags() use 0 as the initial value for
> selecting the best matching parent. However, this will choose a
> non-existant rate(0) if the requested rate is closer to 0 than the
> minimum rate the parents have.
>
> Fix that by initializing the initial value to ULONG_MAX and treat it as a
> magic number.
Can you add a unit test to clk_test.c as well?
prev parent reply other threads:[~2023-04-25 1:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 15:56 Yang Xiwen via B4 Relay
2023-04-25 1:24 ` Stephen Boyd [this message]
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=c428d3a4466b1a608e3e8b2434e8d5d9.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=devnull+forbidden405.outlook.com@kernel.org \
--cc=forbidden405@outlook.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®