]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 18 Apr 2022 19:27:48 +0000 (12:27 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 18 Apr 2022 19:27:48 +0000 (12:27 -0700)
commit540ac338d5575131d134d2c033f31b5d6d576c68
tree4ac43cc0295f0bf6fb914fc9d3a5be072b9e3f07
parent7c1ff7146b7a4474dff370af0c5a5d238a8ff6c6
uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request.

The result of the request computed in new_status was never returned to
the caller leaving new_status as a set-but-unused variable.  Removing
new_status leaves sc->previous_status as a write-only variable.
Removing sc->previous_status leaves current_status as a write-only
variable, so it collapses down to removing the entire
USB_ST_TRANSFERRED case.

Arguably, all of the support for UHID_SNES_STATUS_DT_RD should be
removed as it doesn't return anything to the caller.  If the request
should be fixed instead then this commit should be reverted and
new_status should be returned to whoever submitted the request.

Differential Revision: https://reviews.freebsd.org/D34840
sys/dev/usb/input/uhid_snes.c