kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version
@ 2021-10-07 16:37 Colin King
  2021-10-08  9:33 ` Pkshih
  2021-10-13  6:20 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-10-07 16:37 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, David S . Miller, Jakub Kicinski,
	linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable version is being initialized with a value that is
never read, it is being updated afterwards in both branches of
an if statement. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
index 88fa2e593fef..76189283104c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
@@ -1430,7 +1430,7 @@ static enum version_8192e _rtl92ee_read_chip_version(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_phy *rtlphy = &rtlpriv->phy;
-	enum version_8192e version = VERSION_UNKNOWN;
+	enum version_8192e version;
 	u32 value32;
 
 	rtlphy->rf_type = RF_2T2R;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version
  2021-10-07 16:37 [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version Colin King
@ 2021-10-08  9:33 ` Pkshih
  2021-10-13  6:20 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Pkshih @ 2021-10-08  9:33 UTC (permalink / raw)
  To: Colin King, Kalle Valo, David S . Miller, Jakub Kicinski,
	linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel



> -----Original Message-----
> From: Colin King <colin.king@canonical.com>
> Sent: Friday, October 8, 2021 12:37 AM
> To: Pkshih <pkshih@realtek.com>; Kalle Valo <kvalo@codeaurora.org>; David S . Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; linux-wireless@vger.kernel.org;
> netdev@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable version is being initialized with a value that is
> never read, it is being updated afterwards in both branches of
> an if statement. The assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
> index 88fa2e593fef..76189283104c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
> @@ -1430,7 +1430,7 @@ static enum version_8192e _rtl92ee_read_chip_version(struct ieee80211_hw
> *hw)
>  {
>  	struct rtl_priv *rtlpriv = rtl_priv(hw);
>  	struct rtl_phy *rtlphy = &rtlpriv->phy;
> -	enum version_8192e version = VERSION_UNKNOWN;
> +	enum version_8192e version;
>  	u32 value32;
> 
>  	rtlphy->rf_type = RF_2T2R;
> --
> 2.32.0
> 
> ------Please consider the environment before printing this e-mail.


Acked-by: Ping-Ke Shih <pkshih@realtek.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version
  2021-10-07 16:37 [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version Colin King
  2021-10-08  9:33 ` Pkshih
@ 2021-10-13  6:20 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-10-13  6:20 UTC (permalink / raw)
  To: Colin King
  Cc: Ping-Ke Shih, David S . Miller, Jakub Kicinski, linux-wireless,
	netdev, kernel-janitors, linux-kernel

Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable version is being initialized with a value that is
> never read, it is being updated afterwards in both branches of
> an if statement. The assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-drivers-next.git, thanks.

51fd5c6417b9 rtlwifi: rtl8192ee: Remove redundant initialization of variable version

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-13  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 16:37 [PATCH] rtlwifi: rtl8192ee: Remove redundant initialization of variable version Colin King
2021-10-08  9:33 ` Pkshih
2021-10-13  6:20 ` 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).