From nobody Wed Apr 13 23:09:27 2022 X-Original-To: dev-commits-src-all@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 F2EB11B4093B; Wed, 13 Apr 2022 23:09:28 +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 4Kdyw82pfcz4lnZ; Wed, 13 Apr 2022 23:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891368; 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=z/48qAfeheI7NsadOkUW6FJlnhNYjg9JGfjhq6s5tL8=; b=M5FPeCnXK4sx+xkm63POGQG/yCRgS58sSvpbI3oG/xvvaDrCiO7gb9lh22l1IrPMRC1y11 YEryeXVWegWY8wNdWDsnrb9ZVb2ZIpXCwjyQ3zyiVEE/JM+ZHut7lJAX2nl7+m4GRuk/85 umKoD/fygZHdKJ16YtdA3TpWl/3ws6kgNwk7WAzjDjlOyasjmfwiB4eEgOIAlDNTJLpWSW RWuNBz5Bnf6PVzxcLiv4uIw+DwK3eqO1rWeeEBg+SBSpdVzVSlhtUwKGxsK/WOlq7jKlMV CXT9rcEcrrQY7m9QZStgIUYko7k7nbjFYm+oktdt9NSsFCOxUeGEv3S2EI03Xw== 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 EA18A15260; Wed, 13 Apr 2022 23:09:27 +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 23DN9Ruh074413; Wed, 13 Apr 2022 23:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23DN9Rul074412; Wed, 13 Apr 2022 23:09:27 GMT (envelope-from git) Date: Wed, 13 Apr 2022 23:09:27 GMT Message-Id: <202204132309.23DN9Rul074412@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: ffd8101e9313 - main - usb: Add a __usbdebug_used for variables only used under #ifdef USB_DEBUG. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ffd8101e93136667e974fe232f380d6330e15f60 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891368; 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=z/48qAfeheI7NsadOkUW6FJlnhNYjg9JGfjhq6s5tL8=; b=yJDooXc8Y/YDwXaV43/x16mpPpAeKM8CH8lqUfgUJL/WrTPcsT8unR2m5HRIqwes3B3nnW tXz0CEx2FmHA/QRcxiXbDCtxuxsX26QfeDXXrQMmdan+qa1KgxpQf6WUMScl57lFW8yWsS tSrkTsQUhhG/fmmNuF+n1+U/KuvygtCGTcGlNKTT3pPV0WuMs9Tj4qfC7Mht+fHgrEIF8q YiTX57o4HEdTtFi92wXo8dIHb/SEHQ8EdJGwO5NsxuSX86qAX5RirX/XYyhZXUMauhkcg1 OfsYXp4ui/iz9DWOoJhS7etZBo24reg0Qp7oPZ7WFn+jx9Z2LJwfasU4zZ6hcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649891368; a=rsa-sha256; cv=none; b=ebAifA8/NVNIocDwPxvkhkktA//oNPE7m5wLeEHzn/lQIwcdCQuscvjGxFzhofxMnIwuw9 WeIeOiGch15zPopvUZfw+rVJMlGK8S+S2XxUe7Emmm28h4aNSoPz7P+0eNRpDZUG1KbPqZ Oya5GaQFfZgrK98wCc64FJjlijcgxZprq1w5t0O3BvoemI3Vh61S7hSe/2T1T1snaohun/ Sy0A/9pNH9FdiGHJDd7HTd7JIZzDuFEwCpsL1xVK1iucUMFMdY0J6vR1m0H8JWGeZFek8x FIGWTurdJYHgpaK6z3UlUQu5CGpuBh6sPMmD7QUip5g4Cdwua3JyD8+FAG21xg== 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=ffd8101e93136667e974fe232f380d6330e15f60 commit ffd8101e93136667e974fe232f380d6330e15f60 Author: John Baldwin AuthorDate: 2022-04-13 23:08:20 +0000 Commit: John Baldwin CommitDate: 2022-04-13 23:08:20 +0000 usb: Add a __usbdebug_used for variables only used under #ifdef USB_DEBUG. Use it for various variables only used in DPRINTF debug traces conditional on USB_DEBUG. --- sys/dev/usb/controller/ohci.c | 2 +- sys/dev/usb/input/uep.c | 2 +- sys/dev/usb/net/if_cdce.c | 2 +- sys/dev/usb/usb_debug.h | 2 ++ sys/dev/usb/usb_msctest.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c index 7268af06a602..880e2e347619 100644 --- a/sys/dev/usb/controller/ohci.c +++ b/sys/dev/usb/controller/ohci.c @@ -1578,7 +1578,7 @@ ohci_setup_standard_chain(struct usb_xfer *xfer, ohci_ed_t **ed_last) static void ohci_root_intr(ohci_softc_t *sc) { - uint32_t hstatus; + uint32_t hstatus __usbdebug_used; uint16_t i; uint16_t m; diff --git a/sys/dev/usb/input/uep.c b/sys/dev/usb/input/uep.c index 5b96a31b1dee..5fece855e650 100644 --- a/sys/dev/usb/input/uep.c +++ b/sys/dev/usb/input/uep.c @@ -177,7 +177,7 @@ get_pkt_len(u_char *buf) static void uep_process_pkt(struct uep_softc *sc, u_char *buf) { - int32_t x, y; + int32_t x __usbdebug_used, y __usbdebug_used; #ifdef EVDEV_SUPPORT int touch; #endif diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index f3c73567b7ce..b5fa4944974c 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -1590,7 +1590,7 @@ cdce_ncm_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct usb_page_cache *pc = usbd_xfer_get_frame(xfer, 0); struct ifnet *ifp = uether_getifp(&sc->sc_ue); struct mbuf *m; - int sumdata; + int sumdata __usbdebug_used; int sumlen; int actlen; int aframes; diff --git a/sys/dev/usb/usb_debug.h b/sys/dev/usb/usb_debug.h index 87c0dcfe3d5f..9bcbaec70ef4 100644 --- a/sys/dev/usb/usb_debug.h +++ b/sys/dev/usb/usb_debug.h @@ -44,9 +44,11 @@ extern int usb_debug; } \ } while (0) #define DPRINTF(...) DPRINTFN(1, __VA_ARGS__) +#define __usbdebug_used #else #define DPRINTF(...) do { } while (0) #define DPRINTFN(...) do { } while (0) +#define __usbdebug_used __unused #endif #endif diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 5dcf8d151119..bf60e5852598 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -964,7 +964,7 @@ usb_error_t usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method) { struct bbb_transfer *sc; - usb_error_t err; + usb_error_t err __usbdebug_used; sc = bbb_attach(udev, iface_index, UICLASS_MASS); if (sc == NULL)