[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c428d3a4466b1a608e3e8b2434e8d5d9.sboyd@kernel.org>
Date: Mon, 24 Apr 2023 18:24:44 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Michael Turquette <mturquette@...libre.com>,
Yang Xiwen via B4 Relay
<devnull+forbidden405.outlook.com@...nel.org>,
forbidden405@...look.com
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
Yang Xiwen <forbidden405@...look.com>
Subject: Re: [PATCH] clk: use ULONG_MAX as the initial value for the iteration in clk_mux_determine_rate_flags()
Quoting Yang Xiwen via B4 Relay (2023-04-21 08:56:38)
> From: Yang Xiwen <forbidden405@...look.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?
Powered by blists - more mailing lists