Re: [PATCH net-next 08/11] ath9k: work around false-positive gcc warning

Kalle Valo
2020-11-10T18:14:39Z

Arnd Bergmann <arnd@kernel.org> wrote:

> gcc-10 shows a false-positive warning with CONFIG_KASAN:
>
> drivers/net/wireless/ath/ath9k/dynack.c: In function 'ath_dynack_sample_tx_ts':
> include/linux/etherdevice.h:290:14: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
> 290 | *(u32 *)dst = *(const u32 *)src;
> | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
>
> Until gcc is fixed, work around this by using memcpy() in place
> of ether_addr_copy(). Hopefully gcc-11 will not have this problem.
>
> Link: https://godbolt.org/z/sab1MK
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> [kvalo@codeaurora.org: remove ifdef and add a comment]
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

b96fab4e3602 ath9k: work around false-positive gcc warning

--