[PATCH 4.20 324/352] HID: debug: fix the ring buffer implementation