Skip to content

Commit b860da3

Browse files
nathanchancegregkh
authored andcommitted
wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table()
commit 81284e8 upstream. A new warning in clang [1] complains that diq_start in wlc_lcnphy_tx_iqlo_cal() is passed uninitialized as a const pointer to wlc_lcnphy_common_read_table(): drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:2728:13: error: variable 'diq_start' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 2728 | &diq_start, 1, 16, 69); | ^~~~~~~~~ The table pointer passed to wlc_lcnphy_common_read_table() should not be considered constant, as wlc_phy_read_table() is ultimately going to update it. Remove the const qualifier from the tbl_ptr to clear up the warning. Cc: stable@vger.kernel.org Closes: ClangBuiltLinux/linux#2108 Fixes: 5b435de ("net: wireless: add brcm80211 drivers") Link: llvm/llvm-project@00dacf8 [1] Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>> Link: https://patch.msgid.link/20250715-brcmsmac-fix-uninit-const-pointer-v1-1-16e6a51a8ef4@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fb67be2 commit b860da3

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy

1 file changed

+1
-1
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ void wlc_lcnphy_read_table(struct brcms_phy *pi, struct phytbl_info *pti)
919919

920920
static void
921921
wlc_lcnphy_common_read_table(struct brcms_phy *pi, u32 tbl_id,
922-
const u16 *tbl_ptr, u32 tbl_len,
922+
u16 *tbl_ptr, u32 tbl_len,
923923
u32 tbl_width, u32 tbl_offset)
924924
{
925925
struct phytbl_info tab;

0 commit comments

Comments
 (0)