public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: rtl8712: Coding style cleanups
@ 2015-11-18 19:59 Michael Hornung
  2015-11-18 19:59 ` [PATCH 1/6] staging: rtl8712: Coding style: Remove multiple blank lines Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Do coding style cleanups on file ieee80211.h and get rid of
  all checkpatch.pl output.

Michael Hornung (6):
  staging: rtl8712: Coding style: Remove multiple blank lines
  staging: rtl8712: Coding style: Make use of BIT macro
  staging: rtl8712: Coding style: Fix missing spaces
  staging: rtl8712: Replace FSF mailing address by URL
  staging: rtl8712: Coding style: Fix alignment
  staging: rtl8712: Remove unused CamelCase define

 drivers/staging/rtl8712/ieee80211.h | 112 ++++++++++++++++--------------------
 1 file changed, 49 insertions(+), 63 deletions(-)

-- 
2.6.2


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

* [PATCH 1/6] staging: rtl8712: Coding style: Remove multiple blank lines
  2015-11-18 19:59 [PATCH 0/6] staging: rtl8712: Coding style cleanups Michael Hornung
@ 2015-11-18 19:59 ` Michael Hornung
  2015-11-18 19:59   ` [PATCH 2/6] staging: rtl8712: Coding style: Make use of BIT macro Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Remove multiple blank lines in order to get rid of checkpatch.pl
  "CHECK" output

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index d374824c..bba978e 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -61,7 +61,6 @@
 #define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED	6
 #define IEEE_CRYPT_ERR_CARD_CONF_FAILED		7
 
-
 #define	IEEE_CRYPT_ALG_NAME_LEN			16
 
 #define WPA_CIPHER_NONE				BIT(0)
@@ -70,8 +69,6 @@
 #define WPA_CIPHER_TKIP				BIT(3)
 #define WPA_CIPHER_CCMP				BIT(4)
 
-
-
 #define WPA_SELECTOR_LEN			4
 #define RSN_HEADER_LEN				4
 
@@ -88,7 +85,6 @@ enum NETWORK_TYPE {
 	WIRELESS_11BGN		= (WIRELESS_11B | WIRELESS_11G | WIRELESS_11N),
 };
 
-
 struct ieee_param {
 	u32 cmd;
 	u8 sta_addr[ETH_ALEN];
@@ -161,7 +157,6 @@ struct ieee80211_hdr_3addr {
 	u16 seq_ctl;
 } __packed;
 
-
 struct	ieee80211_hdr_qos {
 	u16 frame_ctl;
 	u16 duration_id;
@@ -191,7 +186,6 @@ struct eapol {
 	u16 length;
 } __packed;
 
-
 enum eap_type {
 	EAP_PACKET = 0,
 	EAPOL_START,
@@ -331,14 +325,12 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_DATA_HDR3_LEN 24
 #define IEEE80211_DATA_HDR4_LEN 30
 
-
 #define IEEE80211_STATMASK_SIGNAL (1<<0)
 #define IEEE80211_STATMASK_RSSI (1<<1)
 #define IEEE80211_STATMASK_NOISE (1<<2)
 #define IEEE80211_STATMASK_RATE (1<<3)
 #define IEEE80211_STATMASK_WEMASK 0x7
 
-
 #define IEEE80211_CCK_MODULATION    (1<<0)
 #define IEEE80211_OFDM_MODULATION   (1<<1)
 
@@ -348,7 +340,6 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_CCK_RATE_LEN			4
 #define IEEE80211_NUM_OFDM_RATESLEN	8
 
-
 #define IEEE80211_CCK_RATE_1MB		        0x02
 #define IEEE80211_CCK_RATE_2MB		        0x04
 #define IEEE80211_CCK_RATE_5MB		        0x0B
@@ -401,9 +392,6 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_NUM_CCK_RATES	            4
 #define IEEE80211_OFDM_SHIFT_MASK_A         4
 
-
-
-
 /* NOTE: This data is for statistical purposes; not all hardware provides this
  *       information for frames received.  Not setting these will not cause
  *       any adverse affects.
-- 
2.6.2


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

* [PATCH 2/6] staging: rtl8712: Coding style: Make use of BIT macro
  2015-11-18 19:59 ` [PATCH 1/6] staging: rtl8712: Coding style: Remove multiple blank lines Michael Hornung
