Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
	brcm80211-dev-list.pdl@broadcom.com, llvm@lists.linux.dev,
	patches@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table()
Date: Wed, 16 Jul 2025 11:32:01 +0200	[thread overview]
Message-ID: <caaaa276-71fa-403a-9557-b8d3edadeb81@broadcom.com> (raw)
In-Reply-To: <20250715-brcmsmac-fix-uninit-const-pointer-v1-1-16e6a51a8ef4@kernel.org>

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: stable@vger.kernel.org
> 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 <arend.vanspriel@broadcom.com>> 
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

      reply	other threads:[~2025-07-16  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16  2:45 [PATCH] wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table() Nathan Chancellor
2025-07-16  9:32 ` Arend van Spriel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=caaaa276-71fa-403a-9557-b8d3edadeb81@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=linux-wireless@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox