[PATCH 4.19 287/313] HID: debug: fix the ring buffer implementation