mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
wifi: ath: work around false-positive stringop-overread warning
In a rare arm64 randconfig build, I got multiple warnings for ath11k and ath12k: In function 'ath11k_peer_assoc_h_ht', inlined from 'ath11k_peer_assoc_prepare' at drivers/net/wireless/ath/ath11k/mac.c:2665:2: drivers/net/wireless/ath/ath11k/mac.c:1709:13: error: 'ath11k_peer_assoc_h_ht_masked' reading 10 bytes from a region of size 0 [-Werror=stringop-overread] 1709 | if (ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This happens whenever gcc-13 fails to inline one of the functions that take a fixed-length array argument but gets passed a pointer. Change these functions to all take a regular pointer argument instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org
This commit is contained in:
parent
91dce40914
commit
695df2f417
2 changed files with 10 additions and 10 deletions
|
@ -433,7 +433,7 @@ u8 ath11k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband,
|
|||
}
|
||||
|
||||
static u32
|
||||
ath11k_mac_max_ht_nss(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
||||
ath11k_mac_max_ht_nss(const u8 *ht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -445,7 +445,7 @@ ath11k_mac_max_ht_nss(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
|||
}
|
||||
|
||||
static u32
|
||||
ath11k_mac_max_vht_nss(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])
|
||||
ath11k_mac_max_vht_nss(const u16 *vht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -457,7 +457,7 @@ ath11k_mac_max_vht_nss(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])
|
|||
}
|
||||
|
||||
static u32
|
||||
ath11k_mac_max_he_nss(const u16 he_mcs_mask[NL80211_HE_NSS_MAX])
|
||||
ath11k_mac_max_he_nss(const u16 *he_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -1658,7 +1658,7 @@ static void ath11k_peer_assoc_h_rates(struct ath11k *ar,
|
|||
}
|
||||
|
||||
static bool
|
||||
ath11k_peer_assoc_h_ht_masked(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
||||
ath11k_peer_assoc_h_ht_masked(const u8 *ht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -1670,7 +1670,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
|||
}
|
||||
|
||||
static bool
|
||||
ath11k_peer_assoc_h_vht_masked(const u16 vht_mcs_mask[])
|
||||
ath11k_peer_assoc_h_vht_masked(const u16 *vht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -2065,7 +2065,7 @@ static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
|
|||
}
|
||||
|
||||
static bool
|
||||
ath11k_peer_assoc_h_he_masked(const u16 he_mcs_mask[NL80211_HE_NSS_MAX])
|
||||
ath11k_peer_assoc_h_he_masked(const u16 *he_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ u8 ath12k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband,
|
|||
}
|
||||
|
||||
static u32
|
||||
ath12k_mac_max_ht_nss(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
||||
ath12k_mac_max_ht_nss(const u8 *ht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -393,7 +393,7 @@ ath12k_mac_max_ht_nss(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
|||
}
|
||||
|
||||
static u32
|
||||
ath12k_mac_max_vht_nss(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])
|
||||
ath12k_mac_max_vht_nss(const u16 *vht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -1303,7 +1303,7 @@ static void ath12k_peer_assoc_h_rates(struct ath12k *ar,
|
|||
}
|
||||
|
||||
static bool
|
||||
ath12k_peer_assoc_h_ht_masked(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
||||
ath12k_peer_assoc_h_ht_masked(const u8 *ht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ ath12k_peer_assoc_h_ht_masked(const u8 ht_mcs_mask[IEEE80211_HT_MCS_MASK_LEN])
|
|||
}
|
||||
|
||||
static bool
|
||||
ath12k_peer_assoc_h_vht_masked(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])
|
||||
ath12k_peer_assoc_h_vht_masked(const u16 *vht_mcs_mask)
|
||||
{
|
||||
int nss;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue