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