lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] clk: use ULONG_MAX as the initial value for the iteration in clk_mux_determine_rate_flags()
From
Date
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?

\
 
 \ /
  Last update: 2023-04-25 03:25    [W:0.023 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site