* [PATCH] rtlwifi: Remove redundant assignments to ul_enc_algo
@ 2021-05-18 1:59 Yang Li
2021-06-15 13:40 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-05-18 1:59 UTC (permalink / raw)
To: pkshih
Cc: kvalo, davem, kuba, nathan, ndesaulniers, linux-wireless, netdev,
linux-kernel, clang-built-linux, Yang Li
Variable ul_enc_algo is being initialized with a value that is never
read, it is being set again in the following switch statements in
all of the case and default paths. Hence the unitialization is
redundant and can be removed.
Clean up clang warning:
drivers/net/wireless/realtek/rtlwifi/cam.c:170:6: warning: Value stored
to 'ul_enc_algo' during its initialization is never read
[clang-analyzer-deadcode.DeadStores]
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/net/wireless/realtek/rtlwifi/cam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/cam.c b/drivers/net/wireless/realtek/rtlwifi/cam.c
index 7aa28da..7a0355d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/cam.c
+++ b/drivers/net/wireless/realtek/rtlwifi/cam.c
@@ -167,7 +167,7 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
u32 ul_command;
u32 ul_content;
- u32 ul_enc_algo = rtlpriv->cfg->maps[SEC_CAM_AES];
+ u32 ul_enc_algo;
switch (rtlpriv->sec.pairwise_enc_algorithm) {
case WEP40_ENCRYPTION:
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtlwifi: Remove redundant assignments to ul_enc_algo
2021-05-18 1:59 [PATCH] rtlwifi: Remove redundant assignments to ul_enc_algo Yang Li
@ 2021-06-15 13:40 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-06-15 13:40 UTC (permalink / raw)
To: Yang Li
Cc: pkshih, davem, kuba, nathan, ndesaulniers, linux-wireless,
netdev, linux-kernel, clang-built-linux, Yang Li
Yang Li <yang.lee@linux.alibaba.com> wrote:
> Variable ul_enc_algo is being initialized with a value that is never
> read, it is being set again in the following switch statements in
> all of the case and default paths. Hence the unitialization is
> redundant and can be removed.
>
> Clean up clang warning:
>
> drivers/net/wireless/realtek/rtlwifi/cam.c:170:6: warning: Value stored
> to 'ul_enc_algo' during its initialization is never read
> [clang-analyzer-deadcode.DeadStores]
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Patch applied to wireless-drivers-next.git, thanks.
a99086057e03 rtlwifi: Remove redundant assignments to ul_enc_algo
--
https://patchwork.kernel.org/project/linux-wireless/patch/1621303199-1542-1-git-send-email-yang.lee@linux.alibaba.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 1:59 [PATCH] rtlwifi: Remove redundant assignments to ul_enc_algo Yang Li
2021-06-15 13:40 ` Kalle Valo
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.