drivers: staging: rtl8712 - style fix
cover drivers: staging: rtl8712 - style fix
Fixed style of block comments across whole of the rtl8712 driver Found using check patch
Derek Robson (9):
Staging: rtl8712: rtl871x_cmd.h - block comments
Staging: rtl8712: rtl871x_event.h - style fix
Staging: rtl8712: rtl871x_io.h - style fix
Staging: rtl8712: rtl871x_mlme.h - style fix
Staging: rtl8712: rtl871x_mp_ioctl.h - style fix
Staging: rtl8712: rtl871x_pwrctrl.h - style fix
Staging: rtl8712: rtl871x_recv.h - style fix
Staging: rtl8712: wifi.h - style fix
Staging: rtl8712: wlan_bssdef.h - style fix
drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_event.h | 8 ++++---- drivers/staging/rtl8712/rtl871x_io.h | 14 ++++++------- drivers/staging/rtl8712/rtl871x_mlme.h | 16 +++++++-------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 32 +++++++++++++++--------------- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 10 +++++----- drivers/staging/rtl8712/rtl871x_recv.h | 12 +++++------ drivers/staging/rtl8712/wifi.h | 12 +++++------ drivers/staging/rtl8712/wlan_bssdef.h | 6 +++--- 9 files changed, 56 insertions(+), 56 deletions(-)
Signature · 1 line
2.11.1
PATCH 1/9 Staging: rtl8712: rtl871x_cmd.h - block comments
Fixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/rtl871x_cmd.h +1 -1
@@ -144,7 +144,7 @@ struct disconnect_parm {* #define IW_MODE_REPEAT 4 // Wireless Repeater (forwarder) * #define IW_MODE_SECOND 5 // Secondary master/repeater (backup) * #define IW_MODE_MONITOR 6 // Passive monitor (listen only) -*/ +*/ struct setopmode_parm {u8 mode;u8 rsvd[3 ];
Signature · 1 line
2.11.1
PATCH 2/9 Staging: rtl8712: rtl871x_event.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_event.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/rtl871x_event.h +4 -4
@@ -34,7 +34,7 @@/* * Used to report a bss has been scanned -*/ +*/ struct survey_event {struct wlan_bssid_ex bss; };
@@ -42,7 +42,7 @@ struct survey_event {/* * Used to report that the requested site survey has been done. * bss_cnt indicates the number of bss that has been reported. -*/ +*/ struct surveydone_event {unsigned int bss_cnt;
@@ -54,7 +54,7 @@ struct surveydone_event {* -1: authentication fail * -2: association fail * > 0: TID -*/ +*/ struct joinbss_event {struct wlan_network network; };
@@ -62,7 +62,7 @@ struct joinbss_event {/* * Used to report a given STA has joinned the created BSS. * It is used in AP/Ad-HoC(M) mode. -*/ +*/ struct stassoc_event {unsigned char macaddr[6 ];unsigned char rsvd[2 ];
Signature · 1 line
2.11.1
PATCH 3/9 Staging: rtl8712: rtl871x_io.h - style fix
In reply to Derek RobsonFixed style of block comments.
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_io.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8712/rtl871x_io.h +7 -7
@@ -49,9 +49,9 @@#define _IO_CMDMASK_ (0x1F80)/* -For prompt mode accessing, caller shall free io_req -Otherwise, io_handler will free io_req -*/ +* For prompt mode accessing, caller shall free io_req +* Otherwise, io_handler will free io_req +*/ /* IO STATUS TYPE */ #define _IO_ERR_ BIT(2)#define _IO_SUCCESS_ BIT(1)
@@ -69,8 +69,8 @@#define IO_WR16_ASYNC (_IO_WRITE_ | _IO_HW_)#define IO_WR8_ASYNC (_IO_WRITE_ | _IO_BYTE_)/* -Only Sync. burst accessing is provided. -*/ +* Only Sync. burst accessing is provided. +*/ #define IO_WR_BURST (x) (IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | \ ((x) & _IOSZ_MASK_))#define IO_RD_BURST (x) (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
@@ -218,8 +218,8 @@ struct reg_protocol_wt { };/* -Below is the data structure used by _io_handler -*/ +* Below is the data structure used by _io_handler +*/ struct io_queue {spinlock_t lock;
Signature · 1 line
2.11.1
PATCH 4/9 Staging: rtl8712: rtl871x_mlme.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_mlme.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8712/rtl871x_mlme.h +8 -8
@@ -68,14 +68,14 @@#define _FW_UNDER_SURVEY WIFI_SITE_MONITOR/* -there are several "locks" in mlme_priv, -since mlme_priv is a shared resource between many threads, -like ISR/Call-Back functions, the OID handlers, and even timer functions. -Each _queue has its own locks, already. -Other items are protected by mlme_priv.lock. -To avoid possible dead lock, any thread trying to modify mlme_priv -SHALL not lock up more than one lock at a time! -*/ +* there are several "locks" in mlme_priv, +* since mlme_priv is a shared resource between many threads, +* like ISR/Call-Back functions, the OID handlers, and even timer functions. +* Each _queue has its own locks, already. +* Other items are protected by mlme_priv.lock. +* To avoid possible dead lock, any thread trying to modify mlme_priv +* SHALL not lock up more than one lock at a time! +*/ #define traffic_threshold 10#define traffic_scan_period 500
Signature · 1 line
2.11.1
PATCH 5/9 Staging: rtl8712: rtl871x_mp_ioctl.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +16 -16
@@ -162,26 +162,26 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = {*/ {1, oid_rt_pro_set_channel_direct_call_hdl}, /*0x08*/ {1, oid_null_function}, /*0x09 -* OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL -*/ +* OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL +*/ {1, oid_null_function}, /*0x0A -* OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL -*/ +* OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL +*/ {1, oid_rt_pro_set_continuous_tx_hdl}, /*0x0B -* OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL -*/ +* OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL +*/ {1, oid_rt_pro_set_single_carrier_tx_hdl}, /*0x0C -* OID_RT_PRO_SET_SINGLE_CARRIER_TX_CONTINUOUS -*/ +* OID_RT_PRO_SET_SINGLE_CARRIER_TX_CONTINUOUS +*/ {1, oid_null_function}, /*0x0D -* OID_RT_PRO_SET_TX_ANTENNA_BB -*/ +* OID_RT_PRO_SET_TX_ANTENNA_BB +*/ {1, oid_rt_pro_set_antenna_bb_hdl}, /*0x0E*/ {1, oid_null_function}, /*0x0F OID_RT_PRO_SET_CR_SCRAMBLER*/ {1, oid_null_function}, /*0x10 OID_RT_PRO_SET_CR_NEW_FILTER*/ {1, oid_rt_pro_set_tx_power_control_hdl}, /*0x11 -* OID_RT_PRO_SET_TX_POWER_CONTROL -*/ +* OID_RT_PRO_SET_TX_POWER_CONTROL +*/ {1, oid_null_function}, /*0x12 OID_RT_PRO_SET_CR_TX_CONFIG*/ {1, oid_null_function}, /*0x13* OID_RT_PRO_GET_TX_POWER_CONTROL
@@ -218,11 +218,11 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_20[] = {*OID_RT_PRO_QUERY_PERMANENT_ADDRESS */ {1, oid_null_function}, /*0x2A -*OID_RT_PRO_SET_PHILIPS_RF_PARAMETERS -*/ +*OID_RT_PRO_SET_PHILIPS_RF_PARAMETERS +*/ {1, oid_rt_pro_set_carrier_suppression_tx_hdl},/*0x2B -*OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX -*/ +*OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX +*/ {1, oid_null_function}, /*0x2C OID_RT_PRO_RECEIVE_PACKET*/ {1, oid_null_function}, /*0x2D OID_RT_PRO_WRITE_EEPROM_BYTE*/ {1, oid_null_function}, /*0x2E OID_RT_PRO_READ_EEPROM_BYTE*/
Signature · 1 line
2.11.1
Greg KH
maintainerRe: [PATCH 5/9] Staging: rtl8712: rtl871x_mp_ioctl.h - style fix
Quoted 19 lines · Derek Robson
Fixed style of block comments
Found using checkpatchSigned-off-by Derek Robson <[email protected]>--- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-)drivers/staging/rtl8712/rtl871x_mp_ioctl.h +1
-2@@ -162,26 +162,26 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = {*/ {1, oid_rt_pro_set_channel_direct_call_hdl}, /*0x08*/ {1, oid_null_function}, /*0x09 -* OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL -*/ +* OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL
drivers/staging/rtl8712/rtl871x_mp_ioctl.h static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = { · line 171
Quoted 10 lines
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +4
-4+*/ {1, oid_null_function}, /*0x0A -* OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL -*/ +* OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL +*/ {1, oid_rt_pro_set_continuous_tx_hdl}, /*0x0B -* OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL -*/ +* OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL
Now you are going out beyond 80 columns, which is what caused someone to move the comment to the left earlier :(
Just put the comment in a single line, above the data definition, like this:
/* 0x0B OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL */
{1, oid_rt_pro_set_continuous_tx_hdl},
Which makes it easier for everyone to read and understand, which is the main goal of cleaning up code.
thanks,
greg k-h
PATCH 6/9 Staging: rtl8712: rtl871x_pwrctrl.h - style fix
In reply to Derek RobsonFixed style fo block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8712/rtl871x_pwrctrl.h +5 -5
@@ -48,11 +48,11 @@ enum Power_Mgnt { };/* -BIT[2:0] = HW state -BIT[3] = Protocol PS state, 0: register active state, -1: register sleep state -BIT[4] = sub-state -*/ +* BIT[2:0] = HW state +* BIT[3] = Protocol PS state, 0: register active state, +* 1: register sleep state +* BIT[4] = sub-state +*/ #define PS_DPS BIT(0)#define PS_LCLK (PS_DPS)
Signature · 1 line
2.11.1
PATCH 7/9 Staging: rtl8712: rtl871x_recv.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/rtl871x_recv.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8712/rtl871x_recv.h +6 -6
@@ -74,12 +74,12 @@ struct rx_pkt_attrib { };/* -accesser of recv_priv: recv_entry(dispatch / passive level); -recv_thread(passive) ; returnpkt(dispatch) -; halt(passive) ; - -using enter_critical section to protect -*/ +* accesser of recv_priv: recv_entry(dispatch / passive level); +* recv_thread(passive) ; returnpkt(dispatch) +* ; halt(passive) ; +* +* using enter_critical section to protect +*/ struct recv_priv {spinlock_t lock;struct __queue free_recv_queue;
Signature · 1 line
2.11.1
PATCH 8/9 Staging: rtl8712: wifi.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/wifi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8712/wifi.h +6 -6
@@ -370,7 +370,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)/*----------------------------------------------------------------------------- -Below is for the security related definition +* Below is for the security related definition *----------------------------------------------------------------------------- */ #define _RESERVED_FRAME_TYPE_ 0
@@ -415,7 +415,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)/* --------------------------------------------------------------------------- -Below is the fixed elements... +* Below is the fixed elements... * --------------------------------------------------------------------------- */ #define _AUTH_ALGM_NUM_ 2
@@ -444,14 +444,14 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)#define cap_ShortPremble BIT(5)/*----------------------------------------------------------------------------- -Below is the definition for 802.11i / 802.1x +* Below is the definition for 802.11i / 802.1x *------------------------------------------------------------------------------ */ #define _IEEE8021X_MGT_ 1/*WPA */ #define _IEEE8021X_PSK_ 2/* WPA with pre-shared key */ /*----------------------------------------------------------------------------- -Below is the definition for WMM +* Below is the definition for WMM *------------------------------------------------------------------------------ */ #define _WMM_IE_Length_ 7/* for WMM STA */
@@ -459,7 +459,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)/*----------------------------------------------------------------------------- -Below is the definition for 802.11n +* Below is the definition for 802.11n *------------------------------------------------------------------------------ */
@@ -498,7 +498,7 @@ struct ieee80211_bar {#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 -/** +/* * struct ieee80211_ht_cap - HT capabilities * * This structure refers to "HT capabilities element" as
Signature · 1 line
2.11.1
PATCH 9/9 Staging: rtl8712: wlan_bssdef.h - style fix
In reply to Derek RobsonFixed style of block comments
Found using checkpatch
--- drivers/staging/rtl8712/wlan_bssdef.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/wlan_bssdef.h +3 -3
@@ -53,9 +53,9 @@ struct NDIS_802_11_CONFIGURATION_FH { };/* -FW will only save the channel number in DSConfig. -ODI Handler will convert the channel number to freq. number. -*/ +* FW will only save the channel number in DSConfig. +* ODI Handler will convert the channel number to freq. number. +*/ struct NDIS_802_11_CONFIGURATION {u32 Length;/* Length of structure */ u32 BeaconPeriod;/* units are Kusec */
Signature · 1 line
2.11.1