Skip to contentSkip to conversation

Formatting updates to remove checkpatch warnings in ks_wlan_ioctl.h.

PATCH In review Matthew Giassa 2 participants 3 messages Mar 5, 2017 – Mar 13, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Formatting updates to remove checkpatch warnings in ks_wlan_ioctl.h.

Implementing some minor formatting changes to remove checkpatch warnings. Removing space-hardtab instances. Removing C++-style line comments in favor of C-style equivalent. Re-aligning function prototype arguments to remove related checkpatch warning.

---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/ks7010/ks_wlan_ioctl.h +8 -8
index 8e62b10..0e92495 100644
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
@@ -20,8 +20,8 @@
 /*					SIOCIWFIRSTPRIV + 2 */
 #define KS_WLAN_GET_FIRM_VERSION	SIOCIWFIRSTPRIV + 3
 #ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE 		SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE 		SIOCIWFIRSTPRIV + 5
+#define KS_WLAN_SET_WPS_ENABLE		SIOCIWFIRSTPRIV + 4
+#define KS_WLAN_GET_WPS_ENABLE		SIOCIWFIRSTPRIV + 5
 #define KS_WLAN_SET_WPS_PROBE_REQ	SIOCIWFIRSTPRIV + 6
 #endif
 #define KS_WLAN_GET_EEPROM_CKSUM	SIOCIWFIRSTPRIV + 7
@@ -33,8 +33,8 @@
 #define KS_WLAN_GET_SCAN_TYPE		SIOCIWFIRSTPRIV + 13
 #define KS_WLAN_SET_RX_GAIN		SIOCIWFIRSTPRIV + 14
 #define KS_WLAN_GET_RX_GAIN		SIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT			SIOCIWFIRSTPRIV + 16	/* unused */
-//#define KS_WLAN_SET_REGION            SIOCIWFIRSTPRIV + 17
+#define KS_WLAN_HOSTT			SIOCIWFIRSTPRIV + 16 /* unused */
+/* #define KS_WLAN_SET_REGION		SIOCIWFIRSTPRIV + 17 */
 #define KS_WLAN_SET_BEACON_LOST		SIOCIWFIRSTPRIV + 18
 #define KS_WLAN_GET_BEACON_LOST		SIOCIWFIRSTPRIV + 19
 
@@ -48,8 +48,8 @@
 #define KS_WLAN_GET_CTS_MODE		SIOCIWFIRSTPRIV + 25
 /*					SIOCIWFIRSTPRIV + 26 */
 /*					SIOCIWFIRSTPRIV + 27 */
-#define KS_WLAN_SET_SLEEP_MODE		SIOCIWFIRSTPRIV + 28	/* sleep mode */
-#define KS_WLAN_GET_SLEEP_MODE		SIOCIWFIRSTPRIV + 29	/* sleep mode */
+#define KS_WLAN_SET_SLEEP_MODE		SIOCIWFIRSTPRIV + 28 /* sleep mode */
+#define KS_WLAN_GET_SLEEP_MODE		SIOCIWFIRSTPRIV + 29 /* sleep mode */
 /*					SIOCIWFIRSTPRIV + 30 */
 /*					SIOCIWFIRSTPRIV + 31 */
 
@@ -60,7 +60,7 @@
 
 int ks_wlan_read_config_file(struct ks_wlan_private *priv);
 int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
-		             unsigned int commit_flag);
+			    unsigned int commit_flag);
 
 #endif /* __KERNEL__ */
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 Formatting updates to resolve checkpatch errors in ks_wlan_ioctl.h.

Updating macros to be wrapped in parentheses to accomodate checkpatch errors throughout the header. This change, combined with the previous patch, resolves all outstanding warnings/errors produce by checkpatch.

---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 66 +++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 34 deletions(-)
drivers/staging/ks7010/ks_wlan_ioctl.h +32 -34
index 0e92495..bfb8555 100644
@@ -15,43 +15,41 @@
 #include <linux/wireless.h>
 /* The low order bit identify a SET (0) or a GET (1) ioctl.  */
 
-/*					SIOCIWFIRSTPRIV + 0 */
-/* former KS_WLAN_GET_DRIVER_VERSION	SIOCIWFIRSTPRIV + 1 */
-/*					SIOCIWFIRSTPRIV + 2 */
-#define KS_WLAN_GET_FIRM_VERSION	SIOCIWFIRSTPRIV + 3
+/*					(SIOCIWFIRSTPRIV + 0) */
+/* former KS_WLAN_GET_DRIVER_VERSION	(SIOCIWFIRSTPRIV + 1) */
+/*					(SIOCIWFIRSTPRIV + 2) */
+#define KS_WLAN_GET_FIRM_VERSION	(SIOCIWFIRSTPRIV + 3)
 #ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE		SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE		SIOCIWFIRSTPRIV + 5
-#define KS_WLAN_SET_WPS_PROBE_REQ	SIOCIWFIRSTPRIV + 6
+#define KS_WLAN_SET_WPS_ENABLE		(SIOCIWFIRSTPRIV + 4)
+#define KS_WLAN_GET_WPS_ENABLE		(SIOCIWFIRSTPRIV + 5)
+#define KS_WLAN_SET_WPS_PROBE_REQ	(SIOCIWFIRSTPRIV + 6)
 #endif
-#define KS_WLAN_GET_EEPROM_CKSUM	SIOCIWFIRSTPRIV + 7
-#define KS_WLAN_SET_PREAMBLE		SIOCIWFIRSTPRIV + 8
-#define KS_WLAN_GET_PREAMBLE		SIOCIWFIRSTPRIV + 9
-#define KS_WLAN_SET_POWER_SAVE		SIOCIWFIRSTPRIV + 10
-#define KS_WLAN_GET_POWER_SAVE		SIOCIWFIRSTPRIV + 11
-#define KS_WLAN_SET_SCAN_TYPE		SIOCIWFIRSTPRIV + 12
-#define KS_WLAN_GET_SCAN_TYPE		SIOCIWFIRSTPRIV + 13
-#define KS_WLAN_SET_RX_GAIN		SIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAIN		SIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT			SIOCIWFIRSTPRIV + 16 /* unused */
-/* #define KS_WLAN_SET_REGION		SIOCIWFIRSTPRIV + 17 */
-#define KS_WLAN_SET_BEACON_LOST		SIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOST		SIOCIWFIRSTPRIV + 19
-
-#define KS_WLAN_SET_TX_GAIN		SIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAIN		SIOCIWFIRSTPRIV + 21
-
+#define KS_WLAN_GET_EEPROM_CKSUM	(SIOCIWFIRSTPRIV + 7)
+#define KS_WLAN_SET_PREAMBLE		(SIOCIWFIRSTPRIV + 8)
+#define KS_WLAN_GET_PREAMBLE		(SIOCIWFIRSTPRIV + 9)
+#define KS_WLAN_SET_POWER_SAVE		(SIOCIWFIRSTPRIV + 10)
+#define KS_WLAN_GET_POWER_SAVE		(SIOCIWFIRSTPRIV + 11)
+#define KS_WLAN_SET_SCAN_TYPE		(SIOCIWFIRSTPRIV + 12)
+#define KS_WLAN_GET_SCAN_TYPE		(SIOCIWFIRSTPRIV + 13)
+#define KS_WLAN_SET_RX_GAIN		(SIOCIWFIRSTPRIV + 14)
+#define KS_WLAN_GET_RX_GAIN		(SIOCIWFIRSTPRIV + 15)
+#define KS_WLAN_HOSTT			(SIOCIWFIRSTPRIV + 16) /* unused */
+/* #define KS_WLAN_SET_REGION		(SIOCIWFIRSTPRIV + 17) */
+#define KS_WLAN_SET_BEACON_LOST		(SIOCIWFIRSTPRIV + 18)
+#define KS_WLAN_GET_BEACON_LOST		(SIOCIWFIRSTPRIV + 19)
+#define KS_WLAN_SET_TX_GAIN		(SIOCIWFIRSTPRIV + 20)
+#define KS_WLAN_GET_TX_GAIN		(SIOCIWFIRSTPRIV + 21)
 /* for KS7010 */
-#define KS_WLAN_SET_PHY_TYPE		SIOCIWFIRSTPRIV + 22
-#define KS_WLAN_GET_PHY_TYPE		SIOCIWFIRSTPRIV + 23
-#define KS_WLAN_SET_CTS_MODE		SIOCIWFIRSTPRIV + 24
-#define KS_WLAN_GET_CTS_MODE		SIOCIWFIRSTPRIV + 25
-/*					SIOCIWFIRSTPRIV + 26 */
-/*					SIOCIWFIRSTPRIV + 27 */
-#define KS_WLAN_SET_SLEEP_MODE		SIOCIWFIRSTPRIV + 28 /* sleep mode */
-#define KS_WLAN_GET_SLEEP_MODE		SIOCIWFIRSTPRIV + 29 /* sleep mode */
-/*					SIOCIWFIRSTPRIV + 30 */
-/*					SIOCIWFIRSTPRIV + 31 */
+#define KS_WLAN_SET_PHY_TYPE		(SIOCIWFIRSTPRIV + 22)
+#define KS_WLAN_GET_PHY_TYPE		(SIOCIWFIRSTPRIV + 23)
+#define KS_WLAN_SET_CTS_MODE		(SIOCIWFIRSTPRIV + 24)
+#define KS_WLAN_GET_CTS_MODE		(SIOCIWFIRSTPRIV + 25)
+/*					(SIOCIWFIRSTPRIV + 26) */
+/*					(SIOCIWFIRSTPRIV + 27) */
+#define KS_WLAN_SET_SLEEP_MODE		(SIOCIWFIRSTPRIV + 28) /* sleep mode */
+#define KS_WLAN_GET_SLEEP_MODE		(SIOCIWFIRSTPRIV + 29) /* sleep mode */
+/*					(SIOCIWFIRSTPRIV + 30) */
+/*					(SIOCIWFIRSTPRIV + 31) */
 
 #ifdef __KERNEL__
 
Signature · 1 line
2.7.4
maintainer
#2 lore raw
In reply to Matthew Giassa
Quoted 4 lines · Matthew Giassa

Implementing some minor formatting changes to remove checkpatch warnings. Removing space-hardtab instances. Removing C++-style line comments in favor of C-style equivalent. Re-aligning function prototype arguments to remove related checkpatch warning.

That is a lot of different things to do all at once, please break this up into one logical patch per "thing" you do.

Also, fix up your subject line to match how other patches for this subsystem/driver look, git log will show you what to do there.

thanks,

greg k-h