From nobody Sun Oct 27 10:56:36 2024 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 4XbtkF0sBxz5ZfDc; Sun, 27 Oct 2024 10:56:37 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XbtkF08YVz4mdq; Sun, 27 Oct 2024 10:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730026597; 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=3Ua9qc9eL8lzNN8I15ODUWJxtTCiqjXfC+5aa+nT6cs=; b=GziNZK2ZSgtLa3FQsRJ2LznHf68IeAyLCX0pRmVBEDyXKg3ps4/h7MhnOK80w6L4BZChL4 VaKt9oTk4tQ9vcCBhgZ2MN2zS9iHha2n/nc49TLdwXl6omwvzpPZZv4DgTynC/W/qoQ7M6 546fj77+T1+9Zd6T6k9IHGME7WhQovI2KB6RCELNA63t2OuNK0UWf8yiTqNiipE7iM+4+N Tmd0sSJVYwI0Xe/oPA8bqKi4361Bj2Vq6OG/fG6tPGjd+AbsUC57SdhrjLQLK/21MjZv16 LWOvlLXnATrS+nU0amWmMu+f332fk+fRgjQbsk7GTGMUo0qBOJc1Q6T3vEYiyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730026597; 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=3Ua9qc9eL8lzNN8I15ODUWJxtTCiqjXfC+5aa+nT6cs=; b=cwm+lP2iJMy/rgTB2Y/n9UMTeD/L1nPMltuGWeP4HHDvht03Vxygmalku7jflRsHXb0mXx 3X/jhMQR/+M3AQIktHdOZNbcOlZLbTT2HRnxurpWm3oZ8gn6uy/3thEyO5n58/gh0k4cPx koh3BKjkQveLwDbQQdDh901q61319uRplCHxcuV/2WRP1BWNZCj8Km1Sezp7HXaZh1ZREe gVxrf/ZXvC/OQZEgUMICRMDwxcZrmZdjTUNLyBg+nO7l0Re7B6ooh2LKI3IrY7qEWaY9qm QCJhB1WfER9Uy02ZdWMnKukNQ5cixJ42BSmeuwm0bmAE/T9o0LHej+Z+8zrzGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730026597; a=rsa-sha256; cv=none; b=bjeNsnnDehidfnH0UaKnPHQJYZb3Lh6Ky9Xx1BZ7jCOaC91XdSqQ6xos8zbqAWNS2dADF9 UoiubX7TMZRjLufqQATdtnvow8uBgQFg8xl4HQw+6RukQXry48uFCY3P3zoplVPcgvdAIN TiuCWBU3qiHoYEL+0BW80i85th2Yw6CSTld0wEDEGrd1VYpJNvXYwqcWQC7YlEnNN5uyUy klAXByGMhbzp7M7wATgnV0roUH5U/o7FkgVWTp17ZZa0guQtiHoPA58UTwOUOs7/c6kWZU OryfaE6pVXJMCD0bRYwUXV8rEzXQN8X04WY6uZ/t/4iGYonNeFDiZRdD9bNsiA== 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 4XbtkD6jjtzrf7; Sun, 27 Oct 2024 10:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49RAuaUF008060; Sun, 27 Oct 2024 10:56:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49RAuaFi008058; Sun, 27 Oct 2024 10:56:36 GMT (envelope-from git) Date: Sun, 27 Oct 2024 10:56:36 GMT Message-Id: <202410271056.49RAuaFi008058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7905f6f1c7e9 - stable/14 - Fix enum warning in ath_hal's ar9002 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7905f6f1c7e948350fab2195ddf64f37fc3e1d5e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7905f6f1c7e948350fab2195ddf64f37fc3e1d5e commit 7905f6f1c7e948350fab2195ddf64f37fc3e1d5e Author: Dimitry Andric AuthorDate: 2024-07-31 09:43:50 +0000 Commit: Dimitry Andric CommitDate: 2024-10-27 10:53:01 +0000 Fix enum warning in ath_hal's ar9002 This fixes a clang 19 warning: sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c:57:32: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_ANT_SETTING') [-Werror,-Wenum-compare] 57 | (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ The `ah_diversity` field of `struct ath_hal_5212` is of type `HAL_BOOL`, not the enum type `HAL_ANT_SETTING`. In other code, `ah_diversity` is set to `AH_TRUE` whenever the related field `ah_antControl` is set to `HAL_ANT_VARIABLE`. It is not entirely clear to me what the intended statement is here: the test as it is written now compares the enum value 0 to `ah_diversity`, so in effect it enables the following block whenever `ah_diversity` is `AH_TRUE`. Write it like that, to avoid the compiler warning. MFC after: 3 days (cherry picked from commit 36d486cc2ecdb9c290dba65bd5668b7e50d0d822) --- sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c index 01a224cbbfe9..fb2700771ffa 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c @@ -54,7 +54,7 @@ ar9285BTCoexAntennaDiversity(struct ath_hal *ah) !! (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE)); if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || - (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { + (AH5212(ah)->ah_diversity == AH_TRUE)) { if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && (AH5212(ah)->ah_antControl == HAL_ANT_VARIABLE)) { /* Enable antenna diversity */