Hi Geert-san,
> From: Geert Uytterhoeven, Sent: Monday, June 3, 2019 8:05 PM
<snip>
> > > > +{
> > > > + unsigned long periods, delays;
> > > > +
> > > > + periods = DIV_ROUND_UP(priv->clk_rate, cycles);
> > >
> > > Shouldn't the above be a division with rounding down (i.e. a plain C
> > > division), instead of a division with rounding up?
> >
> > I have no idea which is the correct way (rounding down vs rounding up here).
> > At least, I tried to use rounding down before submitting patch and then
> > the result seemed the same. So, I submitted this patch with rounding up
> > (because the next step also used rounding up...).
>
> If you round up periods, it will decrease the delay, which may become
> too small.
> If you round up delays, it will increase the delay, which doesn't hurt.
Thank you for your explanation in detail! I understood it.
Best regards,
Yoshihiro Shimoda