[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190524135145.GW9224@smile.fi.intel.com>
Date: Fri, 24 May 2019 16:51:45 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/9] genirq/timings: Fix next event index function
On Fri, May 24, 2019 at 01:16:07PM +0200, Daniel Lezcano wrote:
> The current code was luckily working with most of the interval samples
> testing but actually it fails to correctly detect pattern repeatition
> breaking at the end of the buffer.
>
> Narrowing down the bug has been a real pain because of the pointers,
> so the routine is rewrite by using indexes instead.
Minor spelling issues below.
> + /*
> + * Move the beginnning pointer to the end minus the max period
Typo: beginning.
> + * x 3. We are at the point we can begin searching the pattern
"x 3." would be read better on the previous line.
> + */
> + buffer = &buffer[len - (period_max * 3)];
> + /*
> + * Adjust the length to the maximum allowed period x 3
> + */
One line?
> + len = period_max * 3;
> - for (i = period_max; i >= PREDICTION_PERIOD_MIN ; i--) {
> + for (period = period_max; period >= PREDICTION_PERIOD_MIN ; period--) {
At the same time you may drop extra white space.
> }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists