Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] rtlwifi: rtl8188ee: remove redundant assignment to variable cond
@ 2020-01-14 16:56 Colin King
  2020-01-15  1:46 ` Pkshih
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-01-14 16:56 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, David S . Miller, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

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

Variable cond is being assigned with a value that is never
read, it is assigned a new value later on. 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/rtl8188ee/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
index 5ca900f97d66..d13983ec09ad 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
@@ -264,7 +264,7 @@ static bool _rtl88e_check_condition(struct ieee80211_hw *hw,
 	u32 _board = rtlefuse->board_type; /*need efuse define*/
 	u32 _interface = rtlhal->interface;
 	u32 _platform = 0x08;/*SupportPlatform */
-	u32 cond = condition;
+	u32 cond;
 
 	if (condition == 0xCDCDCDCD)
 		return true;
-- 
2.24.0


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

* Re: [PATCH] rtlwifi: rtl8188ee: remove redundant assignment to variable cond
  2020-01-14 16:56 [PATCH] rtlwifi: rtl8188ee: remove redundant assignment to variable cond Colin King
@ 2020-01-15  1:46 ` Pkshih
  0 siblings, 0 replies; 2+ messages in thread
From: Pkshih @ 2020-01-15  1:46 UTC (permalink / raw)
  To: linux-wireless, colin.king, kvalo, davem, netdev
  Cc: linux-kernel, kernel-janitors

On Tue, 2020-01-14 at 16:56 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable cond is being assigned with a value that is never
> read, it is assigned a new value later on. 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>

Thank you!!

> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> index 5ca900f97d66..d13983ec09ad 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> @@ -264,7 +264,7 @@ static bool _rtl88e_check_condition(struct ieee80211_hw
> *hw,
>  	u32 _board = rtlefuse->board_type; /*need efuse define*/
>  	u32 _interface = rtlhal->interface;
>  	u32 _platform = 0x08;/*SupportPlatform */
> -	u32 cond = condition;
> +	u32 cond;
>  
>  	if (condition == 0xCDCDCDCD)
>  		return true;

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 16:56 [PATCH] rtlwifi: rtl8188ee: remove redundant assignment to variable cond Colin King
2020-01-15  1:46 ` Pkshih

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git