Messages in this thread | | | Subject | Re: [PATCH] clk: use ULONG_MAX as the initial value for the iteration in clk_mux_determine_rate_flags() | From | Stephen Boyd <> | Date | Mon, 24 Apr 2023 18:24:44 -0700 |
| |
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?
| |