Re: [PATCH] wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table()

Arend van Spriel <[email protected]>
Newsgroups dev.linux.lists.brcm80211,dev.linux.lists.llvm,dev.linux.lists.patches,org.kernel.vger.linux-wireless,org.kernel.vger.stable
Message-ID <[email protected]>
On 7/16/2025 4:45 AM, Nathan Chancellor wrote:
> 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: [email protected]
> Closes: https://github.com/ClangBuiltLinux/linux/issues/2108
> Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers")
> Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1]

Acked-by: Arend van Spriel <[email protected]>> 
Signed-off-by: Nathan Chancellor <[email protected]>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.