lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6aab4077-90aa-42ef-9abd-fca315f1919e@RTEXMBS04.realtek.com.tw>
Date: Fri, 25 Oct 2024 10:21:08 +0800
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Arnd Bergmann <arnd@...nel.org>, Ping-Ke Shih <pkshih@...ltek.com>,
        "Kalle
 Valo" <kvalo@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>
CC: Arnd Bergmann <arnd@...db.de>, Nick Desaulniers <ndesaulniers@...gle.com>,
        Bill Wendling <morbo@...gle.com>,
        Justin Stitt <justinstitt@...gle.com>,
        Zong-Zhe Yang <kevin_yang@...ltek.com>,
        Kuan-Chung Chen
	<damon.chen@...ltek.com>,
        Chih-Kang Chang <gary.chang@...ltek.com>,
        <linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <llvm@...ts.linux.dev>
Subject: Re: [PATCH] rtw89: -Wenum-compare-conditional warnings

Arnd Bergmann <arnd@...nel.org> wrote:

> From: Arnd Bergmann <arnd@...db.de>
> 
> This is one of three drivers that trigger -Wenum-compare-conditional warnings
> with clang:
> 
> drivers/net/wireless/realtek/rtw89/core.c:1806:14: error: conditional expression between different enumeration types ('enum nl80211_eht_gi' and 'enum nl80211_he_gi') [-Werror,-Wenum-compare-conditional]
>  1806 |                 return eht ? NL80211_RATE_INFO_EHT_GI_0_8 :
>       |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1807 |                              NL80211_RATE_INFO_HE_GI_0_8;
>       |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw89/core.c:1810:14: error: conditional expression between different enumeration types ('enum nl80211_eht_gi' and 'enum nl80211_he_gi') [-Werror,-Wenum-compare-conditional]
>  1810 |                 return eht ? NL80211_RATE_INFO_EHT_GI_1_6 :
>       |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1811 |                              NL80211_RATE_INFO_HE_GI_1_6;
>       |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw89/core.c:1813:14: error: conditional expression between different enumeration types ('enum nl80211_eht_gi' and 'enum nl80211_he_gi') [-Werror,-Wenum-compare-conditional]
>  1813 |                 return eht ? NL80211_RATE_INFO_EHT_GI_3_2 :
>       |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1814 |                              NL80211_RATE_INFO_HE_GI_3_2;
>       |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw89/core.c:1818:15: error: conditional expression between different enumeration types ('enum nl80211_eht_gi' and 'enum nl80211_he_gi') [-Werror,-Wenum-compare-conditional]
>  1818 |                         return eht ? NL80211_RATE_INFO_EHT_GI_3_2 :
>       |                                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  1819 |                                      NL80211_RATE_INFO_HE_GI_3_2;
>       |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> In this case, all four warnings can be easily avoided by splitting the
> function into two separate ones, in a way that helps readability as well,
> at the expense of a few extra source lines.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

c67d7c7f4151 wifi: rtw89: fix -Wenum-compare-conditional warnings

---
https://github.com/pkshih/rtw.git


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