All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] fixes to remove enum typedefs
@ 2018-01-10 11:12 Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T Ajay Singh
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

v2: The patch series is created instead of independent patches & 
updated the name for Signed-off-by field. 
  
This patch series fix "WARNING: do not add new typedefs" issues
found by checkpatch.pl

Ajay Singh (9):
  staging: wilc1000: removed typedef from enum BSSTYPE_T
  staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T
  staging: wilc1000: removed unnecessary enums typedefs
  staging: wilc1000: removed few unnecessary enums typedef
  staging: wilc1000: removed few unnecessary enums typedef
  staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T
  staging: wilc1000: removed enum typedef CHIP_PS_STATE_T
  staging: wilc1000: removed enum typedef BUS_ACQUIRE_T
  staging: wilc1000: removed enum typedef BUS_RELEASE_T

 drivers/staging/wilc1000/host_interface.c |  2 +-
 drivers/staging/wilc1000/wilc_wlan.c      |  6 +-
 drivers/staging/wilc1000/wilc_wlan_if.h   | 96 +++++++++++++++----------------
 3 files changed, 52 insertions(+), 52 deletions(-)

-- 
2.7.4

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

* [PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 2/9] staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T Ajay Singh
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes typedef from enum BSSTYPE_T and
rename it to bss_types.

It fixes "WARNING: do not add new typdefs" warning
reported by checkpatch.pl.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d69248a..4ff1a59 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -202,7 +202,7 @@ struct host_if_msg {
 };
 
 struct join_bss_param {
-	BSSTYPE_T bss_type;
+	enum bss_types bss_type;
 	u8 dtim_period;
 	u16 beacon_period;
 	u16 cap_info;
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index c1693cf..2baf6c4 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -85,11 +85,11 @@ typedef enum {
 	P2P_IE			= 221,
 } BEACON_IE;
 
-typedef enum {
+enum bss_types {
 	INFRASTRUCTURE		= 0,
 	INDEPENDENT,
 	AP,
-} BSSTYPE_T;
+};
 
 typedef enum {
 	RATE_AUTO		= 0,
-- 
2.7.4

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

* [PATCH v2 2/9] staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 3/9] staging: wilc1000: removed unnecessary enums typedefs Ajay Singh
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch has removed G_OPERATING_MODE_T typedef enum.
Now, its used as anonymous-enums for constants.
checkpatch.pl warning to avoid new typedef is fixes with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 2baf6c4..222bde2 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -107,12 +107,12 @@ typedef enum {
 	RATE_54MB		= 54
 } TX_RATE_T;
 
-typedef enum {
+enum {
 	B_ONLY_MODE		= 0,    /* 1, 2 M, otherwise 5, 11 M */
 	G_ONLY_MODE,			/* 6,12,24 otherwise 9,18,36,48,54 */
 	G_MIXED_11B_1_MODE,		/* 1,2,5.5,11 otherwise all on */
 	G_MIXED_11B_2_MODE,		/* 1,2,5,11,6,12,24 otherwise all on */
-} G_OPERATING_MODE_T;
+};
 
 typedef enum {
 	G_SHORT_PREAMBLE	= 0,	/* Short Preamble */
-- 
2.7.4

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

* [PATCH v2 3/9] staging: wilc1000: removed unnecessary enums typedefs
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 2/9] staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 4/9] staging: wilc1000: removed few unnecessary enums typedef Ajay Singh
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes following G_PREAMBLE_T,SCANTYPE_T,
USER_PS_MODE_T,SECURITY_T,ACK_POLICY_T,RESET_REQ_T typedef enum.

Now, these enums are used as anonymous-enums for constants.

checkpatch.pl warning to avoid new typedef is fixes with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 222bde2..598ba9e 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -114,28 +114,28 @@ enum {
 	G_MIXED_11B_2_MODE,		/* 1,2,5,11,6,12,24 otherwise all on */
 };
 
-typedef enum {
+enum {
 	G_SHORT_PREAMBLE	= 0,	/* Short Preamble */
 	G_LONG_PREAMBLE		= 1,	/* Long Preamble */
 	G_AUTO_PREAMBLE		= 2,	/* Auto Preamble Selection */
-} G_PREAMBLE_T;
+};
 
 #define MAC_CONNECTED		1
 #define MAC_DISCONNECTED	0
 
 #define SCAN_DONE		TRUE
-typedef enum {
+enum {
 	PASSIVE_SCAN		= 0,
 	ACTIVE_SCAN		= 1,
-} SCANTYPE_T;
+};
 
