lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Oct 2020 18:39:39 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Yan-Hsuan Chuang <yhchuang@...ltek.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tzu-En Huang <tehuang@...ltek.com>,
        Ping-Ke Shih <pkshih@...ltek.com>,
        Chin-Yen Lee <timlee@...ltek.com>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH\ net] rtw88: fix fw dump support detection

On Mon, Oct 26, 2020 at 10:22:55PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> clang points out a useless check that was recently added:
> 
> drivers/net/wireless/realtek/rtw88/fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr' will always evaluate to 'true' [-Wpointer-bool-conversion]
>         if (!rtwdev->chip->fw_fifo_addr) {
>             ~~~~~~~~~~~~~~~^~~~~~~~~~~~
> 
> Apparently this was meant to check the contents of the array
> rather than the address, so check it accordingly.
> 
> Fixes: 0fbc2f0f34cc ("rtw88: add dump firmware fifo support")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
> index 042015bc8055..b2fd87834f23 100644
> --- a/drivers/net/wireless/realtek/rtw88/fw.c
> +++ b/drivers/net/wireless/realtek/rtw88/fw.c
> @@ -1482,7 +1482,7 @@ static bool rtw_fw_dump_check_size(struct rtw_dev *rtwdev,
>  int rtw_fw_dump_fifo(struct rtw_dev *rtwdev, u8 fifo_sel, u32 addr, u32 size,
>  		     u32 *buffer)
>  {
> -	if (!rtwdev->chip->fw_fifo_addr) {
> +	if (!rtwdev->chip->fw_fifo_addr[0]) {
>  		rtw_dbg(rtwdev, RTW_DBG_FW, "chip not support dump fw fifo\n");
>  		return -ENOTSUPP;
>  	}
> -- 
> 2.27.0
> 

Tom sent an identical patch earlier that it does not look like Kalle has
picked up:

https://lore.kernel.org/linux-wireless/20201011155438.15892-1-trix@redhat.com/

Not that it particularly matters which one goes in so regardless:

Reviewed-by: Nathan Chancellor <natechancellor@...il.com>

Powered by blists - more mailing lists