Skip to content
Commit b57f0320 authored by Thiraviyam Mariyappan's avatar Thiraviyam Mariyappan Committed by Kalle Valo
Browse files

wifi: ath12k: hal_rx: Use memset_startat() for clearing queue descriptors



In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.

Use memset_startat() so memset() doesn't get confused about writing
beyond the destination member that is intended to be the starting point
of zeroing through the end of the struct and fixes the below clang
warning.

Warning:
include/linux/fortify-string.h:314:4: warning: call to '__write_overflow_field' declared with 'warning' attribute:
detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarThiraviyam Mariyappan <quic_tmariyap@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20221221105529.19345-3-quic_tmariyap@quicinc.com
parent d1335f0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment