* [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
@ 2024-05-01 22:41 Gustavo A. R. Silva
2024-05-02 3:09 ` Kees Cook
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2024-05-01 22:41 UTC (permalink / raw)
To: Ping-Ke Shih, Kalle Valo
Cc: linux-wireless, linux-kernel, Gustavo A. R. Silva,
linux-hardening
Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
So, remove unused structs and fix the following
-Wflex-array-member-not-at-end warnings:
drivers/net/wireless/realtek/rtlwifi/btcoexist/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192c/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192de/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8192se/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8723be/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8723com/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/realtek/rtlwifi/wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
drivers/net/wireless/realtek/rtlwifi/wifi.h | 27 ---------------------
1 file changed, 27 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index 9fabf597cfd6..f4c71890b989 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -1043,33 +1043,6 @@ struct octet_string {
u16 length;
};
-struct rtl_hdr_3addr {
- __le16 frame_ctl;
- __le16 duration_id;
- u8 addr1[ETH_ALEN];
- u8 addr2[ETH_ALEN];
- u8 addr3[ETH_ALEN];
- __le16 seq_ctl;
- u8 payload[];
-} __packed;
-
-struct rtl_info_element {
- u8 id;
- u8 len;
- u8 data[];
-} __packed;
-
-struct rtl_probe_rsp {
- struct rtl_hdr_3addr header;
- u32 time_stamp[2];
- __le16 beacon_interval;
- __le16 capability;
- /*SSID, supported rates, FH params, DS params,
- * CF params, IBSS params, TIM (if beacon), RSN
- */
- struct rtl_info_element info_element[];
-} __packed;
-
struct rtl_led_ctl {
bool led_opendrain;
enum rtl_led_pin sw_led0;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
2024-05-01 22:41 [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings Gustavo A. R. Silva
@ 2024-05-02 3:09 ` Kees Cook
2024-05-02 17:49 ` Jeff Johnson
2024-05-02 3:19 ` Ping-Ke Shih
2024-05-04 0:25 ` Ping-Ke Shih
2 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2024-05-02 3:09 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Ping-Ke Shih, Kalle Valo, linux-wireless, linux-kernel,
linux-hardening
On Wed, May 01, 2024 at 04:41:37PM -0600, Gustavo A. R. Silva wrote:
> Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
>
> So, remove unused structs and fix the following
> -Wflex-array-member-not-at-end warnings:
Heh. Yes! Very effective. :)
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
2024-05-01 22:41 [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings Gustavo A. R. Silva
2024-05-02 3:09 ` Kees Cook
@ 2024-05-02 3:19 ` Ping-Ke Shih
2024-05-04 0:25 ` Ping-Ke Shih
2 siblings, 0 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-05-02 3:19 UTC (permalink / raw)
To: Gustavo A. R. Silva, Kalle Valo
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Gustavo A. R. Silva <gustavoars@kernel.org> wrote:
> Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
>
> So, remove unused structs and fix the following
> -Wflex-array-member-not-at-end warnings:
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
2024-05-02 3:09 ` Kees Cook
@ 2024-05-02 17:49 ` Jeff Johnson
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Johnson @ 2024-05-02 17:49 UTC (permalink / raw)
To: Kees Cook, Gustavo A. R. Silva
Cc: Ping-Ke Shih, Kalle Valo, linux-wireless, linux-kernel,
linux-hardening
On 5/1/2024 8:09 PM, Kees Cook wrote:
> On Wed, May 01, 2024 at 04:41:37PM -0600, Gustavo A. R. Silva wrote:
>> Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
>> ready to enable it globally.
>>
>> So, remove unused structs and fix the following
>> -Wflex-array-member-not-at-end warnings:
>
> Heh. Yes! Very effective. :)
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
My favorite kind of patch :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
2024-05-01 22:41 [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings Gustavo A. R. Silva
2024-05-02 3:09 ` Kees Cook
2024-05-02 3:19 ` Ping-Ke Shih
@ 2024-05-04 0:25 ` Ping-Ke Shih
2 siblings, 0 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-05-04 0:25 UTC (permalink / raw)
To: Gustavo A. R. Silva, Ping-Ke Shih, Kalle Valo
Cc: linux-wireless, linux-kernel, Gustavo A. R. Silva,
linux-hardening
"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:
> Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
>
> So, remove unused structs and fix the following
> -Wflex-array-member-not-at-end warnings:
>
> drivers/net/wireless/realtek/rtlwifi/btcoexist/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8188ee/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192c/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192cu/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8192se/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8723ae/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8723com/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/../wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/wireless/realtek/rtlwifi/wifi.h:1063:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
b3e11ee3b97e wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings
---
https://github.com/pkshih/rtw.git
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-04 0:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 22:41 [PATCH][next] wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings Gustavo A. R. Silva
2024-05-02 3:09 ` Kees Cook
2024-05-02 17:49 ` Jeff Johnson
2024-05-02 3:19 ` Ping-Ke Shih
2024-05-04 0:25 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).