summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2023-03-17 14:56:39 -0600
committerFelix Fietkau <nbd@nbd.name>2023-04-17 17:30:03 +0200
commit6d6793cef6a491b8f6db5f40ef3334411293da32 (patch)
tree3b815888911d3e5fd5691827cad99dd87ae9f9ec /drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h
parent2631c5b6ef9d7c6707e020def6947464c8aa6f92 (diff)
downloadlinux-stable-6d6793cef6a491b8f6db5f40ef3334411293da32.tar.gz
linux-stable-6d6793cef6a491b8f6db5f40ef3334411293da32.tar.bz2
linux-stable-6d6793cef6a491b8f6db5f40ef3334411293da32.zip
wifi: mt76: mt7921: Replace fake flex-arrays with flexible-array members
Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:266:25: warning: array subscript 0 is outside array bounds of ‘struct mt7921_asar_dyn_limit_v2[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:263:25: warning: array subscript 0 is outside array bounds of ‘struct mt7921_asar_dyn_limit[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:223:28: warning: array subscript <unknown> is outside array bounds of ‘struct mt7921_asar_geo_limit_v2[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:220:28: warning: array subscript <unknown> is outside array bounds of ‘struct mt7921_asar_geo_limit[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:334:37: warning: array subscript i is outside array bounds of ‘u8[0]’ {aka ‘unsigned char[]’} [-Warray-bounds=] Notice that the DECLARE_FLEX_ARRAY() helper allows for flexible-array members in unions. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/272 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h')
0 files changed, 0 insertions, 0 deletions