genirq/timings: Fix next event index function
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 27 May 2019 20:55:14 +0000 (22:55 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 12 Jun 2019 08:47:03 +0000 (10:47 +0200)
commit619c1baa91b2820eae9ff5d89eb525df81ea7a5a
treee6ed9f8be8090fc55b7104a0225832dab5c2c5ff
parent43b98d876f89dce732f50b71607b6d2bbb8d8e6a
genirq/timings: Fix next event index function

The current code is luckily working with most of the interval samples
testing but actually it fails to correctly detect pattern repetition
breaking at the end of the buffer.

Narrowing down the bug has been a real pain because of the pointers,
so the routine is rewrittne by using indexes instead.

Fixes: bbba0e7c5cda "genirq/timings: Add array suffix computation code"
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: andriy.shevchenko@linux.intel.com
Link: https://lkml.kernel.org/r/20190527205521.12091-2-daniel.lezcano@linaro.org
kernel/irq/timings.c