-typedef enum {
+enum {
 	NO_POWERSAVE		= 0,
 	MIN_FAST_PS		= 1,
 	MAX_FAST_PS		= 2,
 	MIN_PSPOLL_PS		= 3,
 	MAX_PSPOLL_PS		= 4
-} USER_PS_MODE_T;
+};
 
 typedef enum {
 	CHIP_WAKEDUP		= 0,
@@ -153,7 +153,7 @@ typedef enum {
 	RELEASE_ALLOW_SLEEP	= 1,
 } BUS_RELEASE_T;
 
-typedef enum {
+enum {
 	NO_SECURITY		= 0,
 	WEP_40			= 0x3,
 	WEP_104			= 0x7,
@@ -163,7 +163,7 @@ typedef enum {
 	WPA2_AES		= 0x31,
 	WPA2_TKIP		= 0x51,
 	WPA2_AES_TKIP		= 0x71,	/* Aes or Tkip */
-} SECURITY_T;
+};
 
 enum AUTHTYPE {
 	OPEN_SYSTEM		= 1,
@@ -178,16 +178,16 @@ enum SITESURVEY {
 	SITE_SURVEY_OFF		= 2
 };
 
-typedef enum {
+enum {
 	NORMAL_ACK		= 0,
 	NO_ACK,
-} ACK_POLICY_T;
+};
 
-typedef enum {
+enum {
 	DONT_RESET		= 0,
 	DO_RESET		= 1,
 	NO_REQUEST		= 2,
-} RESET_REQ_T;
+};
 
 typedef enum {
 	REKEY_DISABLE		= 1,
-- 
2.7.4

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

* [PATCH v2 4/9] staging: wilc1000: removed few unnecessary enums typedef
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (2 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 3/9] staging: wilc1000: removed unnecessary enums typedefs Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 5/9] " Ajay Singh
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes following RSNA_REKEY_POLICY_T,SCAN_CLASS_FITLER_T,
SCAN_PRI_T,CH_FILTER_T,N_PROTECTION_MODE_T,G_PROTECTION_MODE_T typedef
enum.
Now, these enums are used as anonymous-enums for constants.

checkpatch.pl warning to avoid new typedef is fixes with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 598ba9e..eec8760 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -189,42 +189,42 @@ enum {
 	NO_REQUEST		= 2,
 };
 
-typedef enum {
+enum {
 	REKEY_DISABLE		= 1,
 	REKEY_TIME_BASE,
 	REKEY_PKT_BASE,
 	REKEY_TIME_PKT_BASE
-} RSNA_REKEY_POLICY_T;
+};
 
-typedef enum {
+enum {
 	FILTER_NO		= 0x00,
 	FILTER_AP_ONLY		= 0x01,
 	FILTER_STA_ONLY		= 0x02
-} SCAN_CLASS_FITLER_T;
+};
 
-typedef enum {
+enum {
 	PRI_HIGH_RSSI		= 0x00,
 	PRI_LOW_RSSI		= 0x04,
 	PRI_DETECT		= 0x08
-} SCAN_PRI_T;
+};
 
-typedef enum {
+enum {
 	CH_FILTER_OFF		= 0x00,
 	CH_FILTER_ON		= 0x10
-} CH_FILTER_T;
+};
 
-typedef enum {
+enum {
 	AUTO_PROT		= 0,	/* Auto */
 	NO_PROT,			/* Do not use any protection */
 	ERP_PROT,			/* Protect all ERP frame exchanges */
 	HT_PROT,			/* Protect all HT frame exchanges  */
 	GF_PROT,			/* Protect all GF frame exchanges  */
-} N_PROTECTION_MODE_T;
+};
 
-typedef enum {
+enum {
 	G_SELF_CTS_PROT,
 	G_RTS_CTS_PROT,
-} G_PROTECTION_MODE_T;
+};
 
 typedef enum {
 	HT_MIXED_MODE		= 1,
-- 
2.7.4

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

* [PATCH v2 5/9] staging: wilc1000: removed few unnecessary enums typedef
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (3 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 4/9] staging: wilc1000: removed few unnecessary enums typedef Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 18:25   ` Greg KH
  2018-01-10 11:12 ` [PATCH v2 6/9] staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T Ajay Singh
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes following N_OPERATING_MODE_T,N_OBSS_DETECTION_T,
N_PROTECTION_TYPE_T,N_SMPS_MODE_T,TX_ABORT_OPTION_T, typedef enum.
Now, these enums are used as anonymous-enums for constants.

checkpatch.pl warning to not add new typedef is fixes with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index eec8760..cf4a44d 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -226,40 +226,40 @@ enum {
 	G_RTS_CTS_PROT,
 };
 
-typedef enum {
+enum {
 	HT_MIXED_MODE		= 1,
 	HT_ONLY_20MHZ_MODE,
 	HT_ONLY_20_40MHZ_MODE,
-} N_OPERATING_MODE_T;
+};
 
-typedef enum {
+enum {
 	NO_DETECT		= 0,
 	DETECT_ONLY		= 1,
 	DETECT_PROTECT		= 2,
 	DETECT_PROTECT_REPORT	= 3,
-} N_OBSS_DETECTION_T;
+};
 
-typedef enum {
+enum {
 	RTS_CTS_NONHT_PROT	= 0,	/* RTS-CTS at non-HT rate */
 	FIRST_FRAME_NONHT_PROT,		/* First frame at non-HT rate */
 	LSIG_TXOP_PROT,                 /* LSIG TXOP Protection */
 	FIRST_FRAME_MIXED_PROT,		/* First frame at Mixed format */
-} N_PROTECTION_TYPE_T;
+};
 
-typedef enum {
+enum {
 	STATIC_MODE		= 1,
 	DYNAMIC_MODE		= 2,
 	MIMO_MODE		= 3,	/* power save disable */
-} N_SMPS_MODE_T;
+};
 
-typedef enum {
+enum {
 	DISABLE_SELF_CTS,
 	ENABLE_SELF_CTS,
 	DISABLE_TX_ABORT,
 	ENABLE_TX_ABORT,
 	HW_TRIGGER_ABORT,
 	SW_TRIGGER_ABORT,
-} TX_ABORT_OPTION_T;
+};
 
 enum wid_type {
 	WID_CHAR		= 0,
-- 
2.7.4

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

* [PATCH v2 6/9] staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (4 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 5/9] " Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 7/9] staging: wilc1000: removed enum typedef CHIP_PS_STATE_T Ajay Singh
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removed the unnecessary enum typedef for BEACON_IE &
TX_RATE_T
It fix "WARNING: do not add new typedefs" reported by checkpatch.pl

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index cf4a44d..068a59d 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -75,7 +75,7 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
 #define MAX_SSID_LEN            33
 #define MAX_RATES_SUPPORTED     12
 
-typedef enum {
+enum {
 	SUPP_RATES_IE		= 1,
 	EXT_SUPP_RATES_IE	= 50,
 	HT_CAPABILITY_IE	= 45,
@@ -83,7 +83,7 @@ typedef enum {
 	WPA_IE			= 221,
 	WMM_IE			= 221,
 	P2P_IE			= 221,
-} BEACON_IE;
+};
 
 enum bss_types {
 	INFRASTRUCTURE		= 0,
@@ -91,7 +91,7 @@ enum bss_types {
 	AP,
 };
 
-typedef enum {
+enum {
 	RATE_AUTO		= 0,
 	RATE_1MB		= 1,
 	RATE_2MB		= 2,
@@ -105,7 +105,7 @@ typedef enum {
 	RATE_26MB		= 36,
 	RATE_48MB		= 48,
 	RATE_54MB		= 54
-} TX_RATE_T;
+};
 
 enum {
 	B_ONLY_MODE		= 0,    /* 1, 2 M, otherwise 5, 11 M */
-- 
2.7.4

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

* [PATCH v2 7/9] staging: wilc1000: removed enum typedef CHIP_PS_STATE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (5 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 6/9] staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 8/9] staging: wilc1000: removed enum typedef BUS_ACQUIRE_T Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 9/9] staging: wilc1000: removed enum typedef BUS_RELEASE_T Ajay Singh
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes enum typedef CHIP_PS_STATE_T and introduce
enum chip_ps_states to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan.c    | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index f49dfa8..3a58a62 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -4,7 +4,7 @@
 #include "wilc_wfi_netdevice.h"
 #include "wilc_wlan_cfg.h"
 
-static CHIP_PS_STATE_T chip_ps_state = CHIP_WAKEDUP;
+static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP;
 
 static inline void acquire_bus(struct wilc *wilc, BUS_ACQUIRE_T acquire)
 {
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 068a59d..70e3558 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -137,11 +137,11 @@ enum {
 	MAX_PSPOLL_PS		= 4
 };
 
-typedef enum {
+enum chip_ps_states {
 	CHIP_WAKEDUP		= 0,
 	CHIP_SLEEPING_AUTO      = 1,
 	CHIP_SLEEPING_MANUAL	= 2
-} CHIP_PS_STATE_T;
+};
 
 typedef enum {
 	ACQUIRE_ONLY            = 0,
-- 
2.7.4

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

* [PATCH v2 8/9] staging: wilc1000: removed enum typedef BUS_ACQUIRE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (6 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 7/9] staging: wilc1000: removed enum typedef CHIP_PS_STATE_T Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  2018-01-10 11:12 ` [PATCH v2 9/9] staging: wilc1000: removed enum typedef BUS_RELEASE_T Ajay Singh
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes enum typedef BUS_ACQUIRE_T and define
enum bus_acquire to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan.c    | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 3a58a62..80a5a0b 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -6,7 +6,7 @@
 
 static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP;
 
-static inline void acquire_bus(struct wilc *wilc, BUS_ACQUIRE_T acquire)
+static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
 {
 	mutex_lock(&wilc->hif_cs);
 	if (acquire == ACQUIRE_AND_WAKEUP)
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 70e3558..65cb53d 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -143,10 +143,10 @@ enum chip_ps_states {
 	CHIP_SLEEPING_MANUAL	= 2
 };
 
-typedef enum {
+enum bus_acquire {
 	ACQUIRE_ONLY            = 0,
 	ACQUIRE_AND_WAKEUP	= 1,
-} BUS_ACQUIRE_T;
+};
 
 typedef enum {
 	RELEASE_ONLY		= 0,
-- 
2.7.4

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

* [PATCH v2 9/9] staging: wilc1000: removed enum typedef BUS_RELEASE_T
  2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
                   ` (7 preceding siblings ...)
  2018-01-10 11:12 ` [PATCH v2 8/9] staging: wilc1000: removed enum typedef BUS_ACQUIRE_T Ajay Singh
@ 2018-01-10 11:12 ` Ajay Singh
  8 siblings, 0 replies; 11+ messages in thread
From: Ajay Singh @ 2018-01-10 11:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
	claudiu.beznea, Ajay Singh

This patch removes enum typedef BUS_RELEASE_T and define
"enum bus_release" to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_wlan.c    | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 80a5a0b..a2b26ec 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -13,7 +13,7 @@ static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
 		chip_wakeup(wilc);
 }
 
-static inline void release_bus(struct wilc *wilc, BUS_RELEASE_T release)
+static inline void release_bus(struct wilc *wilc, enum bus_release release)
 {
 	if (release == RELEASE_ALLOW_SLEEP)
 		chip_allow_sleep(wilc);
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 65cb53d..c1483c8 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -148,10 +148,10 @@ enum bus_acquire {
 	ACQUIRE_AND_WAKEUP	= 1,
 };
 
-typedef enum {
+enum bus_release {
 	RELEASE_ONLY		= 0,
 	RELEASE_ALLOW_SLEEP	= 1,
-} BUS_RELEASE_T;
+};
 
 enum {
 	NO_SECURITY		= 0,
-- 
2.7.4

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

* Re: [PATCH v2 5/9] staging: wilc1000: removed few unnecessary enums typedef
  2018-01-10 11:12 ` [PATCH v2 5/9] " Ajay Singh
@ 2018-01-10 18:25   ` Greg KH
  0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2018-01-10 18:25 UTC (permalink / raw)
  To: Ajay Singh
  Cc: linux-wireless, devel, venkateswara.kaja, ganesh.krishna, aditya.shankar

On Wed, Jan 10, 2018 at 04:42:47PM +0530, Ajay Singh wrote:
> This patch removes following N_OPERATING_MODE_T,N_OBSS_DETECTION_T,
> N_PROTECTION_TYPE_T,N_SMPS_MODE_T,TX_ABORT_OPTION_T, typedef enum.
> Now, these enums are used as anonymous-enums for constants.
> 
> checkpatch.pl warning to not add new typedef is fixes with this patch.
> 
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> ---
>  drivers/staging/wilc1000/wilc_wlan_if.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

This is the same subject line as the previous patch in the series, yet
they are doing different things.

Please take this series and work on the subject lines to make them a bit
more unique and different from each other, and resend.

thanks,

greg k-h

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

end of thread, other threads:[~2018-01-10 18:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 11:12 [PATCH v2 0/9] fixes to remove enum typedefs Ajay Singh
2018-01-10 11:12 ` [PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T Ajay Singh
2018-01-10 11:12 ` [PATCH v2 2/9] staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T Ajay Singh
2018-01-10 11:12 ` [PATCH v2 3/9] staging: wilc1000: removed unnecessary enums typedefs Ajay Singh
2018-01-10 11:12 ` [PATCH v2 4/9] staging: wilc1000: removed few unnecessary enums typedef Ajay Singh
2018-01-10 11:12 ` [PATCH v2 5/9] " Ajay Singh
2018-01-10 18:25   ` Greg KH
2018-01-10 11:12 ` [PATCH v2 6/9] staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T Ajay Singh
2018-01-10 11:12 ` [PATCH v2 7/9] staging: wilc1000: removed enum typedef CHIP_PS_STATE_T Ajay Singh
2018-01-10 11:12 ` [PATCH v2 8/9] staging: wilc1000: removed enum typedef BUS_ACQUIRE_T Ajay Singh
2018-01-10 11:12 ` [PATCH v2 9/9] staging: wilc1000: removed enum typedef BUS_RELEASE_T Ajay Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.