From nobody Sun Jan 09 23:31:19 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 79A3E192ED52; Sun, 9 Jan 2022 23:31:20 +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 4JXCrl5d3Jz4vwJ; Sun, 9 Jan 2022 23:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8FC1B1AFB9; Sun, 9 Jan 2022 23:31:19 +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 209NVJs1074343; Sun, 9 Jan 2022 23:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 209NVJGZ074342; Sun, 9 Jan 2022 23:31:19 GMT (envelope-from git) Date: Sun, 9 Jan 2022 23:31:19 GMT Message-Id: <202201092331.209NVJGZ074342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 174d86a01bf6 - main - tws: fix "set but not used" in the tws driver 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: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 174d86a01bf69a042ff34902ecb6c4d490b36996 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641771080; 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=uFDvDDaqdA2xmJKoBz1TWAzwSXRcbUtKU3MU/MqVOOI=; b=hFR7AT2KtB2x7dkPrSDkbTInQD5KTUjvWolqt1zbFTzoJwiD50BEu/xmNjWSjW6nr/iP6N xBio9QyDqotZebgYtkEcdhgnwpRq+p+1MAr8fl/kkkDygXnrjFjcDnoWx15un19fJRg3yI VS4xCR+h2i9QoAVK6srXk6HTkWHgpHWwfajYoWc3RJWPK0RDzDaDx8fwyNzrbwJkylUgoZ AKloMxvADNBaPSPE0hHoUgNa2XQ2EtgehTIPelVl1oNp3sVh2ATPLGaZyhba7CE5elS60w mL2qv2vYZBx9gNbO9SXWl71wmkiZ1cVJciTTWTTrYjsSYKkiHeL+cblTgSRP/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641771080; a=rsa-sha256; cv=none; b=L/YON86ipVOoBqBIsAREv8+NHIYk6AbQFsAggZilj2wZ1RTU1yI+xDEGp8qxcZl7ohwdRn hDAmPil6kux3R3X2mnAzvtUnx4vmITg523OQcWzO8wl41WbOphBcqvRx1O16ZTwb8Hts9E tkU/7a4S2jxpmPjFiGUbjCmYZGoTjJS7tVl/aeZusEXngNvk/yf9wYOMc63Fk71RVbSNmn IV+oODl/2n8ZJylZZWg6mk0ME0iLTkMZeKczMPsaBri4AGQHQvncxk8jvo5hzB30BogX5u uYugdRfk62LZAVhSDQX0ETm+gUW9y2Vy0VTeKPeiRoHEHXfvFFLH6ywIsNsMcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=174d86a01bf69a042ff34902ecb6c4d490b36996 commit 174d86a01bf69a042ff34902ecb6c4d490b36996 Author: Robert Wing AuthorDate: 2022-01-09 23:28:08 +0000 Commit: Robert Wing CommitDate: 2022-01-09 23:28:08 +0000 tws: fix "set but not used" in the tws driver With __diagused, these warnings were still emitted since INVARIANTS was defined but TWS_DEBUG was not. Fixes: a21f086a3316 ("Fix "set but not used" in the tws driver") Differential Revision: https://reviews.freebsd.org/D33784 --- sys/dev/tws/tws.c | 2 +- sys/dev/tws/tws_hdm.c | 2 +- sys/dev/tws/tws_services.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index 00446252b2af..de7d20bf900b 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -349,7 +349,7 @@ tws_detach(device_t dev) { struct tws_softc *sc = device_get_softc(dev); int i; - u_int32_t reg __diagused; + u_int32_t reg __tws_debug; TWS_TRACE_DEBUG(sc, "entry", 0, 0); diff --git a/sys/dev/tws/tws_hdm.c b/sys/dev/tws/tws_hdm.c index 11d9320948a0..bebece529c97 100644 --- a/sys/dev/tws/tws_hdm.c +++ b/sys/dev/tws/tws_hdm.c @@ -82,7 +82,7 @@ void tws_display_ctlr_info(struct tws_softc *sc); int tws_init_ctlr(struct tws_softc *sc) { - u_int64_t reg __diagused; + u_int64_t reg __tws_debug; u_int32_t regh, regl; TWS_TRACE_DEBUG(sc, "entry", sc, sc->is64bit); diff --git a/sys/dev/tws/tws_services.h b/sys/dev/tws/tws_services.h index e0e5b756981a..079697e9b186 100644 --- a/sys/dev/tws/tws_services.h +++ b/sys/dev/tws/tws_services.h @@ -61,10 +61,12 @@ void tws_init_qs(struct tws_softc *sc); #endif #ifdef TWS_TRACE_DEBUG_ON + #define __tws_debug #define TWS_TRACE_DEBUG(sc, desc, val1, val2) \ tws_trace(__FILE__, __func__, __LINE__, sc, desc, \ (u_int64_t)val1, (u_int64_t)val2) #else + #define __tws_debug __unused #define TWS_TRACE_DEBUG(sc, desc, val1, val2) #endif