@ 2015-11-18 19:59   ` Michael Hornung
  2015-11-18 19:59     ` [PATCH 3/6] staging: rtl8712: Coding style: Fix missing spaces Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Replace all occurences of (1<<x) by BIT(x) in order to get rid
  of checkpatch.pl "CHECK" output "Prefer using the BIT macro"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 92 ++++++++++++++++++-------------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index bba978e..8ca3444 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -299,15 +299,15 @@ struct ieee80211_snap_hdr {
 
 #define WLAN_AUTH_CHALLENGE_LEN 128
 
-#define WLAN_CAPABILITY_BSS (1<<0)
-#define WLAN_CAPABILITY_IBSS (1<<1)
-#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
-#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
-#define WLAN_CAPABILITY_PRIVACY (1<<4)
-#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
-#define WLAN_CAPABILITY_PBCC (1<<6)
-#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
-#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
+#define WLAN_CAPABILITY_BSS BIT(0)
+#define WLAN_CAPABILITY_IBSS BIT(1)
+#define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
+#define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
+#define WLAN_CAPABILITY_PRIVACY BIT(4)
+#define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
+#define WLAN_CAPABILITY_PBCC BIT(6)
+#define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
+#define WLAN_CAPABILITY_SHORT_SLOT BIT(10)
 
 /* Information Element IDs */
 #define WLAN_EID_SSID 0
@@ -325,17 +325,17 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_DATA_HDR3_LEN 24
 #define IEEE80211_DATA_HDR4_LEN 30
 
-#define IEEE80211_STATMASK_SIGNAL (1<<0)
-#define IEEE80211_STATMASK_RSSI (1<<1)
-#define IEEE80211_STATMASK_NOISE (1<<2)
-#define IEEE80211_STATMASK_RATE (1<<3)
+#define IEEE80211_STATMASK_SIGNAL BIT(0)
+#define IEEE80211_STATMASK_RSSI BIT(1)
+#define IEEE80211_STATMASK_NOISE BIT(2)
+#define IEEE80211_STATMASK_RATE BIT(3)
 #define IEEE80211_STATMASK_WEMASK 0x7
 
-#define IEEE80211_CCK_MODULATION    (1<<0)
-#define IEEE80211_OFDM_MODULATION   (1<<1)
+#define IEEE80211_CCK_MODULATION    BIT(0)
+#define IEEE80211_OFDM_MODULATION   BIT(1)
 
-#define IEEE80211_24GHZ_BAND     (1<<0)
-#define IEEE80211_52GHZ_BAND     (1<<1)
+#define IEEE80211_24GHZ_BAND     BIT(0)
+#define IEEE80211_52GHZ_BAND     BIT(1)
 
 #define IEEE80211_CCK_RATE_LEN			4
 #define IEEE80211_NUM_OFDM_RATESLEN	8
@@ -355,18 +355,18 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_OFDM_RATE_54MB		0x6C
 #define IEEE80211_BASIC_RATE_MASK		0x80
 
-#define IEEE80211_CCK_RATE_1MB_MASK		(1<<0)
-#define IEEE80211_CCK_RATE_2MB_MASK		(1<<1)
-#define IEEE80211_CCK_RATE_5MB_MASK		(1<<2)
-#define IEEE80211_CCK_RATE_11MB_MASK		(1<<3)
-#define IEEE80211_OFDM_RATE_6MB_MASK		(1<<4)
-#define IEEE80211_OFDM_RATE_9MB_MASK		(1<<5)
-#define IEEE80211_OFDM_RATE_12MB_MASK		(1<<6)
-#define IEEE80211_OFDM_RATE_18MB_MASK		(1<<7)
-#define IEEE80211_OFDM_RATE_24MB_MASK		(1<<8)
-#define IEEE80211_OFDM_RATE_36MB_MASK		(1<<9)
-#define IEEE80211_OFDM_RATE_48MB_MASK		(1<<10)
-#define IEEE80211_OFDM_RATE_54MB_MASK		(1<<11)
+#define IEEE80211_CCK_RATE_1MB_MASK		BIT(0)
+#define IEEE80211_CCK_RATE_2MB_MASK		BIT(1)
+#define IEEE80211_CCK_RATE_5MB_MASK		BIT(2)
+#define IEEE80211_CCK_RATE_11MB_MASK		BIT(3)
+#define IEEE80211_OFDM_RATE_6MB_MASK		BIT(4)
+#define IEEE80211_OFDM_RATE_9MB_MASK		BIT(5)
+#define IEEE80211_OFDM_RATE_12MB_MASK		BIT(6)
+#define IEEE80211_OFDM_RATE_18MB_MASK		BIT(7)
+#define IEEE80211_OFDM_RATE_24MB_MASK		BIT(8)
+#define IEEE80211_OFDM_RATE_36MB_MASK		BIT(9)
+#define IEEE80211_OFDM_RATE_48MB_MASK		BIT(10)
+#define IEEE80211_OFDM_RATE_54MB_MASK		BIT(11)
 
 #define IEEE80211_CCK_RATES_MASK	        0x0000000F
 #define IEEE80211_CCK_BASIC_RATES_MASK		(IEEE80211_CCK_RATE_1MB_MASK | \
@@ -469,15 +469,15 @@ struct ieee80211_softmac_stats {
 	uint swtxawake;
 };
 
-#define SEC_KEY_1         (1<<0)
-#define SEC_KEY_2         (1<<1)
-#define SEC_KEY_3         (1<<2)
-#define SEC_KEY_4         (1<<3)
-#define SEC_ACTIVE_KEY    (1<<4)
-#define SEC_AUTH_MODE     (1<<5)
-#define SEC_UNICAST_GROUP (1<<6)
-#define SEC_LEVEL         (1<<7)
-#define SEC_ENABLED       (1<<8)
+#define SEC_KEY_1         BIT(0)
+#define SEC_KEY_2         BIT(1)
+#define SEC_KEY_3         BIT(2)
+#define SEC_KEY_4         BIT(3)
+#define SEC_ACTIVE_KEY    BIT(4)
+#define SEC_AUTH_MODE     BIT(5)
+#define SEC_UNICAST_GROUP BIT(6)
+#define SEC_LEVEL         BIT(7)
+#define SEC_ENABLED       BIT(8)
 
 #define SEC_LEVEL_0      0 /* None */
 #define SEC_LEVEL_1      1 /* WEP 40 and 104 bit */
@@ -633,9 +633,9 @@ struct ieee80211_txb {
 
 #define MAX_WPA_IE_LEN 128
 
-#define NETWORK_EMPTY_ESSID (1<<0)
-#define NETWORK_HAS_OFDM    (1<<1)
-#define NETWORK_HAS_CCK     (1<<2)
+#define NETWORK_EMPTY_ESSID BIT(0)
+#define NETWORK_HAS_OFDM    BIT(1)
+#define NETWORK_HAS_CCK     BIT(2)
 
 #define IEEE80211_DTIM_MBCAST 4
 #define IEEE80211_DTIM_UCAST 2
@@ -687,14 +687,14 @@ enum ieee80211_state {
 #define DEFAULT_MAX_SCAN_AGE (15 * HZ)
 #define DEFAULT_FTS 2346
 
-#define CFG_IEEE80211_RESERVE_FCS (1<<0)
-#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
+#define CFG_IEEE80211_RESERVE_FCS BIT(0)
+#define CFG_IEEE80211_COMPUTE_FCS BIT(1)
 
 #define MAXTID	16
 
-#define IEEE_A            (1<<0)
-#define IEEE_B            (1<<1)
-#define IEEE_G            (1<<2)
+#define IEEE_A            BIT(0)
+#define IEEE_B            BIT(1)
+#define IEEE_G            BIT(2)
 #define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
 
 static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
-- 
2.6.2


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

* [PATCH 3/6] staging: rtl8712: Coding style: Fix missing spaces
  2015-11-18 19:59   ` [PATCH 2/6] staging: rtl8712: Coding style: Make use of BIT macro Michael Hornung
@ 2015-11-18 19:59     ` Michael Hornung
  2015-11-18 19:59       ` [PATCH 4/6] staging: rtl8712: Replace FSF mailing address by URL Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Add missing spaces around bitwise OR operation in order to get
  rid of checkpatch.pl's "CHECK: spaces preferred around that '|'"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index 8ca3444..e372e1d 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -695,7 +695,7 @@ enum ieee80211_state {
 #define IEEE_A            BIT(0)
 #define IEEE_B            BIT(1)
 #define IEEE_G            BIT(2)
-#define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
+#define IEEE_MODE_MASK    (IEEE_A | IEEE_B | IEEE_G)
 
 static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
 {
-- 
2.6.2


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

* [PATCH 4/6] staging: rtl8712: Replace FSF mailing address by URL
  2015-11-18 19:59     ` [PATCH 3/6] staging: rtl8712: Coding style: Fix missing spaces Michael Hornung
@ 2015-11-18 19:59       ` Michael Hornung
  2015-11-18 19:59         ` [PATCH 5/6] staging: rtl8712: Coding style: Fix alignment Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Fix checkpatch.pl output about not including the paragraph
  about writing to the Free Software Foundation's mailing address

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index e372e1d..830452b 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -12,8 +12,7 @@
  * more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
+ * this program; if not, see <http://www.gnu.org/licenses/>.
  *
  * Modifications for inclusion into the Linux staging tree are
  * Copyright(c) 2010 Larry Finger. All rights reserved.
-- 
2.6.2


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

* [PATCH 5/6] staging: rtl8712: Coding style: Fix alignment
  2015-11-18 19:59       ` [PATCH 4/6] staging: rtl8712: Replace FSF mailing address by URL Michael Hornung
@ 2015-11-18 19:59         ` Michael Hornung
  2015-11-18 19:59           ` [PATCH 6/6] staging: rtl8712: Remove unused CamelCase define Michael Hornung
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Fix alignment which did not match open parenthesis

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index 830452b..e5ec6c2 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -744,7 +744,7 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *rsn_ie_len, int limit);
 unsigned char *r8712_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len,
 				 int limit);
 int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
-			int *pairwise_cipher);
+		       int *pairwise_cipher);
 int r8712_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
 			int *pairwise_cipher);
 int r8712_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
-- 
2.6.2


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

* [PATCH 6/6] staging: rtl8712: Remove unused CamelCase define
  2015-11-18 19:59         ` [PATCH 5/6] staging: rtl8712: Coding style: Fix alignment Michael Hornung
@ 2015-11-18 19:59           ` Michael Hornung
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Hornung @ 2015-11-18 19:59 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: paul.gortmaker, punitvara, devel, linux-kernel, Michael Hornung

* Remove unused CamelCase in order to get rid of the corresponding
  checkpatch.pl "CHECK: Avoid CamelCase: <IEEE80211_QoS_DATAGRP>"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
---
 drivers/staging/rtl8712/ieee80211.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index e5ec6c2..67ab580 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -248,7 +248,6 @@ enum eap_type {
 #define IEEE80211_STYPE_CFPOLL		0x0060
 #define IEEE80211_STYPE_CFACKPOLL	0x0070
 #define IEEE80211_QOS_DATAGRP		0x0080
-#define IEEE80211_QoS_DATAGRP		IEEE80211_QOS_DATAGRP
 
 #define IEEE80211_SCTL_FRAG		0x000F
 #define IEEE80211_SCTL_SEQ		0xFFF0
-- 
2.6.2


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

end of thread, other threads:[~2015-11-18 20:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 19:59 [PATCH 0/6] staging: rtl8712: Coding style cleanups Michael Hornung
2015-11-18 19:59 ` [PATCH 1/6] staging: rtl8712: Coding style: Remove multiple blank lines Michael Hornung
2015-11-18 19:59   ` [PATCH 2/6] staging: rtl8712: Coding style: Make use of BIT macro Michael Hornung
2015-11-18 19:59     ` [PATCH 3/6] staging: rtl8712: Coding style: Fix missing spaces Michael Hornung
2015-11-18 19:59       ` [PATCH 4/6] staging: rtl8712: Replace FSF mailing address by URL Michael Hornung
2015-11-18 19:59         ` [PATCH 5/6] staging: rtl8712: Coding style: Fix alignment Michael Hornung
2015-11-18 19:59           ` [PATCH 6/6] staging: rtl8712: Remove unused CamelCase define Michael Hornung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox