[PATCH 4.9 19/24] HID: debug: fix the ring buffer implementation