[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20211005142930.6413FC43617@smtp.codeaurora.org>
Date: Tue, 5 Oct 2021 14:29:30 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: Tim Gardner <tim.gardner@...onical.com>
Cc: ath11k@...ts.infradead.org, tim.gardner@...onical.com,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ath11k: Remove unused variable in
ath11k_dp_rx_mon_merg_msdus()
Tim Gardner <tim.gardner@...onical.com> wrote:
> Coverity complains that a constant variable guards dead code. In fact,
> mpdu_buf is set NULL and never updated.
>
> 4834err_merge_fail:
> null: At condition mpdu_buf, the value of mpdu_buf must be NULL.
> dead_error_condition: The condition mpdu_buf cannot be true.
> CID 92162 (#1 of 1): 'Constant' variable guards dead code (DEADCODE)
> dead_error_line: Execution cannot reach the expression decap_format !=
> DP_RX_DECAP_TYPE_RAW inside this statement: if (mpdu_buf && decap_forma....
> Local variable mpdu_buf is assigned only once, to a constant value, making it
> effectively constant throughout its scope. If this is not the intent, examine
> the logic to see if there is a missing assignment that would make mpdu_buf not
> remain constant.
> 4835 if (mpdu_buf && decap_format != DP_RX_DECAP_TYPE_RAW) {
>
> Fix this by removing mpdu_buf and unreachable code.
>
> Cc: Kalle Valo <kvalo@...eaurora.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: ath11k@...ts.infradead.org
> Cc: linux-wireless@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
> Signed-off-by: Kalle Valo <kvalo@...eaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
7210b4b77fe4 ath11k: Remove unused variable in ath11k_dp_rx_mon_merg_msdus()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210927150743.19816-1-tim.gardner@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists