On Thu, 7 Jul 2022 17:11:00 +0200 Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Thu, Jul 07, 2022 at 04:53:52PM +0200, Marek Behún wrote: > > From: Pali Rohár <pali@xxxxxxxxxx> > > > > Use DIV_ROUND_CLOSEST() for more accurate baudrate calculation for > > ASYNC_SPD_CUST instead of rounding it just down. > > Why? What does this change or fix? To compute more accurate baudrate when given custom divisor. User requests a baudrate B. Application uses old API, so it computes divisor D for baudrate B. The driver then tries to compute back the requested baudrate B. To compute it back more accurately, rounding to closes value should be used. Marek