From nobody Wed Mar 11 16:45:19 2026 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 4fWGnw6Znlz6VQdq for ; Wed, 11 Mar 2026 16:45:24 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fWGnw4kssz3VWJ for ; Wed, 11 Mar 2026 16:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773247524; 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=Y/0XPvcZaC/z5nvfOTk1tIEW7LwDQKm98a5h1G3v2vU=; b=LYEMUJrEJ0LY0XetzJXymd3Ipwx/aKM+jA2bU3Or9PJQ3cdRqqTzJ3yvPwYXnsPYZmlCR3 fSSMW1+UellsOnbKMaeTVmV6TJTgFMTRhw/XFTwkat0tMKMwoRGfsqJhKtHDK8RX3Jm0Q2 9P3VSpWfRvrF6jBqZfy2PDf1Ks8QFPYBhy8Ul7mP8deWv2tEnp5GZ68iB/TAyZmgoefSfX TA8BBTaZauEnW1LvSDAFnyeLosZ5U2BOy+TFYaCFK94MxRwRMZQVJINU06Tz1ICMLTCweF gCh8cdObIBZgQN/rzzZRL6CfJB/sA3wraW2RHCj+MxjiofJxJW0MHIZULF0Qyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773247524; a=rsa-sha256; cv=none; b=uVsdaFyrj/5uD+0ePVGqLWaWt6tvzv5C5zMlAyriI7aNNLcmTljIzJ2N12rckxot4Xk3kr z/61z6JWRBlvTyn0DskWAln4kRZgWTfmRfWXd57qKFktogn2t8it/Xa/lkHU2R8Q3htkoo H27i+CNswGmS53SHWgKf8KN0C1NqMUEpSWQVs9uIAw55CgNI3fQ74oK414yuAdkH4fYLA8 nB+JhngOn3u+zU09VQoFpCeP3cZuGCqbFluPJU+B70Jt/3OhWb/jzFRN0N8EPtZ3jjcJmq 3CYLJnOdxa8fCx4vaGIr28zbmA4rz4XpKRz6DF5PMia9O+/80dQOTDTq9XIGMw== 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=1773247524; 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=Y/0XPvcZaC/z5nvfOTk1tIEW7LwDQKm98a5h1G3v2vU=; b=gYnzRn5/jLpbhorjsFWSF+hweyLivowsHT3rsPkBRLpvjRUHsPO2iI/UdiRDYd6YorhHBw KOvhDaUL+ORNKwn9ISyboaxdXP4PB+Oy/5PK9iNns+6up4ILalvdx72zil/aXDrd3x3z6l XNF8rT6pFQYt1DtYCLxm5OuGHj0CEbat3S3Bih7CF6zYxbPEHc8RTKML41L+b2l2pYdQ7U HZ+8AxxW3XUsCqU5c/6EsknBmb4CUAL8cEcWayBkXapdz2iMbUc2VKXQ4c7KsxTNxqGUjE LaGQkedSPh6EHTXeIXUWDQyv9Ou39eDxrOzNOCCI4RUxojjGOuysYgt0+RfR4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fWGnw3y0bz165P for ; Wed, 11 Mar 2026 16:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 440e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Mar 2026 16:45:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 56401a9c3459 - stable/15 - LinuxKPI: avoid -Werror=unused-value in sort() from BUILD_BUG_ON_ZERO() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 56401a9c3459f8f4151ac0da1f820863119c1749 Auto-Submitted: auto-generated Date: Wed, 11 Mar 2026 16:45:19 +0000 Message-Id: <69b19c1f.440e6.2e993800@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=56401a9c3459f8f4151ac0da1f820863119c1749 commit 56401a9c3459f8f4151ac0da1f820863119c1749 Author: Siva Mahadevan AuthorDate: 2026-03-03 19:09:35 +0000 Commit: Siva Mahadevan CommitDate: 2026-03-11 16:16:17 +0000 LinuxKPI: avoid -Werror=unused-value in sort() from BUILD_BUG_ON_ZERO() The BUILD_BUG_ON_ZERO() macro returns an (int)0 if it does not fail at build time. LinuxKPI sort() has it as a guard for an unsupported argument but ignores the return value. This leads to gcc complaining: /usr/src/sys/compat/linuxkpi/common/include/linux/build_bug.h:60:33: error: statement with no effect [-Werror=unused-value] 60 | #define BUILD_BUG_ON_ZERO(x) ((int)sizeof(struct { int:-((x) != 0); })) | ^ /usr/src/sys/compat/linuxkpi/common/include/linux/sort.h:37:9: note: in expansion of macro 'BUILD_BUG_ON_ZERO' 37 | BUILD_BUG_ON_ZERO(swap); \ | ^~~~~~~~~~~~~~~~~ /usr/src/sys/contrib/dev/rtw89/core.c:2575:9: note: in expansion of macro 'sort' 2575 | sort(drift, RTW89_BCN_TRACK_STAT_NR, sizeof(*drift), cmp_u16, NULL); Change to BUILD_BUG_ON() for the statement version. Reported by: CI Co-authored-by: bz Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55634 (cherry picked from commit f26cb4757eb74ceace39144933ae198ebf1b4f28) --- sys/compat/linuxkpi/common/include/linux/sort.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sort.h b/sys/compat/linuxkpi/common/include/linux/sort.h index e6196d1f41c7..361b37c587c8 100644 --- a/sys/compat/linuxkpi/common/include/linux/sort.h +++ b/sys/compat/linuxkpi/common/include/linux/sort.h @@ -34,7 +34,7 @@ #include #define sort(base, num, size, cmp, swap) do { \ - BUILD_BUG_ON_ZERO(swap); \ + BUILD_BUG_ON(swap); \ qsort(base, num, size, cmp); \ } while (0)