Skip to contentSkip to conversation

Staging: rtl8723bs: remove unnecessary enum names and definitions

PATCH In review Marco Cesati 3 participants 40 messages Mar 24, 2021 – Mar 26, 2021 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: rtl8723bs: remove unnecessary enum names and definitions

The staging/rtl8723bs driver includes 82 enum definitions whose names are not referenced in the code. Furthermore, 57 enum definitions are useless, because the enum elements do not appear in the code. This patchset transforms 82 'named' enums in 'anonymous' enums and removes 57 enum definitions.

[PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h [PATCH 02/33] Staging: rtl8723bs: remove named enums in rtw_cmd.h [PATCH 03/33] Staging: rtl8723bs: remove named enums in rtw_eeprom.h [PATCH 04/33] Staging: rtl8723bs: remove named enums in hal_com.h [PATCH 05/33] Staging: rtl8723bs: remove named enums in rtw_recv.h [PATCH 06/33] Staging: rtl8723bs: remove named enums in drv_types.h [PATCH 07/33] Staging: rtl8723bs: remove named enums in rtw_ht.h [PATCH 08/33] Staging: rtl8723bs: remove named enums in wlan_bssdef.h [PATCH 09/33] Staging: rtl8723bs: remove named enums in rtw_mp.h [PATCH 10/33] Staging: rtl8723bs: remove named enums in osdep_service.h [PATCH 11/33] Staging: rtl8723bs: remove named enums in hal_intf.h [PATCH 12/33] Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h [PATCH 13/33] Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h [PATCH 14/33] Staging: rtl8723bs: remove named enums in hal_com_h2c.h [PATCH 15/33] Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h [PATCH 16/33] Staging: rtl8723bs: remove named enums in wifi.h [PATCH 17/33] Staging: rtl8723bs: remove named enums in rtl8723b_hal.h [PATCH 18/33] Staging: rtl8723bs: remove named enums in hal_phy.h [PATCH 19/33] Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h [PATCH 20/33] Staging: rtl8723bs: remove named enums in rtw_xmit.h [PATCH 21/33] Staging: rtl8723bs: remove named enums in rtw_rf.h [PATCH 22/33] Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h [PATCH 23/33] Staging: rtl8723bs: remove named enums in hal_com_phycfg.h [PATCH 24/33] Staging: rtl8723bs: remove named enums in ieee80211.h [PATCH 25/33] Staging: rtl8723bs: remove named enums in rtw_efuse.h [PATCH 26/33] Staging: rtl8723bs: remove named enums in odm_interface.h [PATCH 27/33] Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h [PATCH 28/33] Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h [PATCH 29/33] Staging: rtl8723bs: remove named enums in odm_types.h [PATCH 30/33] Staging: rtl8723bs: remove named enums in odm_DIG.h [PATCH 31/33] Staging: rtl8723bs: remove named enums in HalPhyRf.h [PATCH 32/33] Staging: rtl8723bs: remove named enums in odm.h [PATCH 33/33] Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

 .../staging/rtl8723bs/hal/HalBtc8723b1Ant.h   |   8 +-
 .../staging/rtl8723bs/hal/HalBtc8723b2Ant.h   |   6 +-
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h  |  70 +++-----
 drivers/staging/rtl8723bs/hal/HalPhyRf.h      |   5 -
 drivers/staging/rtl8723bs/hal/odm.h           | 150 ++----------------
 drivers/staging/rtl8723bs/hal/odm_DIG.h       |  16 --
 drivers/staging/rtl8723bs/hal/odm_interface.h |   9 --
 drivers/staging/rtl8723bs/hal/odm_types.h     |  41 -----
 .../staging/rtl8723bs/include/HalPwrSeqCmd.h  |   2 +-
 drivers/staging/rtl8723bs/include/drv_types.h |  19 +--
 drivers/staging/rtl8723bs/include/hal_com.h   |   4 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  60 -------
 .../rtl8723bs/include/hal_com_phycfg.h        |   4 +-
 drivers/staging/rtl8723bs/include/hal_intf.h  |  26 +--
 drivers/staging/rtl8723bs/include/hal_phy.h   |  44 +----
 drivers/staging/rtl8723bs/include/ieee80211.h |  89 +----------
 .../staging/rtl8723bs/include/osdep_service.h |  25 ---
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   2 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   4 +-
 drivers/staging/rtl8723bs/include/rtw_cmd.h   |   8 +-
 .../staging/rtl8723bs/include/rtw_eeprom.h    |   2 +-
 drivers/staging/rtl8723bs/include/rtw_efuse.h |   2 +-
 drivers/staging/rtl8723bs/include/rtw_ht.h    |   6 +-
 drivers/staging/rtl8723bs/include/rtw_mlme.h  |  16 +-
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |  24 +--
 drivers/staging/rtl8723bs/include/rtw_mp.h    |  98 ------------
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |   5 +-
 drivers/staging/rtl8723bs/include/rtw_recv.h  |   2 +-
 drivers/staging/rtl8723bs/include/rtw_rf.h    |  32 +---
 .../staging/rtl8723bs/include/rtw_wifi_regd.h |   7 -
 drivers/staging/rtl8723bs/include/rtw_xmit.h  |   7 -
 drivers/staging/rtl8723bs/include/wifi.h      |  28 +---
 .../staging/rtl8723bs/include/wlan_bssdef.h   |  13 +-
 33 files changed, 82 insertions(+), 752 deletions(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/33 Staging: rtl8723bs: remove named enums in rtw_mlme.h

Remove the following unnecessary enum names or definitions in include/rtw_mlme.h:

enum dot11AuthAlgrthmNum [name]
enum _band [name]
enum DriverInterface [definition]
enum scan_result_type [definition]

---
 drivers/staging/rtl8723bs/include/rtw_mlme.h | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/include/rtw_mlme.h +2 -14
index 25cfb4cc021b..87a1fa8f347e 100644
@@ -71,7 +71,7 @@
 #define _FW_UNDER_SURVEY	WIFI_SITE_MONITOR
 
 
-enum dot11AuthAlgrthmNum {
+enum {
  dot11AuthAlgrthm_Open = 0,
  dot11AuthAlgrthm_Shared,
  dot11AuthAlgrthm_8021X,
@@ -87,7 +87,7 @@ enum rt_scan_type {
 	SCAN_MIX,
 };
 
-enum  _band {
+enum {
 	GHZ24_50 = 0,
 	GHZ_50,
 	GHZ_24,
@@ -96,18 +96,6 @@ enum  _band {
 
 #define rtw_band_valid(band) ((band) >= GHZ24_50 && (band) < GHZ_MAX)
 
-enum DriverInterface {
-	DRIVER_WEXT =  1,
-	DRIVER_CFG80211 = 2
-};
-
-enum scan_result_type {
-	SCAN_RESULT_P2P_ONLY = 0,		/* 	Will return all the P2P devices. */
-	SCAN_RESULT_ALL = 1,			/* 	Will return all the scanned device, include AP. */
-	SCAN_RESULT_WFD_TYPE = 2		/* 	Will just return the correct WFD device. */
-									/* 	If this device is Miracast sink device, it will just return all the Miracast source devices. */
-};
-
 /*
 
 there are several "locks" in mlme_priv,
Signature · 1 line
2.30.2
#2 lore raw

Re: [PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h

Quoted 5 lines · Marco Cesati

Remove the following unnecessary enum names or definitions in include/rtw_mlme.h:

	enum dot11AuthAlgrthmNum	[name]
	enum  _band			[name]

Sorry, I was unclear. I liked the names fine, it just that _band was a bad name. It's too vague and what's with the underscore character?

Quoted 2 lines

enum DriverInterface [definition]
enum scan_result_type [definition]

These are good to delete. And it wouldn't surprise me if you found a bunch of these enums were duplicates of more standard global enums.

regards,
dan carpenter

#3 lore raw

Re: [PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h

Quoted 9 lines · Dan Carpenter
Quoted 5 lines · Marco Cesati

Remove the following unnecessary enum names or definitions in include/rtw_mlme.h:

	enum dot11AuthAlgrthmNum	[name]
	enum  _band			[name]

Sorry, I was unclear. I liked the names fine, it just that _band was a bad name. It's too vague and what's with the underscore character?

So, just to be sure, beside the singular case "_band", are you objecting to remove the names of the enums that are never referenced in the code? That is, to transform "enum XXX { ... };" into "enum { ... };", as long as "XXX" is not used elsewhere.

Quoted 6 lines
Quoted 3 lines

enum DriverInterface [definition]
enum scan_result_type [definition]

These are good to delete. And it wouldn't surprise me if you found a bunch of these enums were duplicates of more standard global enums.

OK. Thank you,

Marco

Quoted 5 lines

regards,
dan carpenter

Signature · 6 lines
---- 
Marco Cesati, PhD
Dept. of Civil Engineering and Computer Science Engineering
Univ. of Rome Tor Vergata
via del Politecnico 1, I-00133 Rome, Italy
Tel. +39 06 7259 7389
#4 lore raw

PATCH 2/33 Staging: rtl8723bs: remove named enums in rtw_cmd.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
include/rtw_cmd.h:

enum rtw_drvextra_cmd_id
enum lps_ctrl_type
enum rfintfs
enum rtw_h2c_cmd

---
 drivers/staging/rtl8723bs/include/rtw_cmd.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/include/rtw_cmd.h +4 -4
index 88cbc12ce5d4..87cbad525393 100644
@@ -119,7 +119,7 @@ extern void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
 extern void rtw_free_evt_priv(struct evt_priv *pevtpriv);
 extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
 
-enum rtw_drvextra_cmd_id {
+enum {
 	NONE_WK_CID,
 	DYNAMIC_CHK_WK_CID,
 	DM_CTRL_WK_CID,
@@ -143,7 +143,7 @@ enum rtw_drvextra_cmd_id {
 	MAX_WK_CID
 };
 
-enum lps_ctrl_type {
+enum {
 	LPS_CTRL_SCAN = 0,
 	LPS_CTRL_JOINBSS = 1,
 	LPS_CTRL_CONNECT = 2,
@@ -153,7 +153,7 @@ enum lps_ctrl_type {
 	LPS_CTRL_TRAFFIC_BUSY = 6,
 };
 
-enum rfintfs {
+enum {
 	SWSI,
 	HWSI,
 	HWPI,
@@ -641,7 +641,7 @@ struct _cmd_callback {
 	void (*callback)(struct adapter  *padapter, struct cmd_obj *cmd);
 };
 
-enum rtw_h2c_cmd {
+enum {
 	GEN_CMD_CODE(_Read_MACREG),	/*0*/
 	GEN_CMD_CODE(_Write_MACREG),
 	GEN_CMD_CODE(_Read_BBREG),
Signature · 1 line
2.30.2
#5 lore raw

PATCH 3/33 Staging: rtl8723bs: remove named enums in rtw_eeprom.h

In reply to Marco Cesati

Remove the following unnecessary enum name
include/rtw_eeprom.h:

enum rt_customer_id

---
 drivers/staging/rtl8723bs/include/rtw_eeprom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/rtw_eeprom.h +1 -1
index da7f14aadaa0..9b84105af816 100644
@@ -42,7 +42,7 @@
 /*  Besides, CustomerID of registry has precedence of that of EEPROM. */
 /*  defined below. 060703, by rcnjko. */
 /*  */
-enum rt_customer_id {
+enum {
 	RT_CID_DEFAULT = 0,
 	RT_CID_8187_ALPHA0 = 1,
 	RT_CID_8187_SERCOMM_PS = 2,
Signature · 1 line
2.30.2
#6 lore raw

PATCH 4/33 Staging: rtl8723bs: remove named enums in hal_com.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in include/hal_com.h:

enum firmware_source

---
 drivers/staging/rtl8723bs/include/hal_com.h | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/include/hal_com.h +0 -4
index 28451385dec3..3629b912698a 100644
@@ -171,10 +171,6 @@ enum rt_media_status {
 };
 
 #define MAX_DLFW_PAGE_SIZE			4096	/*  @ page : 4k bytes */
-enum firmware_source {
-	FW_SOURCE_IMG_FILE = 0,
-	FW_SOURCE_HEADER_FILE = 1,		/* from header file */
-};
 
 /*  BK, BE, VI, VO, HCCA, MANAGEMENT, COMMAND, HIGH, BEACON. */
 /* define MAX_TX_QUEUE		9 */
Signature · 1 line
2.30.2
#7 lore raw

PATCH 5/33 Staging: rtl8723bs: remove named enums in rtw_recv.h

In reply to Marco Cesati

Remove the following unnecessary enum name in
include/rtw_recv.h:

enum rx_packet_type

---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/rtw_recv.h +1 -1
index 2709c9413dbc..d007f90d02c3 100644
@@ -349,7 +349,7 @@ union recv_frame {
 
 };
 
-enum rx_packet_type {
+enum {
 	NORMAL_RX,/* Normal rx packet */
 	TX_REPORT1,/* CCX */
 	TX_REPORT2,/* TX RPT */
Signature · 1 line
2.30.2
#8 lore raw

PATCH 6/33 Staging: rtl8723bs: remove named enums in drv_types.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/drv_types.h:

enum _nic_version [definition]
enum _iface_type [name]
enum adapter_type [definition]
enum driver_state [name]

---
 drivers/staging/rtl8723bs/include/drv_types.h | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +2 -17
index 1658450b386e..df1dd9fa7b90 100644
@@ -24,15 +24,6 @@
 #include <wifi.h>
 #include <ieee80211.h>
 
-enum _nic_version {
-
-	RTL8711_NIC,
-	RTL8712_NIC,
-	RTL8713_NIC,
-	RTL8716_NIC
-
-};
-
 #include <rtw_rf.h>
 
 #include <rtw_ht.h>
@@ -347,19 +338,13 @@ static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
 
 struct adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj);
 
-enum _iface_type {
+enum {
 	IFACE_PORT0, /* mapping to port0 for C/D series chips */
 	IFACE_PORT1, /* mapping to port1 for C/D series chip */
 	MAX_IFACE_PORT,
 };
 
-enum adapter_type {
-	PRIMARY_ADAPTER,
-	SECONDARY_ADAPTER,
-	MAX_ADAPTER = 0xFF,
-};
-
-enum driver_state {
+enum {
 	DRIVER_NORMAL = 0,
 	DRIVER_DISAPPEAR = 1,
 	DRIVER_REPLACE_DONGLE = 2,
Signature · 1 line
2.30.2
#9 lore raw

PATCH 7/33 Staging: rtl8723bs: remove named enums in rtw_ht.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
include/rtw_ht.h:

enum aggre_size_e
enum rt_ht_inf0_capbility
enum rt_ht_inf1_capbility

---
 drivers/staging/rtl8723bs/include/rtw_ht.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_ht.h +3 -3
index fb321d20d276..e3f353fe1e47 100644
@@ -37,7 +37,7 @@ struct ht_priv {
 
 };
 
-enum aggre_size_e {
+enum {
 	HT_AGG_SIZE_8K = 0,
 	HT_AGG_SIZE_16K = 1,
 	HT_AGG_SIZE_32K = 2,
@@ -48,7 +48,7 @@ enum aggre_size_e {
 	VHT_AGG_SIZE_1024K = 7,
 };
 
-enum rt_ht_inf0_capbility {
+enum {
 	RT_HT_CAP_USE_TURBO_AGGR = 0x01,
 	RT_HT_CAP_USE_LONG_PREAMBLE = 0x02,
 	RT_HT_CAP_USE_AMPDU = 0x04,
@@ -59,7 +59,7 @@ enum rt_ht_inf0_capbility {
 	RT_HT_CAP_USE_AP_CLIENT_MODE = 0x80,	/*  AP team request to reserve this bit, by Emily */
 };
 
-enum rt_ht_inf1_capbility {
+enum {
 	RT_HT_CAP_USE_VIDEO_CLIENT = 0x01,
 	RT_HT_CAP_USE_JAGUAR_BCUT = 0x02,
 	RT_HT_CAP_USE_JAGUAR_CCUT = 0x04,
Signature · 1 line
2.30.2
#10 lore raw

PATCH 8/33 Staging: rtl8723bs: remove named enums in wlan_bssdef.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/wlan_bssdef.h:

	enum ndis_802_11_wep_status		[name]
	enum ndis_802_11_reload_defaults	[definition]
	enum vrtl_carrier_sense			[name]
	enum vcs_type				[name]
	enum uapsd_max_sp			[name]
---
 drivers/staging/rtl8723bs/include/wlan_bssdef.h | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
drivers/staging/rtl8723bs/include/wlan_bssdef.h +4 -9
index 9d63dc003795..a45990bed80c 100644
@@ -91,7 +91,7 @@ enum ndis_802_11_authentication_mode {
 	Ndis802_11AuthModeMax   /*  Not a real mode, defined as upper bound */
 };
 
-enum ndis_802_11_wep_status {
+enum {
 	Ndis802_11WEPEnabled,
 	Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
 	Ndis802_11WEPDisabled,
@@ -127,11 +127,6 @@ struct ndis_801_11_ai_resfi {
 	u16 AssociationId;
 };
 
-enum ndis_802_11_reload_defaults {
-	Ndis802_11ReloadWEPKeys
-};
-
-
 /*  Key mapping keys require a BSSID */
 
 struct ndis_802_11_wep {
@@ -210,13 +205,13 @@ struct	wlan_network {
 	struct wlan_bcn_info	BcnInfo;
 };
 
-enum vrtl_carrier_sense {
+enum {
 	DISABLE_VCS,
 	ENABLE_VCS,
 	AUTO_VCS
 };
 
-enum vcs_type {
+enum {
 	NONE_VCS,
 	RTS_CTS,
 	CTS_TO_SELF
@@ -228,7 +223,7 @@ enum vcs_type {
 #define PWR_UAPSD 3
 #define PWR_VOIP 4
 
-enum uapsd_max_sp {
+enum {
 	NO_LIMIT,
 	TWO_MSDU,
 	FOUR_MSDU,
Signature · 1 line
2.30.2
#11 lore raw

PATCH 9/33 Staging: rtl8723bs: remove named enums in rtw_mp.h

In reply to Marco Cesati

Remove the following unnecessary enum definitions in include/rtw_mp.h:

enum mp_mode
enum mpt_rate_index
enum power_mode
enum ofdm_tx_mode
enum encry_ctrl_state
enum mpt_txpwr_def

---
 drivers/staging/rtl8723bs/include/rtw_mp.h | 98 ----------------------
 1 file changed, 98 deletions(-)
drivers/staging/rtl8723bs/include/rtw_mp.h +0 -98
index ead63cf09fe0..26dec21bf0f1 100644
@@ -265,97 +265,12 @@ struct mp_priv {
 /* Hardware Registers */
 #define BB_REG_BASE_ADDR		0x800
 
-/* MP variables */
-enum mp_mode {
-	MP_OFF,
-	MP_ON,
-	MP_ERR,
-	MP_CONTINUOUS_TX,
-	MP_SINGLE_CARRIER_TX,
-	MP_CARRIER_SUPPRISSION_TX,
-	MP_SINGLE_TONE_TX,
-	MP_PACKET_TX,
-	MP_PACKET_RX
-};
-
 #define MAX_RF_PATH_NUMS	RF_PATH_MAX
 
 extern u8 mpdatarate[NumRates];
 
-/* MP set force data rate base on the definition. */
-enum mpt_rate_index {
-	/* CCK rate. */
-	MPT_RATE_1M = 0,	/* 0 */
-	MPT_RATE_2M,
-	MPT_RATE_55M,
-	MPT_RATE_11M,	/* 3 */
-
-	/* OFDM rate. */
-	MPT_RATE_6M,	/* 4 */
-	MPT_RATE_9M,
-	MPT_RATE_12M,
-	MPT_RATE_18M,
-	MPT_RATE_24M,
-	MPT_RATE_36M,
-	MPT_RATE_48M,
-	MPT_RATE_54M,	/* 11 */
-
-	/* HT rate. */
-	MPT_RATE_MCS0,	/* 12 */
-	MPT_RATE_MCS1,
-	MPT_RATE_MCS2,
-	MPT_RATE_MCS3,
-	MPT_RATE_MCS4,
-	MPT_RATE_MCS5,
-	MPT_RATE_MCS6,
-	MPT_RATE_MCS7,	/* 19 */
-	MPT_RATE_MCS8,
-	MPT_RATE_MCS9,
-	MPT_RATE_MCS10,
-	MPT_RATE_MCS11,
-	MPT_RATE_MCS12,
-	MPT_RATE_MCS13,
-	MPT_RATE_MCS14,
-	MPT_RATE_MCS15,	/* 27 */
-	/* VHT rate. Total: 20*/
-	MPT_RATE_VHT1SS_MCS0 = 100,/*  To reserve MCS16~MCS31, the index starts from #100. */
-	MPT_RATE_VHT1SS_MCS1, /*  #101 */
-	MPT_RATE_VHT1SS_MCS2,
-	MPT_RATE_VHT1SS_MCS3,
-	MPT_RATE_VHT1SS_MCS4,
-	MPT_RATE_VHT1SS_MCS5,
-	MPT_RATE_VHT1SS_MCS6, /*  #106 */
-	MPT_RATE_VHT1SS_MCS7,
-	MPT_RATE_VHT1SS_MCS8,
-	MPT_RATE_VHT1SS_MCS9,
-	MPT_RATE_VHT2SS_MCS0,
-	MPT_RATE_VHT2SS_MCS1, /*  #111 */
-	MPT_RATE_VHT2SS_MCS2,
-	MPT_RATE_VHT2SS_MCS3,
-	MPT_RATE_VHT2SS_MCS4,
-	MPT_RATE_VHT2SS_MCS5,
-	MPT_RATE_VHT2SS_MCS6, /*  #116 */
-	MPT_RATE_VHT2SS_MCS7,
-	MPT_RATE_VHT2SS_MCS8,
-	MPT_RATE_VHT2SS_MCS9,
-	MPT_RATE_LAST
-};
-
 #define MAX_TX_PWR_INDEX_N_MODE 64	/*  0x3F */
 
-enum power_mode {
-	POWER_LOW = 0,
-	POWER_NORMAL
-};
-
-/*  The following enumeration is used to define the value of Reg0xD00[30:28] or JaguarReg0x914[18:16]. */
-enum ofdm_tx_mode {
-	OFDM_ALL_OFF		= 0,
-	OFDM_ContinuousTx	= 1,
-	OFDM_SingleCarrier	= 2,
-	OFDM_SingleTone		= 4,
-};
-
 #define RX_PKT_BROADCAST	1
 #define RX_PKT_DEST_ADDR	2
 #define RX_PKT_PHY_MATCH	3
@@ -371,19 +286,6 @@ enum ofdm_tx_mode {
 #define Mac_HT_FasleAlarm		0x90000000
 #define Mac_DropPacket			0xA0000000
 
-enum encry_ctrl_state {
-	HW_CONTROL,		/* hw encryption& decryption */
-	SW_CONTROL,		/* sw encryption& decryption */
-	HW_ENCRY_SW_DECRY,	/* hw encryption & sw decryption */
-	SW_ENCRY_HW_DECRY	/* sw encryption & hw decryption */
-};
-
-enum mpt_txpwr_def {
-	MPT_CCK,
-	MPT_OFDM, /*  L and HT OFDM */
-	MPT_VHT_OFDM
-};
-
 #define		REG_RF_BB_GAIN_OFFSET	0x7f
 #define		RF_GAIN_OFFSET_MASK	0xfffff
 
Signature · 1 line
2.30.2
#12 lore raw

PATCH 10/33 Staging: rtl8723bs: remove named enums in osdep_service.h

In reply to Marco Cesati

Remove the following unnecessary enum definitions in include/osdep_service.h:

enum mstat_f
enum mstat_status

---
 .../staging/rtl8723bs/include/osdep_service.h | 25 -------------------
 1 file changed, 25 deletions(-)
drivers/staging/rtl8723bs/include/osdep_service.h +0 -25
index c4d29d65187f..fd8830a51707 100644
@@ -58,34 +58,9 @@
 
 extern int RTW_STATUS_CODE(int error_code);
 
-/* flags used for rtw_mstat_update() */
-enum mstat_f {
-	/* type: 0x00ff */
-	MSTAT_TYPE_VIR = 0x00,
-	MSTAT_TYPE_PHY = 0x01,
-	MSTAT_TYPE_SKB = 0x02,
-	MSTAT_TYPE_USB = 0x03,
-	MSTAT_TYPE_MAX = 0x04,
-
-	/* func: 0xff00 */
-	MSTAT_FUNC_UNSPECIFIED = 0x00<<8,
-	MSTAT_FUNC_IO = 0x01<<8,
-	MSTAT_FUNC_TX_IO = 0x02<<8,
-	MSTAT_FUNC_RX_IO = 0x03<<8,
-	MSTAT_FUNC_TX = 0x04<<8,
-	MSTAT_FUNC_RX = 0x05<<8,
-	MSTAT_FUNC_MAX = 0x06<<8,
-};
-
 #define mstat_tf_idx(flags) ((flags)&0xff)
 #define mstat_ff_idx(flags) (((flags)&0xff00) >> 8)
 
-enum mstat_status {
-	MSTAT_ALLOC_SUCCESS = 0,
-	MSTAT_ALLOC_FAIL,
-	MSTAT_FREE
-};
-
 #define rtw_mstat_update(flag, status, sz) do {} while (0)
 #define rtw_mstat_dump(sel) do {} while (0)
 void *_rtw_zmalloc(u32 sz);
Signature · 1 line
2.30.2
#13 lore raw

PATCH 11/33 Staging: rtl8723bs: remove named enums in hal_intf.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/hal_intf.h:

enum rtl871x_hci_type [name]
enum hw_variables [name]
enum rt_eeprom_type [definition]
enum wowlan_subcode [definition]

---
 drivers/staging/rtl8723bs/include/hal_intf.h | 26 ++------------------
 1 file changed, 2 insertions(+), 24 deletions(-)
drivers/staging/rtl8723bs/include/hal_intf.h +2 -24
index 3cd46a670e6d..45bebbadb7ca 100644
@@ -8,14 +8,14 @@
 #define __HAL_INTF_H__
 
 
-enum rtl871x_hci_type {
+enum {
 	RTW_PCIE	= BIT0,
 	RTW_USB		= BIT1,
 	RTW_SDIO	= BIT2,
 	RTW_GSPI	= BIT3,
 };
 
-enum hw_variables {
+enum {
 	HW_VAR_MEDIA_STATUS,
 	HW_VAR_MEDIA_STATUS1,
 	HW_VAR_SET_OPMODE,
@@ -257,12 +257,6 @@ struct hal_ops {
 	s32 (*fill_h2c_cmd)(struct adapter *, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
 };
 
-enum rt_eeprom_type {
-	EEPROM_93C46,
-	EEPROM_93C56,
-	EEPROM_BOOT_EFUSE,
-};
-
 #define RF_CHANGE_BY_INIT	0
 #define RF_CHANGE_BY_IPS	BIT28
 #define RF_CHANGE_BY_PS		BIT29
@@ -272,22 +266,6 @@ enum rt_eeprom_type {
 #define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
 #define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
 
-enum wowlan_subcode {
-	WOWLAN_PATTERN_MATCH	= 1,
-	WOWLAN_MAGIC_PACKET		= 2,
-	WOWLAN_UNICAST			= 3,
-	WOWLAN_SET_PATTERN		= 4,
-	WOWLAN_DUMP_REG			= 5,
-	WOWLAN_ENABLE			= 6,
-	WOWLAN_DISABLE			= 7,
-	WOWLAN_STATUS			= 8,
-	WOWLAN_DEBUG_RELOAD_FW	= 9,
-	WOWLAN_DEBUG_1			= 10,
-	WOWLAN_DEBUG_2			= 11,
-	WOWLAN_AP_ENABLE		= 12,
-	WOWLAN_AP_DISABLE		= 13
-};
-
 #define Rx_Pairwisekey			0x01
 #define Rx_GTK					0x02
 #define Rx_DisAssoc				0x04
Signature · 1 line
2.30.2
#14 lore raw

PATCH 12/33 Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
include/rtw_pwrctrl.h:

enum Power_Mgnt
enum _PS_BBRegBackup_

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +2 -3
index cec9fc0cf794..2d77446e9482 100644
@@ -31,7 +31,7 @@
 #define BTCOEX_ALIVE	BIT(4)
 
 
-enum Power_Mgnt {
+enum {
 	PS_MODE_ACTIVE	= 0,
 	PS_MODE_MIN,
 	PS_MODE_MAX,
@@ -124,8 +124,7 @@ enum rt_rf_power_state {
 #define	RT_PCI_ASPM_OSC_ENABLE		BIT0 /*  PCI ASPM controlled by OS according to ACPI Spec 5.0 */
 #define	RT_PCI_ASPM_OSC_DISABLE		BIT1 /*  PCI ASPM controlled by driver or BIOS, i.e., force enable ASPM */
 
-
-enum _PS_BBRegBackup_ {
+enum {
 	PSBBREG_RF0 = 0,
 	PSBBREG_RF1,
 	PSBBREG_RF2,
Signature · 1 line
2.30.2
#15 lore raw

PATCH 13/33 Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h

In reply to Marco Cesati

Remove the following unnecessary enum name in
include/rtl8723b_cmd.h:

	enum h2c_cmd_8723B
---
 drivers/staging/rtl8723bs/include/rtl8723b_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/rtl8723b_cmd.h +1 -1
index 9629a8844c2d..dbcf01bbf051 100644
@@ -11,7 +11,7 @@
 /*     H2C CMD DEFINITION    ------------------------------------------------ */
 /*  */
 
-enum h2c_cmd_8723B {
+enum {
 	/* Common Class: 000 */
 	H2C_8723B_RSVD_PAGE = 0x00,
 	H2C_8723B_MEDIA_STATUS_RPT = 0x01,
Signature · 1 line
2.30.2
#16 lore raw

PATCH 14/33 Staging: rtl8723bs: remove named enums in hal_com_h2c.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in include/hal_com_h2c.h:

enum h2c_cmd

---
 .../staging/rtl8723bs/include/hal_com_h2c.h   | 60 -------------------
 1 file changed, 60 deletions(-)
drivers/staging/rtl8723bs/include/hal_com_h2c.h +0 -60
index 65e9548c7b68..c7c2ff6c83b1 100644
@@ -11,66 +11,6 @@
 /*     H2C CMD DEFINITION    ------------------------------------------------ */
 /*  */
 /*  88e, 8723b, 8812, 8821, 92e use the same FW code base */
-enum h2c_cmd {
-	/* Common Class: 000 */
-	H2C_RSVD_PAGE = 0x00,
-	H2C_MEDIA_STATUS_RPT = 0x01,
-	H2C_SCAN_ENABLE = 0x02,
-	H2C_KEEP_ALIVE = 0x03,
-	H2C_DISCON_DECISION = 0x04,
-	H2C_PSD_OFFLOAD = 0x05,
-	H2C_AP_OFFLOAD = 0x08,
-	H2C_BCN_RSVDPAGE = 0x09,
-	H2C_PROBERSP_RSVDPAGE = 0x0A,
-	H2C_FCS_RSVDPAGE = 0x10,
-	H2C_FCS_INFO = 0x11,
-	H2C_AP_WOW_GPIO_CTRL = 0x13,
-
-	/* PoweSave Class: 001 */
-	H2C_SET_PWR_MODE = 0x20,
-	H2C_PS_TUNING_PARA = 0x21,
-	H2C_PS_TUNING_PARA2 = 0x22,
-	H2C_P2P_LPS_PARAM = 0x23,
-	H2C_P2P_PS_OFFLOAD = 0x24,
-	H2C_PS_SCAN_ENABLE = 0x25,
-	H2C_SAP_PS_ = 0x26,
-	H2C_INACTIVE_PS_ = 0x27, /* Inactive_PS */
-	H2C_FWLPS_IN_IPS_ = 0x28,
-
-	/* Dynamic Mechanism Class: 010 */
-	H2C_MACID_CFG = 0x40,
-	H2C_TXBF = 0x41,
-	H2C_RSSI_SETTING = 0x42,
-	H2C_AP_REQ_TXRPT = 0x43,
-	H2C_INIT_RATE_COLLECT = 0x44,
-
-	/* BT Class: 011 */
-	H2C_B_TYPE_TDMA = 0x60,
-	H2C_BT_INFO = 0x61,
-	H2C_FORCE_BT_TXPWR = 0x62,
-	H2C_BT_IGNORE_WLANACT = 0x63,
-	H2C_DAC_SWING_VALUE = 0x64,
-	H2C_ANT_SEL_RSV = 0x65,
-	H2C_WL_OPMODE = 0x66,
-	H2C_BT_MP_OPER = 0x67,
-	H2C_BT_CONTROL = 0x68,
-	H2C_BT_WIFI_CTRL = 0x69,
-	H2C_BT_FW_PATCH = 0x6A,
-
-	/* WOWLAN Class: 100 */
-	H2C_WOWLAN = 0x80,
-	H2C_REMOTE_WAKE_CTRL = 0x81,
-	H2C_AOAC_GLOBAL_INFO = 0x82,
-	H2C_AOAC_RSVD_PAGE = 0x83,
-	H2C_AOAC_RSVD_PAGE2 = 0x84,
-	H2C_D0_SCAN_OFFLOAD_CTRL = 0x85,
-	H2C_D0_SCAN_OFFLOAD_INFO = 0x86,
-	H2C_CHNL_SWITCH_OFFLOAD = 0x87,
-	H2C_AOAC_RSVDPAGE3 = 0x88,
-
-	H2C_RESET_TSF = 0xC0,
-	H2C_MAXID,
-};
 
 #define H2C_RSVDPAGE_LOC_LEN		5
 #define H2C_MEDIA_STATUS_RPT_LEN		3
Signature · 1 line
2.30.2
#17 lore raw

PATCH 15/33 Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in include/rtw_wifi_regd.h:

enum country_code_type_t

---
 drivers/staging/rtl8723bs/include/rtw_wifi_regd.h | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/rtl8723bs/include/rtw_wifi_regd.h +0 -7
index 66bf3d1b1d5a..e611651cb40b 100644
@@ -8,13 +8,6 @@
 #ifndef __RTW_WIFI_REGD_H__
 #define __RTW_WIFI_REGD_H__
 
-enum country_code_type_t {
-	COUNTRY_CODE_USER = 0,
-
-	/*add new channel plan above this line */
-	COUNTRY_CODE_MAX
-};
-
 void rtw_regd_init(struct wiphy *wiphy,
 		   void (*reg_notifier)(struct wiphy *wiphy,
 					struct regulatory_request *request));
Signature · 1 line
2.30.2
#18 lore raw

PATCH 16/33 Staging: rtl8723bs: remove named enums in wifi.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/wifi.h:

enum wifi_frame_type [name]
enum wifi_frame_subtype [name]
enum wifi_reg_domain [definition]
enum p2p_proto_wk_id [definition]

---
 drivers/staging/rtl8723bs/include/wifi.h | 28 ++----------------------
 1 file changed, 2 insertions(+), 26 deletions(-)
drivers/staging/rtl8723bs/include/wifi.h +2 -26
index efef549bf811..48db55419bb3 100644
@@ -43,14 +43,14 @@
 /*  This test verifies the WLAN NIC can update the NAV through sending the CTS with large duration. */
 #define	WiFiNavUpperUs				30000	/*  30 ms */
 
-enum wifi_frame_type {
+enum {
 	WIFI_MGT_TYPE  =	(0),
 	WIFI_CTRL_TYPE =	(BIT(2)),
 	WIFI_DATA_TYPE =	(BIT(3)),
 	WIFI_QOS_DATA_TYPE	= (BIT(7)|BIT(3)),	/*  QoS Data */
 };
 
-enum wifi_frame_subtype {
+enum {
 
     /*  below is for mgt frame */
     WIFI_ASSOCREQ       = (0 | WIFI_MGT_TYPE),
@@ -88,20 +88,6 @@ enum wifi_frame_subtype {
     WIFI_QOS_DATA_NULL	= (BIT(6) | WIFI_QOS_DATA_TYPE),
 };
 
-enum wifi_reg_domain {
-	DOMAIN_FCC		= 1,
-	DOMAIN_IC		= 2,
-	DOMAIN_ETSI		= 3,
-	DOMAIN_SPAIN	= 4,
-	DOMAIN_FRANCE	= 5,
-	DOMAIN_MKK		= 6,
-	DOMAIN_ISRAEL	= 7,
-	DOMAIN_MKK1		= 8,
-	DOMAIN_MKK2		= 9,
-	DOMAIN_MKK3		= 10,
-	DOMAIN_MAX
-};
-
 #define _TO_DS_		BIT(8)
 #define _FROM_DS_	BIT(9)
 #define _MORE_FRAG_	BIT(10)
@@ -778,16 +764,6 @@ enum p2p_wpsinfo {
 
 #define	P2P_PRIVATE_IOCTL_SET_LEN		64
 
-enum p2p_proto_wk_id {
-	P2P_FIND_PHASE_WK = 0,
-	P2P_RESTORE_STATE_WK = 1,
-	P2P_PRE_TX_PROVDISC_PROCESS_WK = 2,
-	P2P_PRE_TX_NEGOREQ_PROCESS_WK = 3,
-	P2P_PRE_TX_INVITEREQ_PROCESS_WK = 4,
-	P2P_AP_P2P_CH_SWITCH_PROCESS_WK = 5,
-	P2P_RO_CH_WK = 6,
-};
-
 /* 	=====================WFD Section ===================== */
 /* 	For Wi-Fi Display */
 #define	WFD_ATTR_DEVICE_INFO			0x00
Signature · 1 line
2.30.2
#19 lore raw

PATCH 17/33 Staging: rtl8723bs: remove named enums in rtl8723b_hal.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
include/rtl8723b_hal.h:

enum c2h_evt
enum package_type_e

---
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +2 -2
index 9b043251ff30..c1d7249e3e9d 100644
@@ -152,7 +152,7 @@ struct rt_firmware_hdr {
 /* Description: Determine the types of C2H events that are the same in driver
  * and FW; First constructed by tynli. 2009.10.09.
  */
-enum c2h_evt {
+enum {
 	C2H_DBG = 0,
 	C2H_TSF = 1,
 	C2H_AP_RPT_RSP = 2,
@@ -174,7 +174,7 @@ struct c2h_evt_hdr_t {
 	u8 CmdSeq;
 } __attribute__((__packed__));
 
-enum package_type_e { /* tag_Package_Definition */
+enum { /* tag_Package_Definition */
 	PACKAGE_DEFAULT,
 	PACKAGE_QFN68,
 	PACKAGE_TFBGA90,
Signature · 1 line
2.30.2
#20 lore raw

PATCH 18/33 Staging: rtl8723bs: remove named enums in hal_phy.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/hal_phy.h:

enum rf_type [name]
enum antenna_path [definition]
enum rf_content [definition]
enum BaseBand_Config_Type [definition]
enum hw_block [definition]

---
 drivers/staging/rtl8723bs/include/hal_phy.h | 44 +--------------------
 1 file changed, 1 insertion(+), 43 deletions(-)
drivers/staging/rtl8723bs/include/hal_phy.h +1 -43
index 90bb5d784674..bf17a85b5959 100644
@@ -49,7 +49,7 @@ enum band_type {
 	BANDMAX
 };
 
-enum rf_type {
+enum {
 	RF_TYPE_MIN = 0,	/*  0 */
 	RF_8225 = 1,		/*  1 11b/g RF for verification only */
 	RF_8256 = 2,		/*  2 11b/g/n */
@@ -74,48 +74,6 @@ enum rf_path {
 #define	RF_PATH_MAX_92C_88E		2
 #define	RF_PATH_MAX_90_8812		4	/* Max RF number 90 support */
 
-enum antenna_path {
-       ANTENNA_NONE	= 0,
-	ANTENNA_D	= 1,
-	ANTENNA_C	= 2,
-	ANTENNA_CD	= 3,
-	ANTENNA_B	= 4,
-	ANTENNA_BD	= 5,
-	ANTENNA_BC	= 6,
-	ANTENNA_BCD	= 7,
-	ANTENNA_A	= 8,
-	ANTENNA_AD	= 9,
-	ANTENNA_AC	= 10,
-	ANTENNA_ACD	= 11,
-	ANTENNA_AB	= 12,
-	ANTENNA_ABD	= 13,
-	ANTENNA_ABC	= 14,
-	ANTENNA_ABCD	= 15
-};
-
-enum rf_content {
-	radioa_txt = 0x1000,
-	radiob_txt = 0x1001,
-	radioc_txt = 0x1002,
-	radiod_txt = 0x1003
-};
-
-enum BaseBand_Config_Type {
-	BaseBand_Config_PHY_REG = 0,			/* Radio Path A */
-	BaseBand_Config_AGC_TAB = 1,			/* Radio Path B */
-	BaseBand_Config_AGC_TAB_2G = 2,
-	BaseBand_Config_AGC_TAB_5G = 3,
-	BaseBand_Config_PHY_REG_PG
-};
-
-enum hw_block {
-	HW_BLOCK_MAC = 0,
-	HW_BLOCK_PHY0 = 1,
-	HW_BLOCK_PHY1 = 2,
-	HW_BLOCK_RF = 3,
-	HW_BLOCK_MAXIMUM = 4, /*  Never use this */
-};
-
 enum wireless_mode {
 	WIRELESS_MODE_UNKNOWN = 0x00,
 	WIRELESS_MODE_A = 0x01,
Signature · 1 line
2.30.2
#21 lore raw

PATCH 19/33 Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/rtw_mlme_ext.h:

enum rt_channel_domain [name]
enum rt_channel_domain_2g [name]
enum rt_channel_domain_5g [name]
enum Associated_AP [definition]
enum ht_iot_peer_e [name]
enum scan_state [name]
enum rtw_c2h_event [name]

---
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  | 24 +++++--------------
 1 file changed, 6 insertions(+), 18 deletions(-)
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +6 -18
index fb283dc04ee2..e3dce1b2e553 100644
@@ -115,7 +115,7 @@ extern unsigned char WMM_PARA_OUI[];
 /* 	If you just wnat to customize the acitions(scan period or join actions) about one of the channel plan, */
 /* 	customize them in rt_channel_info in the RT_CHANNEL_LIST. */
 /*  */
-enum rt_channel_domain {
+enum {
 	/*  old channel plan mapping ===== */
 	RT_CHANNEL_DOMAIN_FCC = 0x00,
 	RT_CHANNEL_DOMAIN_IC = 0x01,
@@ -183,7 +183,7 @@ enum rt_channel_domain {
 	RT_CHANNEL_DOMAIN_REALTEK_DEFINE = 0x7F,
 };
 
-enum rt_channel_domain_2g {
+enum {
 	RT_CHANNEL_DOMAIN_2G_WORLD = 0x00,		/* Worldwird 13 */
 	RT_CHANNEL_DOMAIN_2G_ETSI1 = 0x01,		/* Europe */
 	RT_CHANNEL_DOMAIN_2G_FCC1 = 0x02,		/* US */
@@ -195,7 +195,7 @@ enum rt_channel_domain_2g {
 	RT_CHANNEL_DOMAIN_2G_MAX,
 };
 
-enum rt_channel_domain_5g {
+enum {
 	RT_CHANNEL_DOMAIN_5G_NULL = 0x00,
 	RT_CHANNEL_DOMAIN_5G_ETSI1 = 0x01,		/* Europe */
 	RT_CHANNEL_DOMAIN_5G_ETSI2 = 0x02,		/* Australia, New Zealand */
@@ -258,19 +258,7 @@ struct rt_channel_plan_map {
 	unsigned char Index5G;
 };
 
-enum Associated_AP {
-	atherosAP	= 0,
-	broadcomAP	= 1,
-	ciscoAP		= 2,
-	marvellAP	= 3,
-	ralinkAP	= 4,
-	realtekAP	= 5,
-	airgocapAP	= 6,
-	unknownAP	= 7,
-	maxAP,
-};
-
-enum ht_iot_peer_e {
+enum {
 	HT_IOT_PEER_UNKNOWN			= 0,
 	HT_IOT_PEER_REALTEK			= 1,
 	HT_IOT_PEER_REALTEK_92SE		= 2,
@@ -293,7 +281,7 @@ enum ht_iot_peer_e {
 };
 
 
-enum scan_state {
+enum {
 	SCAN_DISABLE = 0,
 	SCAN_START = 1,
 	SCAN_TXNULL = 2,
@@ -787,7 +775,7 @@ struct C2HEvent_Header {
 void rtw_dummy_event_callback(struct adapter *adapter, u8 *pbuf);
 void rtw_fwdbg_event_callback(struct adapter *adapter, u8 *pbuf);
 
-enum rtw_c2h_event {
+enum {
 	GEN_EVT_CODE(_Read_MACREG) = 0, /*0*/
 	GEN_EVT_CODE(_Read_BBREG),
 	GEN_EVT_CODE(_Read_RFREG),
Signature · 1 line
2.30.2
#22 lore raw

PATCH 20/33 Staging: rtl8723bs: remove named enums in rtw_xmit.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in include/rtw_xmit.h:

enum txdesc_sc

---
 drivers/staging/rtl8723bs/include/rtw_xmit.h | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/rtl8723bs/include/rtw_xmit.h +0 -7
index 4d4fa157daa9..73d020cfd0d1 100644
@@ -83,13 +83,6 @@ do {\
 
 #define TXDESC_OFFSET TXDESC_SIZE
 
-enum txdesc_sc {
-	SC_DONT_CARE = 0x00,
-	SC_UPPER = 0x01,
-	SC_LOWER = 0x02,
-	SC_DUPLICATE = 0x03
-};
-
 #define TXDESC_40_BYTES
 
 struct tx_desc {
Signature · 1 line
2.30.2
#23 lore raw

PATCH 21/33 Staging: rtl8723bs: remove named enums in rtw_rf.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/rtw_rf.h:

enum capability [name]
enum _reg_preamble_mode [name]
enum _rtl8712_rf_mimo_config_ [definition]
enum rf90_radio_path [definition]
enum vht_data_sc [name]
enum protection_mode [definition]
enum rt_rf_type_definition [name]

---
 drivers/staging/rtl8723bs/include/rtw_rf.h | 32 +++-------------------
 1 file changed, 4 insertions(+), 28 deletions(-)
drivers/staging/rtl8723bs/include/rtw_rf.h +4 -28
index a8ddd6fe5f95..cb6beccd3d23 100644
@@ -49,7 +49,7 @@ struct	regulatory_class {
 	u8 modem;
 };
 
-enum capability {
+enum {
 	cESS			= 0x0001,
 	cIBSS			= 0x0002,
 	cPollable		= 0x0004,
@@ -68,30 +68,12 @@ enum capability {
 	cImmediateBA		= 0x8000,
 };
 
-enum	_reg_preamble_mode {
+enum {
 	PREAMBLE_LONG	= 1,
 	PREAMBLE_AUTO	= 2,
 	PREAMBLE_SHORT	= 3,
 };
 
-enum _rtl8712_rf_mimo_config_ {
-	RTL8712_RFCONFIG_1T = 0x10,
-	RTL8712_RFCONFIG_2T = 0x20,
-	RTL8712_RFCONFIG_1R = 0x01,
-	RTL8712_RFCONFIG_2R = 0x02,
-	RTL8712_RFCONFIG_1T1R = 0x11,
-	RTL8712_RFCONFIG_1T2R = 0x12,
-	RTL8712_RFCONFIG_TURBO = 0x92,
-	RTL8712_RFCONFIG_2T2R = 0x22
-};
-
-enum rf90_radio_path {
-	RF90_PATH_A = 0,		/* Radio Path A */
-	RF90_PATH_B = 1,		/* Radio Path B */
-	RF90_PATH_C = 2,		/* Radio Path C */
-	RF90_PATH_D = 3			/* Radio Path D */
-};
-
 /*  Bandwidth Offset */
 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE	0
 #define HAL_PRIME_CHNL_OFFSET_LOWER	1
@@ -116,7 +98,7 @@ enum extchnl_offset {
 	EXTCHNL_OFFSET_LOWER = 3,
 };
 
-enum vht_data_sc {
+enum {
 	VHT_DATA_SC_DONOT_CARE = 0,
 	VHT_DATA_SC_20_UPPER_OF_80MHZ = 1,
 	VHT_DATA_SC_20_LOWER_OF_80MHZ = 2,
@@ -130,14 +112,8 @@ enum vht_data_sc {
 	VHT_DATA_SC_40_LOWER_OF_80MHZ = 10,
 };
 
-enum protection_mode {
-	PROTECTION_MODE_AUTO = 0,
-	PROTECTION_MODE_FORCE_ENABLE = 1,
-	PROTECTION_MODE_FORCE_DISABLE = 2,
-};
-
 /* 2007/11/15 MH Define different RF type. */
-enum rt_rf_type_definition {
+enum {
 	RF_1T2R = 0,
 	RF_2T4R = 1,
 	RF_2T2R = 2,
Signature · 1 line
2.30.2
#24 lore raw

PATCH 22/33 Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h

In reply to Marco Cesati

Remove the following unnecessary enum name in
include/HalPwrSeqCmd.h:

enum pwrseq_cmd_delay_unit

---
 drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h +1 -1
index ba9b033685ec..e30071935d27 100644
@@ -82,7 +82,7 @@
 #define	PWR_CUT_ALL_MSK			0xFF
 
 
-enum pwrseq_cmd_delay_unit {
+enum {
 	PWRSEQ_DELAY_US,
 	PWRSEQ_DELAY_MS,
 };
Signature · 1 line
2.30.2
#25 lore raw

PATCH 23/33 Staging: rtl8723bs: remove named enums in hal_com_phycfg.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
include/hal_com_phycfg.h:

enum rf_tx_num
enum _regulation_txpwr_lmt

---
 drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/include/hal_com_phycfg.h +2 -2
index 51eef4d5c861..73f6cadb5c79 100644
@@ -25,7 +25,7 @@ enum rate_section {
 	VHT_4SSMCS0_4SSMCS9,
 };
 
-enum rf_tx_num {
+enum {
 	RF_1TX = 0,
 	RF_2TX,
 	RF_3TX,
@@ -36,7 +36,7 @@ enum rf_tx_num {
 
 #define MAX_POWER_INDEX			0x3F
 
-enum _regulation_txpwr_lmt {
+enum {
 	TXPWR_LMT_FCC = 0,
 	TXPWR_LMT_MKK,
 	TXPWR_LMT_ETSI,
Signature · 1 line
2.30.2
#26 lore raw

PATCH 24/33 Staging: rtl8723bs: remove named enums in ieee80211.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in include/ieee80211.h:

	enum rateid_idx				[name]
	enum ratr_table_mode			[definition]
	enum eap_type				[definition]
	enum mgn_rate				[name]
	enum ieee80211_state			[definition]
	enum rtw_ieee80211_category		[name]
	enum _public_action			[name]
	enum rtw_ieee80211_back_parties		[definition]
	enum rtw_ieee80211_vht_actioncode	[definition]
	enum secondary_ch_offset		[definition]
---
 drivers/staging/rtl8723bs/include/ieee80211.h | 89 +------------------
 1 file changed, 4 insertions(+), 85 deletions(-)
drivers/staging/rtl8723bs/include/ieee80211.h +4 -85
index 8a10bca876b8..6540c7a22938 100644
@@ -125,7 +125,7 @@ extern u8 RSN_CIPHER_SUITE_CCMP[];
 extern u8 RSN_CIPHER_SUITE_WEP104[];
 
 
-enum rateid_idx {
+enum {
 	RATEID_IDX_BGN_40M_2SS = 0,
 	RATEID_IDX_BGN_40M_1SS = 1,
 	RATEID_IDX_BGN_20M_2SS_BN = 2,
@@ -139,19 +139,6 @@ enum rateid_idx {
 	RATEID_IDX_VHT_1SS = 10,
 };
 
-enum ratr_table_mode {
-	RATR_INX_WIRELESS_NGB = 0,	/*  BGN 40 Mhz 2SS 1SS */
-	RATR_INX_WIRELESS_NG = 1,		/*  GN or N */
-	RATR_INX_WIRELESS_NB = 2,		/*  BGN 20 Mhz 2SS 1SS  or BN */
-	RATR_INX_WIRELESS_N = 3,
-	RATR_INX_WIRELESS_GB = 4,
-	RATR_INX_WIRELESS_G = 5,
-	RATR_INX_WIRELESS_B = 6,
-	RATR_INX_WIRELESS_MC = 7,
-	RATR_INX_WIRELESS_AC_N = 8,
-};
-
-
 enum network_type {
 	WIRELESS_INVALID = 0,
 	/* Sub-Element */
@@ -274,14 +261,6 @@ struct eapol {
 	u16 length;
 } __attribute__ ((packed));
 
-enum eap_type {
-	EAP_PACKET = 0,
-	EAPOL_START,
-	EAPOL_LOGOFF,
-	EAPOL_KEY,
-	EAPOL_ENCAP_ASF_ALERT
-};
-
 #define IEEE80211_FCS_LEN    4
 
 #define MIN_FRAG_THRESHOLD     256U
@@ -415,7 +394,7 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_OFDM_SHIFT_MASK_A         4
 
 
-enum mgn_rate {
+enum {
 	MGN_1M		= 0x02,
 	MGN_2M		= 0x04,
 	MGN_5_5M	= 0x0B,
@@ -615,45 +594,6 @@ Total: 28-2340 bytes
 > 0: TID
 */
 
-enum ieee80211_state {
-
-	/* the card is not linked at all */
-	IEEE80211_NOLINK = 0,
-
-	/* IEEE80211_ASSOCIATING* are for BSS client mode
-	 * the driver shall not perform RX filtering unless
-	 * the state is LINKED.
-	 * The driver shall just check for the state LINKED and
-	 * defaults to NOLINK for ALL the other states (including
-	 * LINKED_SCANNING)
-	 */
-
-	/* the association procedure will start (wq scheduling)*/
-	IEEE80211_ASSOCIATING,
-	IEEE80211_ASSOCIATING_RETRY,
-
-	/* the association procedure is sending AUTH request*/
-	IEEE80211_ASSOCIATING_AUTHENTICATING,
-
-	/* the association procedure has successfully authentcated
-	 * and is sending association request
-	 */
-	IEEE80211_ASSOCIATING_AUTHENTICATED,
-
-	/* the link is ok. the card associated to a BSS or linked
-	 * to a ibss cell or acting as an AP and creating the bss
-	 */
-	IEEE80211_LINKED,
-
-	/* same as LINKED, but the driver shall apply RX filter
-	 * rules as we are in NO_LINK mode. As the card is still
-	 * logically linked, but it is doing a syncro site survey
-	 * then it will be back to LINKED state.
-	 */
-	IEEE80211_LINKED_SCANNING,
-
-};
-
 #define DEFAULT_MAX_SCAN_AGE (15 * HZ)
 #define DEFAULT_FTS 2346
 #define MAC_ARG(x) (x)
@@ -687,7 +627,7 @@ static inline int is_zero_mac_addr(const u8 *addr)
 #define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
 
 /* Action category code */
-enum rtw_ieee80211_category {
+enum {
 	RTW_WLAN_CATEGORY_SPECTRUM_MGMT = 0,
 	RTW_WLAN_CATEGORY_QOS = 1,
 	RTW_WLAN_CATEGORY_DLS = 2,
@@ -705,7 +645,7 @@ enum rtw_ieee80211_category {
 	RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */
 };
 
-enum _public_action {
+enum {
 	ACT_PUBLIC_BSSCOEXIST = 0, /*  20/40 BSS Coexistence */
 	ACT_PUBLIC_DSE_ENABLE = 1,
 	ACT_PUBLIC_DSE_DEENABLE = 2,
@@ -725,21 +665,6 @@ enum _public_action {
 	ACT_PUBLIC_MAX
 };
 
-/* BACK (block-ack) parties */
-enum rtw_ieee80211_back_parties {
-	RTW_WLAN_BACK_RECIPIENT = 0,
-	RTW_WLAN_BACK_INITIATOR = 1,
-	RTW_WLAN_BACK_TIMER = 2,
-};
-
-/* VHT features action code */
-enum rtw_ieee80211_vht_actioncode {
-	RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING = 0,
-       RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT = 1,
-       RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION = 2,
-};
-
-
 #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
 				* 00:50:F2 */
 #define WME_OUI_TYPE 2
@@ -898,12 +823,6 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
 u8 *rtw_set_ie(u8 *pbuf, signed int index, uint len, u8 *source, uint *frlen);
 
-enum secondary_ch_offset {
-	SCN = 0, /* no secondary channel */
-	SCA = 1, /* secondary channel above */
-	SCB = 3,  /* secondary channel below */
-};
-
 u8 *rtw_get_ie(u8 *pbuf, signed int index, signed int *len, signed int limit);
 u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen);
 int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 oui_len);
Signature · 1 line
2.30.2
#27 lore raw

PATCH 25/33 Staging: rtl8723bs: remove named enums in rtw_efuse.h

In reply to Marco Cesati

Remove the following unnecessary enum name in
include/rtw_efuse.h:

enum _efuse_def_type

---
 drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/rtw_efuse.h +1 -1
index 5bae46ecd9de..5938a6bfb573 100644
@@ -25,7 +25,7 @@
 #define	EFUSE_WIFI				0
 #define	EFUSE_BT				1
 
-enum _efuse_def_type {
+enum {
 	TYPE_EFUSE_MAX_SECTION				= 0,
 	TYPE_EFUSE_REAL_CONTENT_LEN			= 1,
 	TYPE_AVAILABLE_EFUSE_BYTES_BANK		= 2,
Signature · 1 line
2.30.2
#28 lore raw

PATCH 26/33 Staging: rtl8723bs: remove named enums in odm_interface.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in hal/odm_interface.h:

enum odm_h2c_cmd

---
 drivers/staging/rtl8723bs/hal/odm_interface.h | 9 ---------
 1 file changed, 9 deletions(-)
drivers/staging/rtl8723bs/hal/odm_interface.h +0 -9
index 8159bbd06c22..4ee5903c41b5 100644
@@ -39,13 +39,4 @@ ODM_REG(DIG, _pDM_Odm)
 #define ODM_REG(_name, _pDM_Odm)	_cat(_name, _pDM_Odm->SupportICType, _reg)
 #define ODM_BIT(_name, _pDM_Odm)	_cat(_name, _pDM_Odm->SupportICType, _bit)
 
-enum odm_h2c_cmd {
-	ODM_H2C_RSSI_REPORT = 0,
-	ODM_H2C_PSD_RESULT = 1,
-	ODM_H2C_PathDiv = 2,
-	ODM_H2C_WIFI_CALIBRATION = 3,
-	ODM_MAX_H2CCMD
-};
-
-
 #endif	/*  __ODM_INTERFACE_H__ */
Signature · 1 line
2.30.2
#29 lore raw

PATCH 27/33 Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in hal/HalBtcOutSrc.h:

enum btc_powersave_type [name]
enum btc_bt_reg_type [name]
enum btc_chip_type [name]
enum btc_msg_type [name]
enum btc_dbg_opcode [definition]
enum btc_rssi_state [name]
enum btc_wifi_role [definition]
enum btc_wifi_bw_mode [name]
enum btc_wifi_traffic_dir [name]
enum btc_wifi_pnp [name]
enum bt_wifi_coex_state [definition]
enum btc_get_type [name]
enum btc_set_type [name]
enum btc_dbg_disp_type [name]
enum btc_notify_type_ips [name]
enum btc_notify_type_lps [name]
enum btc_notify_type_scan [name]
enum btc_notify_type_associate [name]
enum btc_notify_type_media_status [name]
enum btc_notify_type_special_packet [name]
enum btc_notify_type_stack_operation [definition]
enum btc_antenna_pos [name]

---
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 70 +++++---------------
 1 file changed, 18 insertions(+), 52 deletions(-)
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h +18 -52
index 10c021024b24..75e1d1a37626 100644
@@ -44,14 +44,14 @@
 #define BTC_ANT_WIFI_AT_CPL_MAIN	0
 #define BTC_ANT_WIFI_AT_CPL_AUX		1
 
-enum btc_powersave_type {
+enum {
 	BTC_PS_WIFI_NATIVE	= 0,	/*  wifi original power save behavior */
 	BTC_PS_LPS_ON		= 1,
 	BTC_PS_LPS_OFF		= 2,
 	BTC_PS_MAX
 };
 
-enum btc_bt_reg_type {
+enum {
 	BTC_BT_REG_RF		= 0,
 	BTC_BT_REG_MODEM	= 1,
 	BTC_BT_REG_BLUEWIZE	= 2,
@@ -68,7 +68,7 @@ enum btc_chip_interface {
 	BTC_INTF_MAX
 };
 
-enum btc_chip_type {
+enum {
 	BTC_CHIP_UNDEF		= 0,
 	BTC_CHIP_CSR_BC4	= 1,
 	BTC_CHIP_CSR_BC8	= 2,
@@ -78,7 +78,7 @@ enum btc_chip_type {
 	BTC_CHIP_MAX
 };
 
-enum btc_msg_type {
+enum {
 	BTC_MSG_INTERFACE	= 0x0,
 	BTC_MSG_ALGORITHM	= 0x1,
 	BTC_MSG_MAX
@@ -166,17 +166,7 @@ struct btc_board_info {
 	/* bool				bBtExist; */
 };
 
-enum btc_dbg_opcode {
-	BTC_DBG_SET_COEX_NORMAL			    = 0x0,
-	BTC_DBG_SET_COEX_WIFI_ONLY		    = 0x1,
-	BTC_DBG_SET_COEX_BT_ONLY		    = 0x2,
-	BTC_DBG_SET_COEX_DEC_BT_PWR		    = 0x3,
-	BTC_DBG_SET_COEX_BT_AFH_MAP		    = 0x4,
-	BTC_DBG_SET_COEX_BT_IGNORE_WLAN_ACT	= 0x5,
-	BTC_DBG_MAX
-};
-
-enum btc_rssi_state {
+enum {
 	BTC_RSSI_STATE_HIGH			    = 0x0,
 	BTC_RSSI_STATE_MEDIUM			= 0x1,
 	BTC_RSSI_STATE_LOW			    = 0x2,
@@ -189,46 +179,29 @@ enum btc_rssi_state {
 #define BTC_RSSI_MEDIUM(_rssi_)	((_rssi_ == BTC_RSSI_STATE_MEDIUM || _rssi_ == BTC_RSSI_STATE_STAY_MEDIUM) ? true : false)
 #define BTC_RSSI_LOW(_rssi_)	((_rssi_ == BTC_RSSI_STATE_LOW || _rssi_ == BTC_RSSI_STATE_STAY_LOW) ? true : false)
 
-enum btc_wifi_role {
-	BTC_ROLE_STATION			= 0x0,
-	BTC_ROLE_AP					= 0x1,
-	BTC_ROLE_IBSS				= 0x2,
-	BTC_ROLE_HS_MODE			= 0x3,
-	BTC_ROLE_MAX
-};
-
-enum btc_wifi_bw_mode {
+enum {
 	BTC_WIFI_BW_LEGACY			= 0x0,
 	BTC_WIFI_BW_HT20			= 0x1,
 	BTC_WIFI_BW_HT40			= 0x2,
 	BTC_WIFI_BW_MAX
 };
 
-enum btc_wifi_traffic_dir {
+enum {
 	BTC_WIFI_TRAFFIC_TX			= 0x0,
 	BTC_WIFI_TRAFFIC_RX			= 0x1,
 	BTC_WIFI_TRAFFIC_MAX
 };
 
-enum btc_wifi_pnp {
+enum {
 	BTC_WIFI_PNP_WAKE_UP		= 0x0,
 	BTC_WIFI_PNP_SLEEP			= 0x1,
 	BTC_WIFI_PNP_MAX
 };
 
 /* for 8723b-d cut large current issue */
-enum bt_wifi_coex_state {
-	BTC_WIFI_STAT_INIT,
-	BTC_WIFI_STAT_IQK,
-	BTC_WIFI_STAT_NORMAL_OFF,
-	BTC_WIFI_STAT_MP_OFF,
-	BTC_WIFI_STAT_NORMAL,
-	BTC_WIFI_STAT_ANT_DIV,
-	BTC_WIFI_STAT_MAX
-};
 
 /*  defined for BFP_BTC_GET */
-enum btc_get_type {
+enum {
 	/*  type bool */
 	BTC_GET_BL_HS_OPERATION,
 	BTC_GET_BL_HS_CONNECTING,
@@ -270,7 +243,7 @@ enum btc_get_type {
 };
 
 /*  defined for BFP_BTC_SET */
-enum btc_set_type {
+enum {
 	/*  type bool */
 	BTC_SET_BL_BT_DISABLE,
 	BTC_SET_BL_BT_TRAFFIC_BUSY,
@@ -310,44 +283,44 @@ enum btc_set_type {
 	BTC_SET_MAX
 };
 
-enum btc_dbg_disp_type {
+enum {
 	BTC_DBG_DISP_COEX_STATISTICS		= 0x0,
 	BTC_DBG_DISP_BT_LINK_INFO			= 0x1,
 	BTC_DBG_DISP_FW_PWR_MODE_CMD		= 0x2,
 	BTC_DBG_DISP_MAX
 };
 
-enum btc_notify_type_ips {
+enum {
 	BTC_IPS_LEAVE						= 0x0,
 	BTC_IPS_ENTER						= 0x1,
 	BTC_IPS_MAX
 };
 
-enum btc_notify_type_lps {
+enum {
 	BTC_LPS_DISABLE						= 0x0,
 	BTC_LPS_ENABLE						= 0x1,
 	BTC_LPS_MAX
 };
 
-enum btc_notify_type_scan {
+enum {
 	BTC_SCAN_FINISH						= 0x0,
 	BTC_SCAN_START						= 0x1,
 	BTC_SCAN_MAX
 };
 
-enum btc_notify_type_associate {
+enum {
 	BTC_ASSOCIATE_FINISH				= 0x0,
 	BTC_ASSOCIATE_START					= 0x1,
 	BTC_ASSOCIATE_MAX
 };
 
-enum btc_notify_type_media_status {
+enum {
 	BTC_MEDIA_DISCONNECT				= 0x0,
 	BTC_MEDIA_CONNECT					= 0x1,
 	BTC_MEDIA_MAX
 };
 
-enum btc_notify_type_special_packet {
+enum {
 	BTC_PACKET_UNKNOWN					= 0x0,
 	BTC_PACKET_DHCP						= 0x1,
 	BTC_PACKET_ARP						= 0x2,
@@ -355,15 +328,8 @@ enum btc_notify_type_special_packet {
 	BTC_PACKET_MAX
 };
 
-enum btc_notify_type_stack_operation {
-	BTC_STACK_OP_NONE					= 0x0,
-	BTC_STACK_OP_INQ_PAGE_PAIR_START	= 0x1,
-	BTC_STACK_OP_INQ_PAGE_PAIR_FINISH	= 0x2,
-	BTC_STACK_OP_MAX
-};
-
 /* Bryant Add */
-enum btc_antenna_pos {
+enum {
 	BTC_ANTENNA_AT_MAIN_PORT = 0x1,
 	BTC_ANTENNA_AT_AUX_PORT  = 0x2,
 };
Signature · 1 line
2.30.2
#30 lore raw

PATCH 28/33 Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
hal/HalBtc8723b1Ant.h:

	enum bt_info_src_8723b_1ant
	enum bt_8723b_1ant_bt_status
	enum bt_8723b_1ant_wifi_status
	enum bt_8723b_1ant_coex_algo
---
 drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h +4 -4
index ed569e77e518..59e8c68cdc20 100644
@@ -21,14 +21,14 @@
 
 #define  BT_8723B_1ANT_WIFI_NOISY_THRESH 30   /* max: 255 */
 
-enum bt_info_src_8723b_1ant {
+enum {
 	BT_INFO_SRC_8723B_1ANT_WIFI_FW			= 0x0,
 	BT_INFO_SRC_8723B_1ANT_BT_RSP				= 0x1,
 	BT_INFO_SRC_8723B_1ANT_BT_ACTIVE_SEND		= 0x2,
 	BT_INFO_SRC_8723B_1ANT_MAX
 };
 
-enum bt_8723b_1ant_bt_status {
+enum {
 	BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE	= 0x0,
 	BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE		= 0x1,
 	BT_8723B_1ANT_BT_STATUS_INQ_PAGE				= 0x2,
@@ -38,7 +38,7 @@ enum bt_8723b_1ant_bt_status {
 	BT_8723B_1ANT_BT_STATUS_MAX
 };
 
-enum bt_8723b_1ant_wifi_status {
+enum {
 	BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE           = 0x0,
 	BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
 	BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN               = 0x2,
@@ -48,7 +48,7 @@ enum bt_8723b_1ant_wifi_status {
 	BT_8723B_1ANT_WIFI_STATUS_MAX
 };
 
-enum bt_8723b_1ant_coex_algo {
+enum {
 	BT_8723B_1ANT_COEX_ALGO_UNDEFINED		= 0x0,
 	BT_8723B_1ANT_COEX_ALGO_SCO				= 0x1,
 	BT_8723B_1ANT_COEX_ALGO_HID				= 0x2,
Signature · 1 line
2.30.2
#31 lore raw

PATCH 29/33 Staging: rtl8723bs: remove named enums in odm_types.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in hal/odm_types.h:

enum rt_spinlock_type

---
 drivers/staging/rtl8723bs/hal/odm_types.h | 41 -----------------------
 1 file changed, 41 deletions(-)
drivers/staging/rtl8723bs/hal/odm_types.h +0 -41
index 0b1b3e14d451..8168dc14e879 100644
@@ -27,47 +27,6 @@ enum hal_status {
 };
 
 
-/*  */
-/*  Declare for ODM spin lock definition temporarily from compile pass. */
-/*  */
-enum rt_spinlock_type {
-	RT_TX_SPINLOCK = 1,
-	RT_RX_SPINLOCK = 2,
-	RT_RM_SPINLOCK = 3,
-	RT_CAM_SPINLOCK = 4,
-	RT_SCAN_SPINLOCK = 5,
-	RT_LOG_SPINLOCK = 7,
-	RT_BW_SPINLOCK = 8,
-	RT_CHNLOP_SPINLOCK = 9,
-	RT_RF_OPERATE_SPINLOCK = 10,
-	RT_INITIAL_SPINLOCK = 11,
-	RT_RF_STATE_SPINLOCK = 12, /*  For RF state. Added by Bruce, 2007-10-30. */
-	/* Shall we define Ndis 6.2 SpinLock Here ? */
-	RT_PORT_SPINLOCK = 16,
-	RT_H2C_SPINLOCK = 20, /*  For H2C cmd. Added by tynli. 2009.11.09. */
-
-	RT_BTData_SPINLOCK = 25,
-
-	RT_WAPI_OPTION_SPINLOCK = 26,
-	RT_WAPI_RX_SPINLOCK = 27,
-
-	/*  add for 92D CCK control issue */
-	RT_CCK_PAGEA_SPINLOCK = 28,
-	RT_BUFFER_SPINLOCK = 29,
-	RT_CHANNEL_AND_BANDWIDTH_SPINLOCK = 30,
-	RT_GEN_TEMP_BUF_SPINLOCK = 31,
-	RT_AWB_SPINLOCK = 32,
-	RT_FW_PS_SPINLOCK = 33,
-	RT_HW_TIMER_SPIN_LOCK = 34,
-	RT_MPT_WI_SPINLOCK = 35,
-	RT_P2P_SPIN_LOCK = 36,	/*  Protect P2P context */
-	RT_DBG_SPIN_LOCK = 37,
-	RT_IQK_SPINLOCK = 38,
-	RT_PENDED_OID_SPINLOCK = 39,
-	RT_CHNLLIST_SPINLOCK = 40,
-	RT_INDIC_SPINLOCK = 41,	/* protect indication */
-};
-
 	#if defined(__LITTLE_ENDIAN)
 		#define	ODM_ENDIAN_TYPE			ODM_ENDIAN_LITTLE
 	#else
Signature · 1 line
2.30.2
#32 lore raw

PATCH 30/33 Staging: rtl8723bs: remove named enums in odm_DIG.h

In reply to Marco Cesati

Remove the following unnecessary enum definitions in hal/odm_DIG.h:

enum dm_dig_op_e
enum ODM_Pause_CCKPD_TYPE

---
 drivers/staging/rtl8723bs/hal/odm_DIG.h | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/staging/rtl8723bs/hal/odm_DIG.h +0 -16
index 20d4b88da9ff..88cfd542df16 100644
@@ -77,27 +77,11 @@ struct  false_ALARM_STATISTICS {
 	u32 Cnt_BW_LSC; /* Gary */
 };
 
-enum dm_dig_op_e { /* tag_Dynamic_Init_Gain_Operation_Type_Definition */
-	DIG_TYPE_THRESH_HIGH = 0,
-	DIG_TYPE_THRESH_LOW = 1,
-	DIG_TYPE_BACKOFF = 2,
-	DIG_TYPE_RX_GAIN_MIN = 3,
-	DIG_TYPE_RX_GAIN_MAX = 4,
-	DIG_TYPE_ENABLE = 5,
-	DIG_TYPE_DISABLE = 6,
-	DIG_OP_TYPE_MAX
-};
-
 enum ODM_Pause_DIG_TYPE {
 	ODM_PAUSE_DIG = BIT0,
 	ODM_RESUME_DIG = BIT1
 };
 
-enum ODM_Pause_CCKPD_TYPE {
-	ODM_PAUSE_CCKPD = BIT0,
-	ODM_RESUME_CCKPD = BIT1
-};
-
 #define		DM_DIG_THRESH_HIGH			40
 #define		DM_DIG_THRESH_LOW			35
 
Signature · 1 line
2.30.2
#33 lore raw

PATCH 31/33 Staging: rtl8723bs: remove named enums in HalPhyRf.h

In reply to Marco Cesati

Remove the following unnecessary enum definition in hal/HalPhyRf.h:

enum spur_cal_method

---
 drivers/staging/rtl8723bs/hal/HalPhyRf.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/rtl8723bs/hal/HalPhyRf.h +0 -5
index d7eda508d04d..fdbdd68edf2a 100644
@@ -8,11 +8,6 @@
  #ifndef __HAL_PHY_RF_H__
  #define __HAL_PHY_RF_H__
 
-enum spur_cal_method {
-	PLL_RESET,
-	AFE_PHASE_SEL
-};
-
 enum pwrtrack_method {
 	BBSWING,
 	TXAGC,
Signature · 1 line
2.30.2
#34 lore raw

PATCH 32/33 Staging: rtl8723bs: remove named enums in odm.h

In reply to Marco Cesati

Remove the following unnecessary enum names or definitions in hal/odm.h:

enum ODM_Ability_E [definition]
enum odm_ability_e [name]
enum odm_interface_e [name]
enum odm_ic_type_e [name]
enum odm_cut_version_e [name]
enum odm_fab_e [name]
enum odm_rf_path_e [definition]
enum odm_rf_type_e [name]
enum odm_mac_phy_mode_e [definition]
enum odm_bt_coexist_e [definition]
enum odm_operation_mode_e [definition]
enum odm_wireless_mode_e [name]
enum odm_band_type_e [name]
enum odm_sec_chnl_offset_e [definition]
enum odm_security_e [definition]
enum odm_bw_e [name]
enum odm_board_type_e [definition]
enum ODM_Package_TYPE_E [definition]
enum odm_cca_path_e [definition]
enum fat_state_e [definition]
enum ant_div_type_e [name]
enum rt_status [definition]
enum dm_1r_cca_e [name]
enum dm_rf_e [name]
enum dm_swas_e [definition]

---
 drivers/staging/rtl8723bs/hal/odm.h | 150 +++-------------------------
 1 file changed, 12 insertions(+), 138 deletions(-)
drivers/staging/rtl8723bs/hal/odm.h +12 -138
index 981de3710709..dd0c4616086d 100644
@@ -277,22 +277,6 @@ struct odm_mac_status_info {
 	u8 test;
 };
 
-enum ODM_Ability_E { /* tag_Dynamic_ODM_Support_Ability_Type */
-	/*  BB Team */
-	ODM_DIG				= 0x00000001,
-	ODM_HIGH_POWER		= 0x00000002,
-	ODM_CCK_CCA_TH		= 0x00000004,
-	ODM_FA_STATISTICS	= 0x00000008,
-	ODM_RAMASK			= 0x00000010,
-	ODM_RSSI_MONITOR	= 0x00000020,
-	ODM_SW_ANTDIV		= 0x00000040,
-	ODM_HW_ANTDIV		= 0x00000080,
-	ODM_BB_PWRSV		= 0x00000100,
-	ODM_2TPATHDIV		= 0x00000200,
-	ODM_1TPATHDIV		= 0x00000400,
-	ODM_PSD2AFH			= 0x00000800
-};
-
 /*  */
 /*  2011/10/20 MH Define Common info enum for all team. */
 /*  */
@@ -386,7 +370,7 @@ enum odm_cmninfo_e {
 };
 
 /*  2011/10/20 MH Define ODM support ability.  ODM_CMNINFO_ABILITY */
-enum odm_ability_e { /* _ODM_Support_Ability_Definition */
+enum { /* _ODM_Support_Ability_Definition */
 	/*  */
 	/*  BB ODM section BIT 0-15 */
 	/*  */
@@ -417,18 +401,18 @@ enum odm_ability_e { /* _ODM_Support_Ability_Definition */
 };
 
 /* 	ODM_CMNINFO_INTERFACE */
-enum odm_interface_e { /* tag_ODM_Support_Interface_Definition */
+enum { /* tag_ODM_Support_Interface_Definition */
 	ODM_ITRF_SDIO	=	0x4,
 	ODM_ITRF_ALL	=	0x7,
 };
 
 /*  ODM_CMNINFO_IC_TYPE */
-enum odm_ic_type_e { /* tag_ODM_Support_IC_Type_Definition */
+enum { /* tag_ODM_Support_IC_Type_Definition */
 	ODM_RTL8723B	=	BIT8,
 };
 
 /* ODM_CMNINFO_CUT_VER */
-enum odm_cut_version_e { /* tag_ODM_Cut_Version_Definition */
+enum { /* tag_ODM_Cut_Version_Definition */
 	ODM_CUT_A		=	0,
 	ODM_CUT_B		=	1,
 	ODM_CUT_C		=	2,
@@ -443,7 +427,7 @@ enum odm_cut_version_e { /* tag_ODM_Cut_Version_Definition */
 };
 
 /*  ODM_CMNINFO_FAB_VER */
-enum odm_fab_e { /* tag_ODM_Fab_Version_Definition */
+enum { /* tag_ODM_Fab_Version_Definition */
 	ODM_TSMC	=	0,
 	ODM_UMC		=	1,
 };
@@ -452,18 +436,7 @@ enum odm_fab_e { /* tag_ODM_Fab_Version_Definition */
 /*  */
 /*  For example 1T2R (A+AB = BIT0|BIT4|BIT5) */
 /*  */
-enum odm_rf_path_e { /* tag_ODM_RF_Path_Bit_Definition */
-	ODM_RF_TX_A	=	BIT0,
-	ODM_RF_TX_B	=	BIT1,
-	ODM_RF_TX_C	=	BIT2,
-	ODM_RF_TX_D	=	BIT3,
-	ODM_RF_RX_A	=	BIT4,
-	ODM_RF_RX_B	=	BIT5,
-	ODM_RF_RX_C	=	BIT6,
-	ODM_RF_RX_D	=	BIT7,
-};
-
-enum odm_rf_type_e { /* tag_ODM_RF_Type_Definition */
+enum { /* tag_ODM_RF_Type_Definition */
 	ODM_1T1R	=	0,
 	ODM_1T2R	=	1,
 	ODM_2T2R	=	2,
@@ -478,40 +451,8 @@ enum odm_rf_type_e { /* tag_ODM_RF_Type_Definition */
 /*  ODM Dynamic common info value definition */
 /*  */
 
-/* typedef enum _MACPHY_MODE_8192D{ */
-/* 	SINGLEMAC_SINGLEPHY, */
-/* 	DUALMAC_DUALPHY, */
-/* 	DUALMAC_SINGLEPHY, */
-/* MACPHY_MODE_8192D,*PMACPHY_MODE_8192D; */
-/*  Above is the original define in MP driver. Please use the same define. THX. */
-enum odm_mac_phy_mode_e { /* tag_ODM_MAC_PHY_Mode_Definition */
-	ODM_SMSP	= 0,
-	ODM_DMSP	= 1,
-	ODM_DMDP	= 2,
-};
-
-enum odm_bt_coexist_e { /* tag_BT_Coexist_Definition */
-	ODM_BT_BUSY		= 1,
-	ODM_BT_ON		= 2,
-	ODM_BT_OFF		= 3,
-	ODM_BT_NONE		= 4,
-};
-
-/*  ODM_CMNINFO_OP_MODE */
-enum odm_operation_mode_e { /* tag_Operation_Mode_Definition */
-	ODM_NO_LINK      = BIT0,
-	ODM_LINK         = BIT1,
-	ODM_SCAN         = BIT2,
-	ODM_POWERSAVE    = BIT3,
-	ODM_AP_MODE      = BIT4,
-	ODM_CLIENT_MODE  = BIT5,
-	ODM_AD_HOC       = BIT6,
-	ODM_WIFI_DIRECT  = BIT7,
-	ODM_WIFI_DISPLAY = BIT8,
-};
-
 /*  ODM_CMNINFO_WM_MODE */
-enum odm_wireless_mode_e { /* tag_Wireless_Mode_Definition */
+enum { /* tag_Wireless_Mode_Definition */
 	ODM_WM_UNKNOWN    = 0x0,
 	ODM_WM_B          = BIT0,
 	ODM_WM_G          = BIT1,
@@ -523,34 +464,15 @@ enum odm_wireless_mode_e { /* tag_Wireless_Mode_Definition */
 };
 
 /*  ODM_CMNINFO_BAND */
-enum odm_band_type_e { /* tag_Band_Type_Definition */
+enum { /* tag_Band_Type_Definition */
 	ODM_BAND_2_4G = 0,
 	ODM_BAND_5G,
 	ODM_BAND_ON_BOTH,
 	ODM_BANDMAX
 };
 
-/*  ODM_CMNINFO_SEC_CHNL_OFFSET */
-enum odm_sec_chnl_offset_e { /* tag_Secondary_Channel_Offset_Definition */
-	ODM_DONT_CARE	= 0,
-	ODM_BELOW		= 1,
-	ODM_ABOVE		= 2
-};
-
-/*  ODM_CMNINFO_SEC_MODE */
-enum odm_security_e { /* tag_Security_Definition */
-	ODM_SEC_OPEN		= 0,
-	ODM_SEC_WEP40		= 1,
-	ODM_SEC_TKIP		= 2,
-	ODM_SEC_RESERVE		= 3,
-	ODM_SEC_AESCCMP		= 4,
-	ODM_SEC_WEP104		= 5,
-	ODM_WEP_WPA_MIXED	= 6, /*  WEP + WPA */
-	ODM_SEC_SMS4		= 7,
-};
-
 /*  ODM_CMNINFO_BW */
-enum odm_bw_e { /* tag_Bandwidth_Definition */
+enum { /* tag_Bandwidth_Definition */
 	ODM_BW20M		= 0,
 	ODM_BW40M		= 1,
 	ODM_BW80M		= 2,
@@ -561,24 +483,6 @@ enum odm_bw_e { /* tag_Bandwidth_Definition */
 /*  ODM_CMNINFO_BOARD_TYPE */
 /*  For non-AC-series IC , ODM_BOARD_5G_EXT_PA and ODM_BOARD_5G_EXT_LNA are ignored */
 /*  For AC-series IC, external PA & LNA can be indivisuallly added on 2.4G and/or 5G */
-enum odm_board_type_e { /* tag_Board_Definition */
-	ODM_BOARD_DEFAULT    = 0,      /*  The DEFAULT case. */
-	ODM_BOARD_MINICARD   = BIT(0), /*  0 = non-mini card, 1 = mini card. */
-	ODM_BOARD_SLIM       = BIT(1), /*  0 = non-slim card, 1 = slim card */
-	ODM_BOARD_BT         = BIT(2), /*  0 = without BT card, 1 = with BT */
-	ODM_BOARD_EXT_PA     = BIT(3), /*  0 = no 2G ext-PA, 1 = existing 2G ext-PA */
-	ODM_BOARD_EXT_LNA    = BIT(4), /*  0 = no 2G ext-LNA, 1 = existing 2G ext-LNA */
-	ODM_BOARD_EXT_TRSW   = BIT(5), /*  0 = no ext-TRSW, 1 = existing ext-TRSW */
-	ODM_BOARD_EXT_PA_5G  = BIT(6), /*  0 = no 5G ext-PA, 1 = existing 5G ext-PA */
-	ODM_BOARD_EXT_LNA_5G = BIT(7), /*  0 = no 5G ext-LNA, 1 = existing 5G ext-LNA */
-};
-
-enum ODM_Package_TYPE_E { /* tag_ODM_Package_Definition */
-	ODM_PACKAGE_DEFAULT      = 0,
-	ODM_PACKAGE_QFN68        = BIT(0),
-	ODM_PACKAGE_TFBGA90      = BIT(1),
-	ODM_PACKAGE_TFBGA79      = BIT(2),
-};
 
 enum odm_type_gpa_e { /* tag_ODM_TYPE_GPA_Definition */
 	TYPE_GPA0 = 0,
@@ -604,13 +508,6 @@ enum odm_type_alna_e { /* tag_ODM_TYPE_ALNA_Definition */
 	TYPE_ALNA3 = BIT(3)|BIT(2)|BIT(1)|BIT(0)
 };
 
-/*  ODM_CMNINFO_ONE_PATH_CCA */
-enum odm_cca_path_e { /* tag_CCA_Path */
-	ODM_CCA_2R			= 0,
-	ODM_CCA_1R_A		= 1,
-	ODM_CCA_1R_B		= 2,
-};
-
 struct iqk_matrix_regs_setting { /* _IQK_MATRIX_REGS_SETTING */
 	bool bIQKDone;
 	s32 Value[3][IQK_Matrix_REG_NUM];
@@ -764,12 +661,7 @@ struct fat_t { /* _FAST_ANTENNA_TRAINNING_ */
 
 };
 
-enum fat_state_e {
-	FAT_NORMAL_STATE			= 0,
-	FAT_TRAINING_STATE		= 1,
-};
-
-enum ant_div_type_e {
+enum {
 	NO_ANTDIV			= 0xFF,
 	CG_TRX_HW_ANTDIV		= 0x01,
 	CGCS_RX_HW_ANTDIV	= 0x02,
@@ -1197,18 +1089,6 @@ enum ODM_FW_Config_Type {
 	CONFIG_FW_BT,
 };
 
-/*  Status code */
-enum rt_status {
-	RT_STATUS_SUCCESS,
-	RT_STATUS_FAILURE,
-	RT_STATUS_PENDING,
-	RT_STATUS_RESOURCE,
-	RT_STATUS_INVALID_CONTEXT,
-	RT_STATUS_INVALID_PARAMETER,
-	RT_STATUS_NOT_SUPPORT,
-	RT_STATUS_OS_API_FAILED,
-};
-
 #ifdef REMOVE_PACK
 #pragma pack()
 #endif
@@ -1255,13 +1135,13 @@ enum rt_status {
 /* 3 BB Power Save */
 /* 3 =========================================================== */
 
-enum dm_1r_cca_e { /* tag_1R_CCA_Type_Definition */
+enum { /* tag_1R_CCA_Type_Definition */
 	CCA_1R = 0,
 	CCA_2R = 1,
 	CCA_MAX = 2,
 };
 
-enum dm_rf_e { /* tag_RF_Type_Definition */
+enum { /* tag_RF_Type_Definition */
 	RF_Save = 0,
 	RF_Normal = 1,
 	RF_MAX = 2,
@@ -1270,12 +1150,6 @@ enum dm_rf_e { /* tag_RF_Type_Definition */
 /* 3 =========================================================== */
 /* 3 Antenna Diversity */
 /* 3 =========================================================== */
-enum dm_swas_e { /* tag_SW_Antenna_Switch_Definition */
-	Antenna_A = 1,
-	Antenna_B = 2,
-	Antenna_MAX = 3,
-};
-
 /*  Maximal number of antenna detection mechanism needs to perform, added by Roger, 2011.12.28. */
 #define	MAX_ANTENNA_DETECTION_CNT	10
 
Signature · 1 line
2.30.2
#35 lore raw

PATCH 33/33 Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

In reply to Marco Cesati

Remove the following unnecessary enum names in
hal/HalBtc8723b2Ant.h:

	enum bt_info_src_8723b_2ant
	enum bt_8723b_2ant_bt_status
	enum bt_8723b_2ant_coex_algo
---
 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h +3 -3
index 1c220257e2e4..80db3ba34a3f 100644
@@ -16,14 +16,14 @@
 
 #define		BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT		2
 
-enum bt_info_src_8723b_2ant {
+enum {
 	BT_INFO_SRC_8723B_2ANT_WIFI_FW        = 0x0,
 	BT_INFO_SRC_8723B_2ANT_BT_RSP         = 0x1,
 	BT_INFO_SRC_8723B_2ANT_BT_ACTIVE_SEND = 0x2,
 	BT_INFO_SRC_8723B_2ANT_MAX
 };
 
-enum bt_8723b_2ant_bt_status {
+enum {
 	BT_8723B_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
 	BT_8723B_2ANT_BT_STATUS_CONNECTED_IDLE     = 0x1,
 	BT_8723B_2ANT_BT_STATUS_INQ_PAGE           = 0x2,
@@ -33,7 +33,7 @@ enum bt_8723b_2ant_bt_status {
 	BT_8723B_2ANT_BT_STATUS_MAX
 };
 
-enum bt_8723b_2ant_coex_algo {
+enum {
 	BT_8723B_2ANT_COEX_ALGO_UNDEFINED       = 0x0,
 	BT_8723B_2ANT_COEX_ALGO_SCO             = 0x1,
 	BT_8723B_2ANT_COEX_ALGO_HID             = 0x2,
Signature · 1 line
2.30.2
#36 lore raw
In reply to Marco Cesati
Quoted 32 lines · Marco Cesati

The staging/rtl8723bs driver includes 82 enum definitions whose names are not referenced in the code. Furthermore, 57 enum definitions are useless, because the enum elements do not appear in the code. This patchset transforms 82 'named' enums in 'anonymous' enums and removes 57 enum definitions.

[PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h [PATCH 02/33] Staging: rtl8723bs: remove named enums in rtw_cmd.h [PATCH 03/33] Staging: rtl8723bs: remove named enums in rtw_eeprom.h [PATCH 04/33] Staging: rtl8723bs: remove named enums in hal_com.h [PATCH 05/33] Staging: rtl8723bs: remove named enums in rtw_recv.h [PATCH 06/33] Staging: rtl8723bs: remove named enums in drv_types.h [PATCH 07/33] Staging: rtl8723bs: remove named enums in rtw_ht.h [PATCH 08/33] Staging: rtl8723bs: remove named enums in wlan_bssdef.h [PATCH 09/33] Staging: rtl8723bs: remove named enums in rtw_mp.h [PATCH 10/33] Staging: rtl8723bs: remove named enums in osdep_service.h [PATCH 11/33] Staging: rtl8723bs: remove named enums in hal_intf.h [PATCH 12/33] Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h [PATCH 13/33] Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h [PATCH 14/33] Staging: rtl8723bs: remove named enums in hal_com_h2c.h [PATCH 15/33] Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h [PATCH 16/33] Staging: rtl8723bs: remove named enums in wifi.h [PATCH 17/33] Staging: rtl8723bs: remove named enums in rtl8723b_hal.h [PATCH 18/33] Staging: rtl8723bs: remove named enums in hal_phy.h [PATCH 19/33] Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h [PATCH 20/33] Staging: rtl8723bs: remove named enums in rtw_xmit.h [PATCH 21/33] Staging: rtl8723bs: remove named enums in rtw_rf.h [PATCH 22/33] Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h [PATCH 23/33] Staging: rtl8723bs: remove named enums in hal_com_phycfg.h [PATCH 24/33] Staging: rtl8723bs: remove named enums in ieee80211.h [PATCH 25/33] Staging: rtl8723bs: remove named enums in rtw_efuse.h

Quoted 8 lines

[PATCH 26/33] Staging: rtl8723bs: remove named enums in odm_interface.h [PATCH 27/33] Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h [PATCH 28/33] Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h [PATCH 29/33] Staging: rtl8723bs: remove named enums in odm_types.h [PATCH 30/33] Staging: rtl8723bs: remove named enums in odm_DIG.h [PATCH 31/33] Staging: rtl8723bs: remove named enums in HalPhyRf.h [PATCH 32/33] Staging: rtl8723bs: remove named enums in odm.h [PATCH 33/33] Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

Was this a "v2" of the series? Or does it not conflict with your other series?

I'm getting confused... Please check my tree and see what I have not applied from you and resend...

thanks,
greg k-h

#37 lore raw
Quoted 42 lines · Greg Kroah-Hartman
Quoted 32 lines · Marco Cesati

The staging/rtl8723bs driver includes 82 enum definitions whose names are not referenced in the code. Furthermore, 57 enum definitions are useless, because the enum elements do not appear in the code. This patchset transforms 82 'named' enums in 'anonymous' enums and removes 57 enum definitions.

[PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h [PATCH 02/33] Staging: rtl8723bs: remove named enums in rtw_cmd.h [PATCH 03/33] Staging: rtl8723bs: remove named enums in rtw_eeprom.h [PATCH 04/33] Staging: rtl8723bs: remove named enums in hal_com.h [PATCH 05/33] Staging: rtl8723bs: remove named enums in rtw_recv.h [PATCH 06/33] Staging: rtl8723bs: remove named enums in drv_types.h [PATCH 07/33] Staging: rtl8723bs: remove named enums in rtw_ht.h [PATCH 08/33] Staging: rtl8723bs: remove named enums in wlan_bssdef.h [PATCH 09/33] Staging: rtl8723bs: remove named enums in rtw_mp.h [PATCH 10/33] Staging: rtl8723bs: remove named enums in osdep_service.h [PATCH 11/33] Staging: rtl8723bs: remove named enums in hal_intf.h [PATCH 12/33] Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h [PATCH 13/33] Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h [PATCH 14/33] Staging: rtl8723bs: remove named enums in hal_com_h2c.h [PATCH 15/33] Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h [PATCH 16/33] Staging: rtl8723bs: remove named enums in wifi.h [PATCH 17/33] Staging: rtl8723bs: remove named enums in rtl8723b_hal.h [PATCH 18/33] Staging: rtl8723bs: remove named enums in hal_phy.h [PATCH 19/33] Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h [PATCH 20/33] Staging: rtl8723bs: remove named enums in rtw_xmit.h [PATCH 21/33] Staging: rtl8723bs: remove named enums in rtw_rf.h [PATCH 22/33] Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h [PATCH 23/33] Staging: rtl8723bs: remove named enums in hal_com_phycfg.h [PATCH 24/33] Staging: rtl8723bs: remove named enums in ieee80211.h [PATCH 25/33] Staging: rtl8723bs: remove named enums in rtw_efuse.h

Quoted 8 lines

[PATCH 26/33] Staging: rtl8723bs: remove named enums in odm_interface.h [PATCH 27/33] Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h [PATCH 28/33] Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h [PATCH 29/33] Staging: rtl8723bs: remove named enums in odm_types.h [PATCH 30/33] Staging: rtl8723bs: remove named enums in odm_DIG.h [PATCH 31/33] Staging: rtl8723bs: remove named enums in HalPhyRf.h [PATCH 32/33] Staging: rtl8723bs: remove named enums in odm.h [PATCH 33/33] Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

Quoted 8 lines

Was this a "v2" of the series? Or does it not conflict with your other series?

I'm getting confused... Please check my tree and see what I have not applied from you and resend...

thanks,
greg k-h

This was the first, original patch set. However, I got a comment from Dan Carpenter from which I inferred that transforming named enums like "enum XXX { ... };" into anonymous enums like "enum { ... };", when "XXX" is not referenced elsewhere, was not desiderable. Therefore, I submitted another version of the patch set ("[PATCH 00/21] Staging:
rtl8723bs: remove unreferenced enum definitions"), which just removes the enums having no reference _at_all_ in the code. To be clear, the patch set ("remove unreferenced enums") removes a strict subset of the enums touched by this patch set ("remove named enums").

This patch set ("remove named enums") has been properly applied to your tree, so for me all is fine. I guess the decision is up to you: do you prefer to _not_ remove the useless enum names? In this case, this patch set has to be reverted.

I apologize for the confusion.

Marco

----
Marco Cesati, PhD
Dept. of Civil Engineering and Computer Science Engineering Univ. of Rome Tor Vergata
via del Politecnico 1, I-00133 Rome, Italy
Tel. +39 06 7259 7389

#38 lore raw
Quoted 62 lines · Marco Cesati
Quoted 42 lines · Greg Kroah-Hartman
Quoted 32 lines · Marco Cesati

The staging/rtl8723bs driver includes 82 enum definitions whose names are not referenced in the code. Furthermore, 57 enum definitions are useless, because the enum elements do not appear in the code. This patchset transforms 82 'named' enums in 'anonymous' enums and removes 57 enum definitions.

[PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h [PATCH 02/33] Staging: rtl8723bs: remove named enums in rtw_cmd.h [PATCH 03/33] Staging: rtl8723bs: remove named enums in rtw_eeprom.h [PATCH 04/33] Staging: rtl8723bs: remove named enums in hal_com.h [PATCH 05/33] Staging: rtl8723bs: remove named enums in rtw_recv.h [PATCH 06/33] Staging: rtl8723bs: remove named enums in drv_types.h [PATCH 07/33] Staging: rtl8723bs: remove named enums in rtw_ht.h [PATCH 08/33] Staging: rtl8723bs: remove named enums in wlan_bssdef.h [PATCH 09/33] Staging: rtl8723bs: remove named enums in rtw_mp.h [PATCH 10/33] Staging: rtl8723bs: remove named enums in osdep_service.h [PATCH 11/33] Staging: rtl8723bs: remove named enums in hal_intf.h [PATCH 12/33] Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h [PATCH 13/33] Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h [PATCH 14/33] Staging: rtl8723bs: remove named enums in hal_com_h2c.h [PATCH 15/33] Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h [PATCH 16/33] Staging: rtl8723bs: remove named enums in wifi.h [PATCH 17/33] Staging: rtl8723bs: remove named enums in rtl8723b_hal.h [PATCH 18/33] Staging: rtl8723bs: remove named enums in hal_phy.h [PATCH 19/33] Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h [PATCH 20/33] Staging: rtl8723bs: remove named enums in rtw_xmit.h [PATCH 21/33] Staging: rtl8723bs: remove named enums in rtw_rf.h [PATCH 22/33] Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h [PATCH 23/33] Staging: rtl8723bs: remove named enums in hal_com_phycfg.h [PATCH 24/33] Staging: rtl8723bs: remove named enums in ieee80211.h [PATCH 25/33] Staging: rtl8723bs: remove named enums in rtw_efuse.h

Quoted 8 lines

[PATCH 26/33] Staging: rtl8723bs: remove named enums in odm_interface.h [PATCH 27/33] Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h [PATCH 28/33] Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h [PATCH 29/33] Staging: rtl8723bs: remove named enums in odm_types.h [PATCH 30/33] Staging: rtl8723bs: remove named enums in odm_DIG.h [PATCH 31/33] Staging: rtl8723bs: remove named enums in HalPhyRf.h [PATCH 32/33] Staging: rtl8723bs: remove named enums in odm.h [PATCH 33/33] Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

Quoted 8 lines

Was this a "v2" of the series? Or does it not conflict with your other series?

I'm getting confused... Please check my tree and see what I have not applied from you and resend...

thanks,
greg k-h

This was the first, original patch set. However, I got a comment from Dan Carpenter from which I inferred that transforming named enums like "enum XXX { ... };" into anonymous enums like "enum { ... };", when "XXX" is not referenced elsewhere, was not desiderable. Therefore, I submitted another version of the patch set ("[PATCH 00/21] Staging:
rtl8723bs: remove unreferenced enum definitions"), which just removes the enums having no reference _at_all_ in the code. To be clear, the patch set ("remove unreferenced enums") removes a strict subset of the enums touched by this patch set ("remove named enums").

Quoted 4 lines

This patch set ("remove named enums") has been properly applied to your tree, so for me all is fine. I guess the decision is up to you: do you prefer to _not_ remove the useless enum names? In this case, this patch set has to be reverted.

Forget about it. I didn't really endorse removing the enum names because I thought they were harmless and had some documentation value. But the value was very minimal... Let's not revert anything. Let's just move forward.

You're over apologizing. No one is upset with you if your patch doesn't apply. Greg just deletes it and moves on. No one invests any time into trying to figure out what happened.

Now that Greg has applied whatever can apply he has deleted all the rest of your patches. Just rebase and resend.

regards,
dan carpenter

#39 lore raw
Quoted 73 lines · Dan Carpenter
Quoted 62 lines · Marco Cesati
Quoted 42 lines · Greg Kroah-Hartman
Quoted 32 lines · Marco Cesati

The staging/rtl8723bs driver includes 82 enum definitions whose names are not referenced in the code. Furthermore, 57 enum definitions are useless, because the enum elements do not appear in the code. This patchset transforms 82 'named' enums in 'anonymous' enums and removes 57 enum definitions.

[PATCH 01/33] Staging: rtl8723bs: remove named enums in rtw_mlme.h [PATCH 02/33] Staging: rtl8723bs: remove named enums in rtw_cmd.h [PATCH 03/33] Staging: rtl8723bs: remove named enums in rtw_eeprom.h [PATCH 04/33] Staging: rtl8723bs: remove named enums in hal_com.h [PATCH 05/33] Staging: rtl8723bs: remove named enums in rtw_recv.h [PATCH 06/33] Staging: rtl8723bs: remove named enums in drv_types.h [PATCH 07/33] Staging: rtl8723bs: remove named enums in rtw_ht.h [PATCH 08/33] Staging: rtl8723bs: remove named enums in wlan_bssdef.h [PATCH 09/33] Staging: rtl8723bs: remove named enums in rtw_mp.h [PATCH 10/33] Staging: rtl8723bs: remove named enums in osdep_service.h [PATCH 11/33] Staging: rtl8723bs: remove named enums in hal_intf.h [PATCH 12/33] Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h [PATCH 13/33] Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h [PATCH 14/33] Staging: rtl8723bs: remove named enums in hal_com_h2c.h [PATCH 15/33] Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h [PATCH 16/33] Staging: rtl8723bs: remove named enums in wifi.h [PATCH 17/33] Staging: rtl8723bs: remove named enums in rtl8723b_hal.h [PATCH 18/33] Staging: rtl8723bs: remove named enums in hal_phy.h [PATCH 19/33] Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h [PATCH 20/33] Staging: rtl8723bs: remove named enums in rtw_xmit.h [PATCH 21/33] Staging: rtl8723bs: remove named enums in rtw_rf.h [PATCH 22/33] Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h [PATCH 23/33] Staging: rtl8723bs: remove named enums in hal_com_phycfg.h [PATCH 24/33] Staging: rtl8723bs: remove named enums in ieee80211.h [PATCH 25/33] Staging: rtl8723bs: remove named enums in rtw_efuse.h

Quoted 8 lines

[PATCH 26/33] Staging: rtl8723bs: remove named enums in odm_interface.h [PATCH 27/33] Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h [PATCH 28/33] Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h [PATCH 29/33] Staging: rtl8723bs: remove named enums in odm_types.h [PATCH 30/33] Staging: rtl8723bs: remove named enums in odm_DIG.h [PATCH 31/33] Staging: rtl8723bs: remove named enums in HalPhyRf.h [PATCH 32/33] Staging: rtl8723bs: remove named enums in odm.h [PATCH 33/33] Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h

Quoted 8 lines

Was this a "v2" of the series? Or does it not conflict with your other series?

I'm getting confused... Please check my tree and see what I have not applied from you and resend...

thanks,
greg k-h

This was the first, original patch set. However, I got a comment from Dan Carpenter from which I inferred that transforming named enums like "enum XXX { ... };" into anonymous enums like "enum { ... };", when "XXX" is not referenced elsewhere, was not desiderable. Therefore, I submitted another version of the patch set ("[PATCH 00/21] Staging:
rtl8723bs: remove unreferenced enum definitions"), which just removes the enums having no reference _at_all_ in the code. To be clear, the patch set ("remove unreferenced enums") removes a strict subset of the enums touched by this patch set ("remove named enums").

Quoted 4 lines

This patch set ("remove named enums") has been properly applied to your tree, so for me all is fine. I guess the decision is up to you: do you prefer to _not_ remove the useless enum names? In this case, this patch set has to be reverted.

Forget about it. I didn't really endorse removing the enum names because I thought they were harmless and had some documentation value. But the value was very minimal... Let's not revert anything. Let's just move forward.

Quoted 6 lines

You're over apologizing. No one is upset with you if your patch doesn't apply. Greg just deletes it and moves on. No one invests any time into trying to figure out what happened.

Now that Greg has applied whatever can apply he has deleted all the rest of your patches. Just rebase and resend.

Yup, nothing to worry about here, I took this patchset as it seemed semi-sane and cleaned up the code. Please rebase and resend your other work as well and I will be glad to review them.

thanks,

greg k-h