[PATCH 4.14 19/35] HID: debug: fix the ring buffer implementation