rtw88: fix fw dump support detection
Subsystems (3)
From: Arnd Bergmann <[email protected]>
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.
--- drivers/net/wireless/realtek/rtw88/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/fw.c +1 -1
@@ -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 ; }
Signature · 1 line
2.27.0
Nathan Chancellor
Reviewed-byQuoted 33 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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 <[email protected]>--- drivers/net/wireless/realtek/rtw88/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/realtek/rtw88/fw.c +1
-1@@ -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 ; }Signature · 1 line
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/[email protected]/
Not that it particularly matters which one goes in so regardless:
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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) { ~~~~~~~~~~~~~~~^~~~~~~~~~~~
Quoted 6 lines
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 <[email protected]>Reviewed-by Nathan Chancellor <[email protected]>
I'll take Tom's patch as it was first.
Patch set to Superseded.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches