From nobody Mon Apr 18 19:29:57 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 90FF811DD36E; Mon, 18 Apr 2022 19:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KhxpY3bNSz4bNN; Mon, 18 Apr 2022 19:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650310197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mmUViCFObUiN/8wZzV+rjgd8n0NkzuVpTu1ICxBAHVw=; b=D3TcbzcFe9q1oEc4QWnQGIkZPTjegOh2wobdn2lGCqnI4EkIRlVUfPEEjVfxrCsXaAevAx fCnAaS9cMGah6gELL9Nr2nho7A+tzuxNOCVqld/PdWVVVqmFMmH04SU9+l/UtoBtlg9L+S 69e7P2YN4EI5em4pGuGJpZ2j2dUILQpa5sEvDcL37hwTHf1u5UWmjV3X63qmlL0vpsYPcA kByh1xnJCcO7JvTWAOp0UOzoKGQvo/JNIByyiZtTdrHjzPjoo1gAXCqvVZ3I1qzm7XQo/H /1ci0pSXTCvRb+nC+F1aTJb7JDPnfdT61KXn+99J/idRpeR62N0qNSvQJwDQ7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B77718E43; Mon, 18 Apr 2022 19:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23IJTvwW016803; Mon, 18 Apr 2022 19:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23IJTvtt016802; Mon, 18 Apr 2022 19:29:57 GMT (envelope-from git) Date: Mon, 18 Apr 2022 19:29:57 GMT Message-Id: <202204181929.23IJTvtt016802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 540ac338d557 - main - uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 540ac338d5575131d134d2c033f31b5d6d576c68 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650310197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mmUViCFObUiN/8wZzV+rjgd8n0NkzuVpTu1ICxBAHVw=; b=Ewh4kkpjPh9fsyn32SHRwmJn3Lt8wLqKnOhCmBUU7blZh9U7Gtk7RqtD24Vs3AZYszyzsC sBw/tb0ZMBeTNzkhoZTZHJnzdrh/OOgKglpGZrhg2kz/5+c3fsXuGI9i2id6/1qFTZfZTF U4Jmhs/Ya0VKl6VNuYhGbxwfD9jLHMilzAl9pC2pbVCL2PXX+uitAVkJeh558JYtHb7C5j DLzqZ8Qk8C5LGs9lTdYSc7Sd6XL8mp177gCRqJ8KiAhTqZcZJwuQ3/mmDJktfmh7O+HRn0 ly5sLO0ds28XA8FeMm37OJjW+PKRwqP/2HhlsJxZ2rhNiSCwFtVJcsNFTf7rmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650310197; a=rsa-sha256; cv=none; b=G9Fq3Rljl58S0rhfbSE+dj2MVofCUyshIPW6GtkoxOdvwtaTZMVYVUsyTWeOOtWJz4tAK/ 0+SqZETtuEZSb3gh9+Pn7k6YUjJKT4STLIXZsDqnxxrpTUmEUROHvvYofeQbFSgZi5c5J3 Fh9c993zuwVQmU2taKpU/mySWYDkOLvdMpVSAwsjkkATo523KOYR9DdetJaGfJiSzDNjJr TMn0qEwBfhU5DOwWF7M5lElzmbnfoHvlFnWRkn9ME89HRjMeUaBcXuhlldd5CY4C3XdzPD GxLa1EHiWEXfdL3nli5hgqDoSepLucHB2MVdJtqTAOn3o9sIlabxo2iSK/Ypyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=540ac338d5575131d134d2c033f31b5d6d576c68 commit 540ac338d5575131d134d2c033f31b5d6d576c68 Author: John Baldwin AuthorDate: 2022-04-18 19:27:48 +0000 Commit: John Baldwin CommitDate: 2022-04-18 19:27:48 +0000 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 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 9bce3d10941f..d786b0e1f257 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -94,7 +94,6 @@ struct uhid_snes_softc { int sc_fflags; struct usb_fifo *sc_fifo_open[2]; uint8_t sc_zero_length_packets; - uint8_t sc_previous_status; uint8_t sc_iid; uint8_t sc_oid; uint8_t sc_fid; @@ -498,7 +497,6 @@ uhid_snes_status_callback(struct usb_xfer *transfer, usb_error_t error) struct uhid_snes_softc *sc = usbd_xfer_softc(transfer); struct usb_device_request req; struct usb_page_cache *pc; - uint8_t current_status, new_status; switch (USB_GET_STATE(transfer)) { case USB_ST_SETUP: @@ -517,13 +515,6 @@ uhid_snes_status_callback(struct usb_xfer *transfer, usb_error_t error) usbd_transfer_submit(transfer); break; - case USB_ST_TRANSFERRED: - pc = usbd_xfer_get_frame(transfer, 1); - usbd_copy_out(pc, 0, ¤t_status, 1); - new_status = current_status & ~sc->sc_previous_status; - sc->sc_previous_status = current_status; - break; - default: break; }