Skip to contentSkip to conversation

staging: ks7010: remove useless variable

PATCH In review Jiapeng Chong 2 participants 2 messages Apr 8, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ks7010: remove useless variable

Fix the following gcc warning:

drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set but not used [-Wunused-but-set-variable].

---
 drivers/staging/ks7010/ks_hostif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ks7010/ks_hostif.c +1 -2
index 8bc3b7d..499161d 100644
@@ -926,14 +926,13 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
 void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 {
 	struct iw_statistics *wstats = &priv->wstats;
-	u8 rssi, signal, noise;
+	u8 rssi, signal;
 	u8 link_speed;
 	u32 transmitted_frame_count, received_fragment_count;
 	u32 failed_count, fcs_error_count;
 
 	rssi = get_byte(priv);
 	signal = get_byte(priv);
-	noise = get_byte(priv);
 	link_speed = get_byte(priv);
 	transmitted_frame_count = get_dword(priv);
 	received_fragment_count = get_dword(priv);
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 18 lines · Jiapeng Chong

Fix the following gcc warning:

drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set but not used [-Wunused-but-set-variable].

---
 drivers/staging/ks7010/ks_hostif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ks7010/ks_hostif.c +0 -0
index 8bc3b7d..499161d 100644
@@ -926,14 +926,13 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
 void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 {

drivers/staging/ks7010/ks_hostif.c void hostif_bss_scan_confirm(struct ks_wlan_private *priv) · line 936

Quoted 10 lines
drivers/staging/ks7010/ks_hostif.c +1 -2
 	struct iw_statistics *wstats = &priv->wstats;
-	u8 rssi, signal, noise;
+	u8 rssi, signal;
 	u8 link_speed;
 	u32 transmitted_frame_count, received_fragment_count;
 	u32 failed_count, fcs_error_count;
 
 	rssi = get_byte(priv);
 	signal = get_byte(priv);
-	noise = get_byte(priv);

Are you sure you did not just break the functionality of the device here?

thanks,

greg k-h