* [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret
@ 2024-01-16 15:54 Colin Ian King
2024-01-26 13:38 ` Toke Høiland-Jørgensen
2024-02-02 11:39 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2024-01-16 15:54 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Kalle Valo, linux-wireless
Cc: kernel-janitors, linux-kernel
The variable ret is being assigned a value but it isn't being
read afterwards. The assignment is redundant and so ret can be
removed.
Cleans up clang scan build warning:
warning: Although the value stored to 'ret' is used in the
enclosing expression, the value is never actually read from
'ret' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/net/wireless/ath/ath9k/xmit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index f15684379b03..d519b676a109 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -369,12 +369,11 @@ static void ath_tid_drain(struct ath_softc *sc, struct ath_txq *txq,
struct list_head bf_head;
struct ath_tx_status ts;
struct ath_frame_info *fi;
- int ret;
memset(&ts, 0, sizeof(ts));
INIT_LIST_HEAD(&bf_head);
- while ((ret = ath_tid_dequeue(tid, &skb)) == 0) {
+ while (ath_tid_dequeue(tid, &skb) == 0) {
fi = get_frame_info(skb);
bf = fi->bf;
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret
2024-01-16 15:54 [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret Colin Ian King
@ 2024-01-26 13:38 ` Toke Høiland-Jørgensen
2024-02-02 11:39 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2024-01-26 13:38 UTC (permalink / raw)
To: Colin Ian King, Kalle Valo, linux-wireless; +Cc: kernel-janitors, linux-kernel
Colin Ian King <colin.i.king@gmail.com> writes:
> The variable ret is being assigned a value but it isn't being
> read afterwards. The assignment is redundant and so ret can be
> removed.
>
> Cleans up clang scan build warning:
> warning: Although the value stored to 'ret' is used in the
> enclosing expression, the value is never actually read from
> 'ret' [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret
2024-01-16 15:54 [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret Colin Ian King
2024-01-26 13:38 ` Toke Høiland-Jørgensen
@ 2024-02-02 11:39 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-02-02 11:39 UTC (permalink / raw)
To: Colin Ian King
Cc: Toke Høiland-Jørgensen, linux-wireless, kernel-janitors,
linux-kernel
Colin Ian King <colin.i.king@gmail.com> wrote:
> The variable ret is being assigned a value but it isn't being
> read afterwards. The assignment is redundant and so ret can be
> removed.
>
> Cleans up clang scan build warning:
> warning: Although the value stored to 'ret' is used in the
> enclosing expression, the value is never actually read from
> 'ret' [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
08d82175bfbb wifi: ath9k: remove redundant assignment to variable ret
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240116155452.2315351-1-colin.i.king@gmail.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-02 11:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 15:54 [PATCH][next] wifi: ath9k: remove redundant assignment to variable ret Colin Ian King
2024-01-26 13:38 ` Toke Høiland-Jørgensen
2024-02-02 11:39 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).