From: Kalle Valo <kvalo@codeaurora.org>
To: Tim Gardner <tim.gardner@canonical.com>
Cc: ath11k@lists.infradead.org, tim.gardner@canonical.com,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ath11k: Remove unused variable in ath11k_dp_rx_mon_merg_msdus()
Date: Tue, 5 Oct 2021 14:29:30 +0000 (UTC) [thread overview]
Message-ID: <20211005142930.6413FC43617@smtp.codeaurora.org> (raw)
In-Reply-To: <20210927150743.19816-1-tim.gardner@canonical.com>
Tim Gardner <tim.gardner@canonical.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@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: ath11k@lists.infradead.org
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.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
next prev parent reply other threads:[~2021-10-05 14:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 15:07 [PATCH] ath11k: Remove unused variable in ath11k_dp_rx_mon_merg_msdus() Tim Gardner
2021-09-27 15:07 ` Tim Gardner
2021-10-05 14:29 ` Kalle Valo [this message]
2021-10-05 14:29 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211005142930.6413FC43617@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tim.gardner@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.