Skip to content
Commit 47e61226 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kalle Valo
Browse files

wifi: rtw89: use flexible array member in rtw89_btc_btf_tlv



struct rtw89_btc_btf_tlv contains a one-byte member that is intended as a
flexible array:

In function 'fortify_memcpy_chk',
    inlined from '_append_tdma' at drivers/net/wireless/realtek/rtw89/coex.c:1579:3:
include/linux/fortify-string.h:583:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  583 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Make this actually use a flexible array to let the compiler understand.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230523113241.2772811-1-arnd@kernel.org
parent 56fc4d48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment