All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211
@ 2017-09-16 11:00 Aastha Gupta
  2017-09-16 11:00 ` [PATCH 01/11] staging: rtl8192u: fix spaces around algebric and binary operators Aastha Gupta
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

These patches add or remove spaces wherever required in ieee80211.h file to make it follow kernel coding style.

Aastha Gupta (11):
  staging: rtl8192u: fix spaces around algebric and binary operators
  staging: rtl8192u: add space after '}'
  staging: rtl8192u: remove space after '('
  staging: rtl8192u: remove space before ')'
  staging: rtl8192u: add spaces after struct/enum definitions
  staging: rtl8192u:add space before '(' and '{'
  staging: rtl8192u: fix '{' following enum go on the same line
  staging: rtl8192u: remove space function pointer arguments
  staging: rtl8192u: add space after ','
  staging: rtl8192u: remove space before semicolon
  staging: rtl819u: move '{' to next line

 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 112 ++++++++++++-------------
 1 file changed, 55 insertions(+), 57 deletions(-)

-- 
2.7.4



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

* [PATCH 01/11] staging: rtl8192u: fix spaces around algebric and binary operators
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 02/11] staging: rtl8192u: add space after '}' Aastha Gupta
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes prefer spaces around '+', '_', '?', '&', '==', '!=', '|', '&&', '=' as reported
by checkpatch.pl.

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index b062cad..6ea104f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -412,12 +412,12 @@ typedef struct ieee_param {
 #define IEEE80211_QCTL_TID              0x000F
 
 #define	FC_QOS_BIT					BIT(7)
-#define IsDataFrame(pdu)			( ((pdu[0] & 0x0C)==0x08) ? true : false )
-#define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)) )
+#define IsDataFrame(pdu)			( ((pdu[0] & 0x0C) == 0x08) ? true : false )
+#define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT)) )
 //added by wb. Is this right?
-#define IsQoSDataFrame(pframe)  ((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA))
-#define Frame_Order(pframe)     (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
-#define SN_LESS(a, b)		(((a-b)&0x800)!=0)
+#define IsQoSDataFrame(pframe)  ((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
+#define Frame_Order(pframe)     (*(u16 *)pframe & IEEE80211_FCTL_ORDER)
+#define SN_LESS(a, b)		(((a - b) & 0x800) != 0)
 #define SN_EQUAL(a, b)	(a == b)
 #define MAX_DEV_ADDR_SIZE 8
 typedef enum _ACT_CATEGORY{
@@ -442,7 +442,7 @@ typedef enum _BA_ACTION{
 } BA_ACTION, *PBA_ACTION;
 
 typedef enum _InitialGainOpType{
-	IG_Backup=0,
+	IG_Backup = 0,
 	IG_Restore,
 	IG_Max
 }InitialGainOpType;
@@ -462,10 +462,10 @@ do { if (ieee80211_debug_level & (level)) \
 			int i;					\
 			u8 *pdata = (u8 *) data;			\
 			printk(KERN_DEBUG "ieee80211: %s()\n", __func__);	\
-			for(i=0; i<(int)(datalen); i++)			\
+			for(i = 0; i < (int)(datalen); i++)			\
 			{						\
 				printk("%2x ", pdata[i]);		\
-				if ((i+1)%16 == 0) printk("\n");	\
+				if ((i + 1) % 16 == 0) printk("\n");	\
 			}				\
 			printk("\n");			\
 		}					\
@@ -876,9 +876,9 @@ enum ieee80211_mfie {
 	MFIE_TYPE_ERP = 42,
 	MFIE_TYPE_RSN = 48,
 	MFIE_TYPE_RATES_EX = 50,
-	MFIE_TYPE_HT_CAP= 45,
-	 MFIE_TYPE_HT_INFO= 61,
-	 MFIE_TYPE_AIRONET=133,
+	MFIE_TYPE_HT_CAP = 45,
+	 MFIE_TYPE_HT_INFO = 61,
+	 MFIE_TYPE_AIRONET = 133,
 	MFIE_TYPE_GENERIC = 221,
 	MFIE_TYPE_QOS_PARAMETER = 222,
 };
@@ -1196,7 +1196,7 @@ static inline u8 Frame_QoSTID(u8 *buf)
 	u16 fc;
 	hdr = (struct rtl_80211_hdr_3addr *)buf;
 	fc = le16_to_cpu(hdr->frame_ctl);
-	return (u8)((frameqos *)(buf + (((fc & IEEE80211_FCTL_TODS)&&(fc & IEEE80211_FCTL_FROMDS))? 30 : 24)))->field.tid;
+	return (u8)((frameqos *)(buf + (((fc & IEEE80211_FCTL_TODS) && (fc & IEEE80211_FCTL_FROMDS)) ? 30 : 24)))->field.tid;
 }
 
 //added by amy for reorder
@@ -2023,7 +2023,7 @@ struct ieee80211_device {
 #define IEEE_G            (1<<2)
 #define IEEE_N_24G		  (1<<4)
 #define	IEEE_N_5G		  (1<<5)
-#define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
+#define IEEE_MODE_MASK    (IEEE_A | IEEE_B | IEEE_G)
 
 /* Generate a 802.11 header */
 
-- 
2.7.4



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

* [PATCH 02/11] staging: rtl8192u: add space after '}'
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
  2017-09-16 11:00 ` [PATCH 01/11] staging: rtl8192u: fix spaces around algebric and binary operators Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 03/11] staging: rtl8192u: remove space after '(' Aastha Gupta
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

This patch fixes checkpatch.pl error:
ERROR: space required after that close brace '}'

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 6ea104f..654c0f6 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -323,7 +323,7 @@ typedef struct ieee_param {
 			u8 key[0];
 		} crypt;
 	} u;
-}ieee_param;
+} ieee_param;
 
 
 // linux under 2.6.9 release may not support it, so modify it for common use
@@ -445,7 +445,7 @@ typedef enum _InitialGainOpType{
 	IG_Backup = 0,
 	IG_Restore,
 	IG_Max
-}InitialGainOpType;
+} InitialGainOpType;
 
 /* debug macros */
 #define CONFIG_IEEE80211_DEBUG
@@ -1051,7 +1051,7 @@ typedef union _frameqos {
 		u16 ack_policy:2;
 		u16 reserved:1;
 		u16 txop:8;
-	}field;
+	} field;
 } frameqos, *pframeqos;
 
 /* SWEEP TABLE ENTRIES NUMBER*/
@@ -1483,7 +1483,7 @@ typedef enum _Fsync_State{
 	Default_Fsync,
 	HW_Fsync,
 	SW_Fsync
-}Fsync_State;
+} Fsync_State;
 
 // Power save mode configured.
 typedef	enum _RT_PS_MODE
@@ -1491,25 +1491,25 @@ typedef	enum _RT_PS_MODE
 	eActive,	// Active/Continuous access.
 	eMaxPs,		// Max power save mode.
 	eFastPs		// Fast power save mode.
-}RT_PS_MODE;
+} RT_PS_MODE;
 
 typedef enum _IPS_CALLBACK_FUNCION
 {
 	IPS_CALLBACK_NONE = 0,
 	IPS_CALLBACK_MGNT_LINK_REQUEST = 1,
 	IPS_CALLBACK_JOIN_REQUEST = 2,
-}IPS_CALLBACK_FUNCION;
+} IPS_CALLBACK_FUNCION;
 
 typedef enum _RT_JOIN_ACTION{
 	RT_JOIN_INFRA   = 1,
 	RT_JOIN_IBSS  = 2,
 	RT_START_IBSS = 3,
 	RT_NO_ACTION  = 4,
-}RT_JOIN_ACTION;
+} RT_JOIN_ACTION;
 
 typedef struct _IbssParms{
 	u16   atimWin;
-}IbssParms, *PIbssParms;
+} IbssParms, *PIbssParms;
 #define MAX_NUM_RATES	264 // Max num of support rates element: 8,  Max num of ext. support rate: 255. 061122, by rcnjko.
 
 // RF state.
@@ -1517,7 +1517,7 @@ typedef	enum _RT_RF_POWER_STATE {
 	eRfOn,
 	eRfSleep,
 	eRfOff
-}RT_RF_POWER_STATE;
+} RT_RF_POWER_STATE;
 
 typedef struct _RT_POWER_SAVE_CONTROL {
 
@@ -1585,7 +1585,7 @@ typedef enum
 	COUNTRY_CODE_TELEC,
 	COUNTRY_CODE_MIC,
 	COUNTRY_CODE_GLOBAL_DOMAIN
-}country_code_type_t;
+} country_code_type_t;
 
 #define RT_MAX_LD_SLOT_NUM	10
 typedef struct _RT_LINK_DETECT_T{
@@ -1601,7 +1601,7 @@ typedef struct _RT_LINK_DETECT_T{
 	u32				NumTxOkInPeriod;
 	u32				NumRxOkInPeriod;
 	bool				bBusyTraffic;
-}RT_LINK_DETECT_T, *PRT_LINK_DETECT_T;
+} RT_LINK_DETECT_T, *PRT_LINK_DETECT_T;
 
 
 struct ieee80211_device {
-- 
2.7.4



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

* [PATCH 03/11] staging: rtl8192u: remove space after '('
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
  2017-09-16 11:00 ` [PATCH 01/11] staging: rtl8192u: fix spaces around algebric and binary operators Aastha Gupta
  2017-09-16 11:00 ` [PATCH 02/11] staging: rtl8192u: add space after '}' Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 04/11] staging: rtl8192u: remove space before ')' Aastha Gupta
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

