From nobody Wed Jun 3 16:00:49 2026 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 4gVsqk0V59z6g8DY for ; Wed, 03 Jun 2026 16:00:50 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gVsqj5CgBz3pbG for ; Wed, 03 Jun 2026 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780502449; 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=H7/N7fmGp/acsl4XzW6QU+0O/VOaBS1CWByE7VK/IBg=; b=dcvERm6GbH4FgHZn4PykDolF3dTJL7IlJfeWvscrv7Jr5ENWzle1uUaM2vyVMQWNcQXvcz sA7a1Z7A4lOGuTQQ1ls4A/oNSKq1iLULsFRDBoYF/lBU+PTuKKNeJlYzk/jv0OEIBJTkFt NVnndCaUbzkl99+WK7fflXQyBa1iaEhDhAXNXSkSukpjabo3CMI0NBDx9FgLhTOPju8mBt G6f/924D3vGEJokfXTKWtNlCkuzn66IFznYoAX35OvkxWKkkqGzedFe6l//K2+npfDHiRl g14a7AS2wcNlPc0FOXyxsA8kyDZaBfXVuuYHP5LyWFKF7YCBpV6Ugh6g7IS1Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780502449; a=rsa-sha256; cv=none; b=EF9eZE9++MfPO6y7vDsi6BnveaohQgJHZcvPwLmwDAcM7yMJEawovk6hu4j+fFnQQrxtlS YcUw+rfWpI9KALuUEdNZemHRwCPTFCjJlWyPcEVm3iZdaLOc771CZEyAmTfHwb6PTRmXA5 SS0nqqtlripQJLSFJbII70Au2v0rQtIBcQjEFOjclcDc0MZyQv8dzAL/Q1doM7PC6+c+xM OeVtbqQ5lhlrTq1bQ/iuJQEcIt2tV/29Cms4upPGbPhF7FH0HuzOIcW+gc903uRBxsIZ1i /1zvnHM2NmAWV6q1GE1j0ElD3iUiAyBxjCBc9BLvjnggCw2Mt+leXfgc2hTp6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780502449; 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=H7/N7fmGp/acsl4XzW6QU+0O/VOaBS1CWByE7VK/IBg=; b=wmF1QAufemKUbMP9mllmGicioY1ohFeRgRco2eUIjypkc6ciwjvAWPThF2UIYtU/XffatM FOwkfh8DdoYYxjgpZY9/CcK+uOow+dPvAn1k4T93mWllBcu3+efN1pRlfiugYKenFIQ01O OC31mjz7r5tHRCRA91CkzN3AcJaJ+2PijBzXf/tIU/kdDTe9kYoE9haQ8rJfUO0A3+y190 AAP3MWYvtNO6EFxhi+39vrxCGj16EInFWUcxveZ7VELF17uwcN5kgsijH3CvNm7pR+kIjr 8zK3N1hTfhXD7ji9LSXwLQvBJ1kIiPxRNWAIjCvlttoFQdZkhjezovTy8qO3rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gVsqj4my5z3TY for ; Wed, 03 Jun 2026 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41072 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 03 Jun 2026 16:00:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9a133eee1ed9 - main - thunderbolt: Fix INVARIANTS compilation 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a133eee1ed9cf3220055c1d7543e1074bdc628a Auto-Submitted: auto-generated Date: Wed, 03 Jun 2026 16:00:49 +0000 Message-Id: <6a204fb1.41072.5a1534e3@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9a133eee1ed9cf3220055c1d7543e1074bdc628a commit 9a133eee1ed9cf3220055c1d7543e1074bdc628a Author: Olivier Certner AuthorDate: 2026-06-03 15:57:50 +0000 Commit: Olivier Certner CommitDate: 2026-06-03 15:59:57 +0000 thunderbolt: Fix INVARIANTS compilation The problem is that THUNDERBOLT_DEBUG triggers the use of some variables, but it is independent of INVARIANTS and the variables it uses were tagged with '__diagused'. Fix this by using '__maybe_unused' in those places. Fixes: 183633079178 ("thunderbolt: make code -Wunused clean") Fixes: 886164895f3f ("amd64: complete thunderbolt KERNCONF integration") Sponsored by: The FreeBSD Foundation --- sys/dev/thunderbolt/nhi.c | 6 +++--- sys/dev/thunderbolt/router.c | 4 ++-- sys/dev/thunderbolt/tb_acpi_pcib.c | 2 +- sys/dev/thunderbolt/tb_pcib.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c index 6cbe79779c13..a79d604bdf47 100644 --- a/sys/dev/thunderbolt/nhi.c +++ b/sys/dev/thunderbolt/nhi.c @@ -834,7 +834,7 @@ static int nhi_tx_complete(struct nhi_ring_pair *r, struct nhi_tx_buffer_desc *desc, struct nhi_cmd_frame *cmd) { - struct nhi_softc *sc __diagused; + struct nhi_softc *sc __maybe_unused; struct nhi_pdf_dispatch *txpdf; u_int sof; @@ -868,10 +868,10 @@ static int nhi_rx_complete(struct nhi_ring_pair *r, struct nhi_rx_post_desc *desc, struct nhi_cmd_frame *cmd) { - struct nhi_softc *sc __diagused; + struct nhi_softc *sc __maybe_unused; struct nhi_pdf_dispatch *rxpdf; u_int eof; - u_int len __diagused; + u_int len __maybe_unused; sc = r->sc; eof = desc->eof_len >> RX_BUFFER_DESC_EOF_SHIFT; diff --git a/sys/dev/thunderbolt/router.c b/sys/dev/thunderbolt/router.c index fe7ad7026b2e..68c5bcd227c9 100644 --- a/sys/dev/thunderbolt/router.c +++ b/sys/dev/thunderbolt/router.c @@ -278,7 +278,7 @@ _tb_router_attach(struct router_softc *sc) struct tb_cfg_router *cfg; uint32_t *buf; int error; - int up __diagused; + int up __maybe_unused; buf = malloc(9 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO); if (buf == NULL) @@ -720,7 +720,7 @@ router_notify_intr(void *context, union nhi_ring_desc *ring, struct nhi_cmd_fram struct router_softc *sc; struct router_command *cmd; struct tb_cfg_notify event; - u_int adap __diagused; + u_int adap __maybe_unused; u_int ev; KASSERT(context != NULL, ("context cannot be NULL\n")); diff --git a/sys/dev/thunderbolt/tb_acpi_pcib.c b/sys/dev/thunderbolt/tb_acpi_pcib.c index 57ad916d4435..161be931e072 100644 --- a/sys/dev/thunderbolt/tb_acpi_pcib.c +++ b/sys/dev/thunderbolt/tb_acpi_pcib.c @@ -120,7 +120,7 @@ tb_acpi_pcib_attach(device_t dev) ACPI_OBJECT_LIST list; ACPI_OBJECT arg; ACPI_BUFFER buf; - ACPI_STATUS s __diagused; + ACPI_STATUS s __maybe_unused; tb_debug(sc, DBG_BRIDGE, "Executing OSUP\n"); diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c index 876722a0076d..fcabe38a9470 100644 --- a/sys/dev/thunderbolt/tb_pcib.c +++ b/sys/dev/thunderbolt/tb_pcib.c @@ -304,7 +304,7 @@ static int tb_pcib_detach(device_t dev) { struct tb_pcib_softc *sc; - int error __diagused; + int error __maybe_unused; sc = device_get_softc(dev);