[PATCH][next] ath11k: Remove redundant assignment to variable fw_size

Subsystems: atheros ath generic utilities, qualcomm atheros ath11k wireless driver, the rest

STALE1773d LANDED

Landed in mainline as 4f50bdfb4e5f on 2021-10-11.

2 messages, 2 authors, 2021-10-11 · open the first message on its own page

[PATCH][next] ath11k: Remove redundant assignment to variable fw_size

From: Colin King <hidden>
Date: 2021-10-06 10:55:39

From: Colin Ian King <redacted>

Variable fw_size is being assigned a value that is never read and
being re-assigned a new value in the next statement. The assignment
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Fixes: 336e7b53c82f ("ath11k: clean up BDF download functions")
Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 8c615bc788ca..fa73118de6db 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2135,7 +2135,6 @@ static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab)
 
 	ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi bdf_type %d\n", bdf_type);
 
-	fw_size = bd.len;
 	fw_size = min_t(u32, ab->hw_params.fw.board_size, bd.len);
 
 	ret = ath11k_qmi_load_file_target_mem(ab, bd.data, fw_size, bdf_type);
-- 
2.32.0

Re: [PATCH][next] ath11k: Remove redundant assignment to variable fw_size

From: Kalle Valo <hidden>
Date: 2021-10-11 06:25:01

Colin King [off-list ref] wrote:
Variable fw_size is being assigned a value that is never read and
being re-assigned a new value in the next statement. The assignment
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Fixes: 336e7b53c82f ("ath11k: clean up BDF download functions")
Signed-off-by: Colin Ian King <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

4f50bdfb4e5f ath11k: Remove redundant assignment to variable fw_size

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211006105529.1011239-1-colin.king@canonical.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help