ERROR: space prohibited after the open parenthesis '('

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 654c0f6..3f040cc 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -412,7 +412,7 @@ typedef struct ieee_param {
 #define IEEE80211_QCTL_TID              0x000F
 
 #define	FC_QOS_BIT					BIT(7)
-#define IsDataFrame(pdu)			( ((pdu[0] & 0x0C) == 0x08) ? true : false )
+#define IsDataFrame(pdu)			(((pdu[0] & 0x0C) == 0x08) ? true : false )
 #define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT)) )
 //added by wb. Is this right?
 #define IsQoSDataFrame(pframe)  ((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
-- 
2.7.4



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

* [PATCH 04/11] staging: rtl8192u: remove space before ')'
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (2 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 03/11] staging: rtl8192u: remove space after '(' Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 05/11] staging: rtl8192u: add spaces after struct/enum definitions Aastha Gupta
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl error:
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 3f040cc..61b384d 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -412,8 +412,8 @@ typedef struct ieee_param {
 #define IEEE80211_QCTL_TID              0x000F
 
 #define	FC_QOS_BIT					BIT(7)
-#define IsDataFrame(pdu)			(((pdu[0] & 0x0C) == 0x08) ? true : false )
-#define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT)) )
+#define IsDataFrame(pdu)			(((pdu[0] & 0x0C) == 0x08) ? true : false)
+#define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT)))
 //added by wb. Is this right?
 #define IsQoSDataFrame(pframe)  ((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
 #define Frame_Order(pframe)     (*(u16 *)pframe & IEEE80211_FCTL_ORDER)
-- 
2.7.4



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

* [PATCH 05/11] staging: rtl8192u: add spaces after struct/enum definitions
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (3 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 04/11] staging: rtl8192u: remove space before ')' Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 06/11] staging: rtl8192u:add space before '(' and '{' Aastha Gupta
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl warnings:
WARNING: missing space after enum definition
WARNING: missing space after struct definition

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 61b384d..6d052cc 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -420,7 +420,7 @@ typedef struct ieee_param {
 #define SN_LESS(a, b)		(((a - b) & 0x800) != 0)
 #define SN_EQUAL(a, b)	(a == b)
 #define MAX_DEV_ADDR_SIZE 8
-typedef enum _ACT_CATEGORY{
+typedef enum _ACT_CATEGORY {
 	ACT_CAT_QOS = 1,
 	ACT_CAT_DLS = 2,
 	ACT_CAT_BA  = 3,
@@ -428,20 +428,20 @@ typedef enum _ACT_CATEGORY{
 	ACT_CAT_WMM = 17,
 } ACT_CATEGORY, *PACT_CATEGORY;
 
-typedef enum _TS_ACTION{
+typedef enum _TS_ACTION {
 	ACT_ADDTSREQ = 0,
 	ACT_ADDTSRSP = 1,
 	ACT_DELTS    = 2,
 	ACT_SCHEDULE = 3,
 } TS_ACTION, *PTS_ACTION;
 
-typedef enum _BA_ACTION{
+typedef enum _BA_ACTION {
 	ACT_ADDBAREQ = 0,
 	ACT_ADDBARSP = 1,
 	ACT_DELBA    = 2,
 } BA_ACTION, *PBA_ACTION;
 
-typedef enum _InitialGainOpType{
+typedef enum _InitialGainOpType {
 	IG_Backup = 0,
 	IG_Restore,
 	IG_Max
@@ -1209,7 +1209,7 @@ struct eapol {
 	u16 length;
 } __packed;
 
-struct ieee80211_softmac_stats{
+struct ieee80211_softmac_stats {
 	unsigned int rx_ass_ok;
 	unsigned int rx_ass_err;
 	unsigned int rx_probe_rq;
@@ -1320,7 +1320,7 @@ struct	ether_header {
 #define	ETHERTYPE_IP	0x0800		/* IP protocol */
 #endif
 
-typedef enum _erp_t{
+typedef enum _erp_t {
 	ERP_NonERPpresent	= 0x01,
 	ERP_UseProtection	= 0x02,
 	ERP_BarkerPreambleMode = 0x04,
@@ -1479,7 +1479,7 @@ typedef struct _RX_REORDER_ENTRY {
 	struct ieee80211_rxb *prxb;
 } RX_REORDER_ENTRY, *PRX_REORDER_ENTRY;
 //added by amy for order
-typedef enum _Fsync_State{
+typedef enum _Fsync_State {
 	Default_Fsync,
 	HW_Fsync,
 	SW_Fsync
@@ -1500,14 +1500,14 @@ typedef enum _IPS_CALLBACK_FUNCION
 	IPS_CALLBACK_JOIN_REQUEST = 2,
 } IPS_CALLBACK_FUNCION;
 
-typedef enum _RT_JOIN_ACTION{
+typedef enum _RT_JOIN_ACTION {
 	RT_JOIN_INFRA   = 1,
 	RT_JOIN_IBSS  = 2,
 	RT_START_IBSS = 3,
 	RT_NO_ACTION  = 4,
 } RT_JOIN_ACTION;
 
-typedef struct _IbssParms{
+typedef struct _IbssParms {
 	u16   atimWin;
 } IbssParms, *PIbssParms;
 #define MAX_NUM_RATES	264 // Max num of support rates element: 8,  Max num of ext. support rate: 255. 061122, by rcnjko.
@@ -1588,7 +1588,7 @@ typedef enum
 } country_code_type_t;
 
 #define RT_MAX_LD_SLOT_NUM	10
-typedef struct _RT_LINK_DETECT_T{
+typedef struct _RT_LINK_DETECT_T {
 
 	u32				NumRecvBcnInPeriod;
 	u32				NumRecvDataInPeriod;
-- 
2.7.4



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

* [PATCH 06/11] staging: rtl8192u:add space before '(' and '{'
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (4 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 05/11] staging: rtl8192u: add spaces after struct/enum definitions Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 07/11] staging: rtl8192u: fix '{' following enum go on the same line Aastha Gupta
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl errors:
ERROR: space required before the open parenthesis '('
ERROR: space required before the open brace '{'

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 6d052cc..c88374b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -457,12 +457,12 @@ do { if (ieee80211_debug_level & (level)) \
 //wb added to debug out data buf
 //if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA
 #define IEEE80211_DEBUG_DATA(level, data, datalen)	\
-	do{ if ((ieee80211_debug_level & (level)) == (level))	\
+	do { if ((ieee80211_debug_level & (level)) == (level))	\
 		{	\
 			int i;					\
 			u8 *pdata = (u8 *) data;			\
 			printk(KERN_DEBUG "ieee80211: %s()\n", __func__);	\
-			for(i = 0; i < (int)(datalen); i++)			\
+			for (i = 0; i < (int)(datalen); i++)			\
 			{						\
 				printk("%2x ", pdata[i]);		\
 				if ((i + 1) % 16 == 0) printk("\n");	\
@@ -471,8 +471,8 @@ do { if (ieee80211_debug_level & (level)) \
 		}					\
 	} while (0)
 #else
-#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
-#define IEEE80211_DEBUG_DATA(level, data, datalen) do {} while(0)
+#define IEEE80211_DEBUG (level, fmt, args...) do {} while (0)
+#define IEEE80211_DEBUG_DATA (level, data, datalen) do {} while(0)
 #endif	/* CONFIG_IEEE80211_DEBUG */
 
 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
@@ -2112,7 +2112,7 @@ static inline int ieee80211_get_hdrlen(u16 fc)
 	case IEEE80211_FTYPE_DATA:
 		if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
 			hdrlen = IEEE80211_4ADDR_LEN; /* Addr4 */
-		if(IEEE80211_QOS_HAS_SEQ(fc))
+		if (IEEE80211_QOS_HAS_SEQ(fc))
 			hdrlen += 2; /* QOS ctrl*/
 		break;
 	case IEEE80211_FTYPE_CTL:
-- 
2.7.4



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

* [PATCH 07/11] staging: rtl8192u: fix '{' following enum go on the same line
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (5 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 06/11] staging: rtl8192u:add space before '(' and '{' Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 08/11] staging: rtl8192u: remove space function pointer arguments Aastha Gupta
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl error:
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index c88374b..6bea643 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -1486,15 +1486,13 @@ typedef enum _Fsync_State {
 } Fsync_State;
 
 // Power save mode configured.
-typedef	enum _RT_PS_MODE
-{
+typedef	enum _RT_PS_MODE {
 	eActive,	// Active/Continuous access.
 	eMaxPs,		// Max power save mode.
 	eFastPs		// Fast power save mode.
 } RT_PS_MODE;
 
-typedef enum _IPS_CALLBACK_FUNCION
-{
+typedef enum _IPS_CALLBACK_FUNCION {
 	IPS_CALLBACK_NONE = 0,
 	IPS_CALLBACK_MGNT_LINK_REQUEST = 1,
 	IPS_CALLBACK_JOIN_REQUEST = 2,
@@ -1572,8 +1570,7 @@ typedef u32 RT_RF_CHANGE_SOURCE;
 #define RF_CHANGE_BY_IPS	BIT(28)
 #define RF_CHANGE_BY_INIT	0	// Do not change the RFOff reason. Defined by Bruce, 2008-01-17.
 
-typedef enum
-{
+typedef enum {
 	COUNTRY_CODE_FCC = 0,
 	COUNTRY_CODE_IC = 1,
 	COUNTRY_CODE_ETSI = 2,
-- 
2.7.4



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

* [PATCH 08/11] staging: rtl8192u: remove space function pointer arguments
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (6 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 07/11] staging: rtl8192u: fix '{' following enum go on the same line Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 09/11] staging: rtl8192u: add space after ',' Aastha Gupta
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl warning:
WARNING: Unnecessary space before function pointer arguments

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 6bea643..7cdcb75 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -1914,11 +1914,11 @@ struct ieee80211_device {
 			       struct net_device *dev);
 
 	int (*reset_port)(struct net_device *dev);
-	int (*is_queue_full) (struct net_device *dev, int pri);
+	int (*is_queue_full)(struct net_device *dev, int pri);
 
-	int (*handle_management) (struct net_device *dev,
+	int (*handle_management)(struct net_device *dev,
 				  struct ieee80211_network *network, u16 type);
-	int (*is_qos_active) (struct net_device *dev, struct sk_buff *skb);
+	int (*is_qos_active)(struct net_device *dev, struct sk_buff *skb);
 
 	/* Softmac-generated frames (management) are TXed via this
 	 * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
@@ -1986,16 +1986,16 @@ struct ieee80211_device {
 	 * stop_send_bacons is NOT guaranteed to be called only
 	 * after start_send_beacons.
 	 */
-	void (*start_send_beacons) (struct net_device *dev,u16 tx_rate);
-	void (*stop_send_beacons) (struct net_device *dev);
+	void (*start_send_beacons)(struct net_device *dev,u16 tx_rate);
+	void (*stop_send_beacons)(struct net_device *dev);
 
 	/* power save mode related */
-	void (*sta_wake_up) (struct net_device *dev);
-	void (*ps_request_tx_ack) (struct net_device *dev);
-	void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
-	short (*ps_is_queue_empty) (struct net_device *dev);
-	int (*handle_beacon) (struct net_device *dev, struct ieee80211_beacon *beacon, struct ieee80211_network *network);
-	int (*handle_assoc_response) (struct net_device *dev, struct ieee80211_assoc_response_frame *resp, struct ieee80211_network *network);
+	void (*sta_wake_up)(struct net_device *dev);
+	void (*ps_request_tx_ack)(struct net_device *dev);
+	void (*enter_sleep_state)(struct net_device *dev, u32 th, u32 tl);
+	short (*ps_is_queue_empty)(struct net_device *dev);
+	int (*handle_beacon)(struct net_device *dev, struct ieee80211_beacon *beacon, struct ieee80211_network *network);
+	int (*handle_assoc_response)(struct net_device *dev, struct ieee80211_assoc_response_frame *resp, struct ieee80211_network *network);
 
 
 	/* check whether Tx hw resource available */
-- 
2.7.4



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

* [PATCH 09/11] staging: rtl8192u: add space after ','
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (7 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 08/11] staging: rtl8192u: remove space function pointer arguments Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 10/11] staging: rtl8192u: remove space before semicolon Aastha Gupta
  2017-09-16 11:00 ` [PATCH 11/11] staging: rtl819u: move '{' to next line Aastha Gupta
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes 'space required after ','', reported by checkpatch.pl

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 7cdcb75..f19aaeb 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -1986,7 +1986,7 @@ struct ieee80211_device {
 	 * stop_send_bacons is NOT guaranteed to be called only
 	 * after start_send_beacons.
 	 */
-	void (*start_send_beacons)(struct net_device *dev,u16 tx_rate);
+	void (*start_send_beacons)(struct net_device *dev, u16 tx_rate);
 	void (*stop_send_beacons)(struct net_device *dev);
 
 	/* power save mode related */
-- 
2.7.4



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

* [PATCH 10/11] staging: rtl8192u: remove space before semicolon
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (8 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 09/11] staging: rtl8192u: add space after ',' Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  2017-09-16 11:00 ` [PATCH 11/11] staging: rtl819u: move '{' to next line Aastha Gupta
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixex checkpatch.pl warning:
WARNING: space prohibited before semicolon

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index f19aaeb..816c496 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2376,7 +2376,7 @@ void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee,
 u8 HTGetHighestMCSRate(struct ieee80211_device *ieee,
 		       u8 *pMCSRateSet, u8 *pMCSFilter);
 extern u8 MCS_FILTER_ALL[];
-extern u16 MCS_DATA_RATE[2][2][77] ;
+extern u16 MCS_DATA_RATE[2][2][77];
 u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame);
 //extern void HTSetConnectBwModeCallback(unsigned long data);
 void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
-- 
2.7.4



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

* [PATCH 11/11] staging: rtl819u: move '{' to next line
  2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
                   ` (9 preceding siblings ...)
  2017-09-16 11:00 ` [PATCH 10/11] staging: rtl8192u: remove space before semicolon Aastha Gupta
@ 2017-09-16 11:00 ` Aastha Gupta
  10 siblings, 0 replies; 12+ messages in thread
From: Aastha Gupta @ 2017-09-16 11:00 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman; +Cc: Aastha Gupta

Fixes checkpatch.pl error:
ERROR: open brace '{' following function declarations go on the next line

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 816c496..3f43441 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2423,7 +2423,8 @@ static inline int ieee80211_get_scans(struct ieee80211_device *ieee)
 	return ieee->scans;
 }
 
-static inline const char *escape_essid(const char *essid, u8 essid_len) {
+static inline const char *escape_essid(const char *essid, u8 essid_len)
+{
 	static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
 
 	if (ieee80211_is_empty_essid(essid, essid_len)) {
-- 
2.7.4



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

end of thread, other threads:[~2017-09-16 11:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-16 11:00 [PATCH 00/11] staging: rtl8192u: ieee80211: checkpatch cleanup for ieee80211 Aastha Gupta
2017-09-16 11:00 ` [PATCH 01/11] staging: rtl8192u: fix spaces around algebric and binary operators Aastha Gupta
2017-09-16 11:00 ` [PATCH 02/11] staging: rtl8192u: add space after '}' Aastha Gupta
2017-09-16 11:00 ` [PATCH 03/11] staging: rtl8192u: remove space after '(' Aastha Gupta
2017-09-16 11:00 ` [PATCH 04/11] staging: rtl8192u: remove space before ')' Aastha Gupta
2017-09-16 11:00 ` [PATCH 05/11] staging: rtl8192u: add spaces after struct/enum definitions Aastha Gupta
2017-09-16 11:00 ` [PATCH 06/11] staging: rtl8192u:add space before '(' and '{' Aastha Gupta
2017-09-16 11:00 ` [PATCH 07/11] staging: rtl8192u: fix '{' following enum go on the same line Aastha Gupta
2017-09-16 11:00 ` [PATCH 08/11] staging: rtl8192u: remove space function pointer arguments Aastha Gupta
2017-09-16 11:00 ` [PATCH 09/11] staging: rtl8192u: add space after ',' Aastha Gupta
2017-09-16 11:00 ` [PATCH 10/11] staging: rtl8192u: remove space before semicolon Aastha Gupta
2017-09-16 11:00 ` [PATCH 11/11] staging: rtl819u: move '{' to next line Aastha Gupta

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.