Skip to contentSkip to conversation

Remove unused structs and members

PATCH New Ethan Tidmore 1 participant 3 messages Feb 9 Staging

lore
Share & tools
lore
#0 lore raw

cover Remove unused structs and members

This series removes multiple structs and members in rtw_wdev_priv as they are never used anywhere in the driver and are just dead code.

Ethan Tidmore (2):
staging: rtl8723bs: Remove unused structs and helper functions
staging: rtl8723bs: Remove unused members in struct rtw_wdev_priv

 .../rtl8723bs/include/ioctl_cfg80211.h        | 60 -------------------
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  7 ---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  1 -
 3 files changed, 68 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/2 staging: rtl8723bs: Remove unused structs and helper functions

Remove structs rtw_wdev_invit_info and rtw_wdev_nego_info along with their initializer macros as they are never used anywhere in the driver.

---
 .../rtl8723bs/include/ioctl_cfg80211.h        | 55 -------------------
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  2 -
 2 files changed, 57 deletions(-)
drivers/staging/rtl8723bs/include/ioctl_cfg80211.h +0 -55
index 753009b07451..782f79e9228a 100644
@@ -7,58 +7,6 @@
 #ifndef __IOCTL_CFG80211_H__
 #define __IOCTL_CFG80211_H__
 
-struct rtw_wdev_invit_info {
-	u8 state; /* 0: req, 1:rep */
-	u8 peer_mac[ETH_ALEN];
-	u8 active;
-	u8 token;
-	u8 flags;
-	u8 status;
-	u8 req_op_ch;
-	u8 rsp_op_ch;
-};
-
-#define rtw_wdev_invit_info_init(invit_info) \
-	do { \
-		(invit_info)->state = 0xff; \
-		memset((invit_info)->peer_mac, 0, ETH_ALEN); \
-		(invit_info)->active = 0xff; \
-		(invit_info)->token = 0; \
-		(invit_info)->flags = 0x00; \
-		(invit_info)->status = 0xff; \
-		(invit_info)->req_op_ch = 0; \
-		(invit_info)->rsp_op_ch = 0; \
-	} while (0)
-
-struct rtw_wdev_nego_info {
-	u8 state; /* 0: req, 1:rep, 2:conf */
-	u8 peer_mac[ETH_ALEN];
-	u8 active;
-	u8 token;
-	u8 status;
-	u8 req_intent;
-	u8 req_op_ch;
-	u8 req_listen_ch;
-	u8 rsp_intent;
-	u8 rsp_op_ch;
-	u8 conf_op_ch;
-};
-
-#define rtw_wdev_nego_info_init(nego_info) \
-	do { \
-		(nego_info)->state = 0xff; \
-		memset((nego_info)->peer_mac, 0, ETH_ALEN); \
-		(nego_info)->active = 0xff; \
-		(nego_info)->token = 0; \
-		(nego_info)->status = 0xff; \
-		(nego_info)->req_intent = 0xff; \
-		(nego_info)->req_op_ch = 0; \
-		(nego_info)->req_listen_ch = 0; \
-		(nego_info)->rsp_intent = 0xff; \
-		(nego_info)->rsp_op_ch = 0; \
-		(nego_info)->conf_op_ch = 0; \
-	} while (0)
-
 struct rtw_wdev_priv {
 	struct wireless_dev *rtw_wdev;
 
@@ -74,9 +22,6 @@ struct rtw_wdev_priv {
 
 	u8 provdisc_req_issued;
 
-	struct rtw_wdev_invit_info invit_info;
-	struct rtw_wdev_nego_info nego_info;
-
 	u8 bandroid_scan;
 	bool block;
 	bool power_mgmt;
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -2
index a47d0d3fa2b7..21b1487d32ae 100644
@@ -2751,8 +2751,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
 
 	pwdev_priv->p2p_enabled = false;
 	pwdev_priv->provdisc_req_issued = false;
-	rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
-	rtw_wdev_nego_info_init(&pwdev_priv->nego_info);
 
 	pwdev_priv->bandroid_scan = false;
 
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/2 staging: rtl8723bs: Remove unused members in struct rtw_wdev_priv

In reply to Ethan Tidmore

Remove members p2p_enabled, provdisc_req_issued, bandroid_scan in rtw_wdev_priv as they are never used anywhere in the driver.

---
 drivers/staging/rtl8723bs/include/ioctl_cfg80211.h | 5 -----
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c  | 5 -----
 drivers/staging/rtl8723bs/os_dep/os_intfs.c        | 1 -
 3 files changed, 11 deletions(-)
drivers/staging/rtl8723bs/include/ioctl_cfg80211.h +0 -5
index 782f79e9228a..bc62b7285950 100644
@@ -18,11 +18,6 @@ struct rtw_wdev_priv {
 	struct net_device *pmon_ndev;/* for monitor interface */
 	char ifname_mon[IFNAMSIZ + 1]; /* interface name for monitor interface */
 
-	u8 p2p_enabled;
-
-	u8 provdisc_req_issued;
-
-	u8 bandroid_scan;
 	bool block;
 	bool power_mgmt;
 };
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -5
index 21b1487d32ae..3c491f61c680 100644
@@ -2749,11 +2749,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
 	pwdev_priv->scan_request = NULL;
 	spin_lock_init(&pwdev_priv->scan_req_lock);
 
-	pwdev_priv->p2p_enabled = false;
-	pwdev_priv->provdisc_req_issued = false;
-
-	pwdev_priv->bandroid_scan = false;
-
 	if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
 		pwdev_priv->power_mgmt = true;
 	else
drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -1
index 21a0c3cf4c31..7ac197462773 100644
@@ -960,7 +960,6 @@ static int netdev_close(struct net_device *pnetdev)
 	}
 
 	rtw_scan_abort(padapter);
-	adapter_wdev_data(padapter)->bandroid_scan = false;
 
 	return 0;
 }
Signature · 1 line
2.53.0