Skip to contentSkip to conversation

ath10k: fix a check patch warning returnNonBoolInBooleanFunction of sdio.c

PATCH In review Wen Gong 2 participants 3 messages Nov 23, 2020 – Dec 7, 2020 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Wen Gong

author
#0 lore raw

PATCH 1/1 ath10k: fix a check patch warning returnNonBoolInBooleanFunction of sdio.c

cppcheck possible warnings: (new ones prefixed by >>, may not real problems) drivers/net/wireless/ath/ath10k/sdio.c:2234:2:
warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction] return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049

---
 drivers/net/wireless/ath/ath10k/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/sdio.c +1 -1
index 2c619ef8a87c..14e2b7f585a5 100644
@@ -2237,7 +2237,7 @@ static bool ath10k_sdio_is_fast_dump_supported(struct ath10k *ar)
 
 	ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio hi_option_flag2 %x\n", param);
 
-	return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;
+	return !!(param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW);
 }
 
 static void ath10k_sdio_dump_registers(struct ath10k *ar,
Signature · 7 lines
2.23.0


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#1 lore raw
Quoted 11 lines · Wen Gong

cppcheck possible warnings: (new ones prefixed by >>, may not real problems) drivers/net/wireless/ath/ath10k/sdio.c:2234:2:
warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction] return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049

Patch applied to ath-next branch of ath.git, thanks.

7f881a721716 ath10k: fix a check patch warning returnNonBoolInBooleanFunction of sdio.c

Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#2 lore raw
In reply to Wen Gong
Quoted 11 lines · Wen Gong

cppcheck possible warnings: (new ones prefixed by >>, may not real problems) drivers/net/wireless/ath/ath10k/sdio.c:2234:2:
warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction] return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049

Patch applied to ath-next branch of ath.git, thanks.

7f881a721716 ath10k: fix a check patch warning returnNonBoolInBooleanFunction of sdio.c

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches