On Thu, Jun 15, 2017 at 1:19 AM, Yong Zhi <yong.zhi@xxxxxxxxx> wrote: > A collection of routines that are mainly responsible > to calculate the acc parameters. > +static unsigned int ipu3_css_scaler_get_exp(unsigned int counter, > + unsigned int divider) > +{ > + unsigned int i = 0; > + > + while (counter <= divider / 2) { > + divider /= 2; > + i++; > + } > + > + return i; We have a lot of different helpers including one you may use instead of this function. It's *highly* recommended you learn what we have under lib/ (and not only there) in kernel bewfore submitting a new version. -- With Best Regards, Andy Shevchenko