Re: [PATCH v1 1/2] clk: composite: Fix handling of high clock rates
From: Andy Shevchenko
Date: Tue Oct 24 2023 - 07:17:48 EST
On Sat, May 20, 2023 at 08:57:16AM +0100, Christopher Obbard wrote:
> On Fri, 2023-05-19 at 21:05 +0200, Sebastian Reichel wrote:
...
> > - rate_diff = abs(req->rate - tmp_req.rate);
> > + if (req->rate >= tmp_req.rate)
> > + rate_diff = req->rate - tmp_req.rate;
> > + else
> > + rate_diff = tmp_req.rate - req->rate;
Btw, we have abs_diff() helper for this kind of cases.
--
With Best Regards,
Andy Shevchenko