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