[PATCHv5 3/4] Staging: ks7010: ks_wlan_ioctl.h: Aligning parameters in function prototypes.

2017-03-15 Thread Matthew Giassa
Re-aligning function parameters in function prototypes by inserting
additional hard-tabs to resolve a checkpatch warning.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1b68402..1251d7e 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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__ */
 
-- 
2.7.4



[PATCHv5 1/4] Staging: ks7010: ks_wlan_ioctl.h: Removed mixed spaces/tabs

2017-03-15 Thread Matthew Giassa
Removing mixed spaces/hard-tabs used to create a "column alignment" of
macro names and macro values.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 8e62b10..d811680 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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
-- 
2.7.4



[PATCHv5 4/4] Staging: ks7010: ks_wlan_ioctl.h: Wrap complex macros with parentheses

2017-03-15 Thread Matthew Giassa
Wrapping all complex macros with parentheses to resolve checkpatch
errors. This change, along with the preceding changes in this change
set, resolves all checkpatch warnings and errors for the file.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1251d7e..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* 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_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#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_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#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__
 
-- 
2.7.4



[PATCHv5 0/4] Staging: ks7010: ks_wlan_ioctl.h: checkpatch fixes

2017-03-15 Thread Matthew Giassa
The following patches address all outstanding checkpatch warnings/errors
present in drivers/staging/ks7010/ks_wlan_ioctl.h.

This change set has been rebased off of the current master
(69eea5a4ab9c705496e912b55a9d312325de19e6) as per an earlier request,
and the change log formatting has been slightly changed, as per Tobin's
advice.




[PATCHv5 2/4] Staging: ks7010: ks_wlan_ioctl.h: Remove trailing white space

2017-03-15 Thread Matthew Giassa
Removing trailing white space characters in comments to resolve
a checkpatch warning.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index d811680..1b68402 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
-- 
2.7.4



Re: [PATCHv5 4/4] Staging: ks7010: ks_wlan_ioctl.h: Wrap complex macros with parentheses

2017-03-15 Thread Matthew Giassa

* Tobin C. Harding <m...@tobin.cc> [2017-03-15 14:14:08 +1100]:


On Tue, Mar 14, 2017 at 07:25:54PM -0700, Matthew Giassa wrote:

Wrapping all complex macros with parentheses to resolve checkpatch
errors. This change, along with the preceding changes in this change
set, resolves all checkpatch warnings and errors for the file.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1251d7e..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* 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_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#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_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#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) */
+/* (SIOCIWFI

[PATCHv5 2/4] Staging: ks7010: ks_wlan_ioctl.h: Remove trailing white space

2017-03-14 Thread Matthew Giassa
Removing trailing white space characters in comments to resolve
a checkpatch warning.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index d811680..1b68402 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
-- 
2.7.4



[PATCHv5 1/4] Staging: ks7010: ks_wlan_ioctl.h: Removed mixed spaces/tabs

2017-03-14 Thread Matthew Giassa
Removing mixed spaces/hard-tabs used to create a "column alignment" of
macro names and macro values.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 8e62b10..d811680 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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
-- 
2.7.4



[PATCHv5 4/4] Staging: ks7010: ks_wlan_ioctl.h: Wrap complex macros with parentheses

2017-03-14 Thread Matthew Giassa
Wrapping all complex macros with parentheses to resolve checkpatch
errors. This change, along with the preceding changes in this change
set, resolves all checkpatch warnings and errors for the file.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1251d7e..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* 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_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#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_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#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__
 
-- 
2.7.4



[PATCHv5 3/4] Staging: ks7010: ks_wlan_ioctl.h: Aligning parameters in function prototypes.

2017-03-14 Thread Matthew Giassa
Re-aligning function parameters in function prototypes by inserting
additional hard-tabs to resolve a checkpatch warning.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1b68402..1251d7e 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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__ */
 
-- 
2.7.4



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

2017-03-05 Thread Matthew Giassa
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.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 66 +-
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 0e92495..bfb8555 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,41 @@
 #include 
 /* 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_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16 /* unused */
-/* #define KS_WLAN_SET_REGION  SIOCIWFIRSTPRIV + 17 */
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
-
-#define KS_WLAN_SET_TX_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 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__
 
-- 
2.7.4



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

2017-03-05 Thread 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.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 8e62b10..0e92495 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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_GAINSIOCIWFIRSTPRIV + 14
 #define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
+#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16 /* unused */
+/* #define KS_WLAN_SET_REGION  SIOCIWFIRSTPRIV + 17 */
 #define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
 #define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 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__ */
 
-- 
2.7.4



[PATCHv3 3/4] Removing mixed spaces/hard-tabs in the alignment indentation to appease checkpatch.

2017-02-26 Thread Matthew Giassa
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 0aa402d..9f71f01 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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)
-- 
2.7.4



[PATCHv3 1/4] Encasing macros with complex values (ie: base value plus index) with parentheses.

2017-02-26 Thread Matthew Giassa
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 8e62b10..47c8015 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* 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_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#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_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#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__
 
-- 
2.7.4



[PATCHv3 4/4] Changing alignment and indentation in function prototypes so parameters line up to make checkpatch happy (no more warnings/errors).

2017-02-26 Thread Matthew Giassa
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 9f71f01..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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__ */
 
-- 
2.7.4



[PATCHv3 2/4] Removing trailing whitespace in comment block.

2017-02-26 Thread Matthew Giassa
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 47c8015..0aa402d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
-- 
2.7.4



[PATCHv3] checkpatch fixes for drivers/staging/ks7010/ks_wlan_ioctl.h

2017-02-26 Thread Matthew Giassa
Assembling a set of patches to address all outstanding checkpatch issues in
staging/drivers/ks7010/ks_wlan_ioctl.h to replace my earlier v2 work which
attempted to do all of this in a single patch. This includes wrapping macros
with complex values in parentheses, removing extraneous/mixed whitespace
characters, and changing the alignment of parameters in function prototypes.



[PATCHv2] Checkpatch fixes for staging/drivers/ks7010.

2017-02-22 Thread Matthew Giassa
Wrapping complex macros with parentheses.
Adding extra spaces between macros and integer literals.
Indentation changes to remove checkpatch warnings.
Swapping out C++-style comments with C-style comments.

Signed-off-by: Matthew Giassa <matt...@giassa.net>
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 74 +-
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 84554b6..b0166c2 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
@@ -8,50 +8,49 @@
  *   it under the terms of the GNU General Public License version 2 as
  *   published by the Free Software Foundation.
  */
-
 #ifndef _KS_WLAN_IOCTL_H
 #define _KS_WLAN_IOCTL_H

 #include 
-/* The low order bit identify a SET (0) or a GET (1) ioctl.  */
+/* 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_GAINSIOCIWFIRSTPRIV+14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV+15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV+16  /* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV+17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV+18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV+19
+#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_GAINSIOCIWFIRSTPRIV+20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV+21
+#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 */
+/* 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) */
+#

Re: [PATCH] staging/ks7010: formatting updates.

2017-02-21 Thread Matthew Giassa

* Joe Perches <j...@perches.com> [2017-02-21 10:47:31 -0800]:


On Tue, 2017-02-21 at 09:32 -0800, Matthew Giassa wrote:

* Geert Uytterhoeven <ge...@linux-m68k.org> [2017-02-21 15:22:10 +0100]:

> The first declaration fit nicely on a single line.
> The second one indeed has a few spaces instead of TABs in the
> continuation line. But that can be fixed easily, without moving the
> first parameter to a continuation line.

What would the proposed fix be? A combination of spaces and hard-tabs? I
don't see checkpatch complaining about it, so that could work too.


Maximal initial tabs, followed by required spaces to align
to open parenthesis



Thank you Joe. I will change it accordingly. Is there a supplementary
style guide that covers these finer details?

Cheers!

--
-Matthew Giassa
e:<matt...@giassa.net>



Re: [PATCH] staging/ks7010: formatting updates.

2017-02-21 Thread Matthew Giassa

* Geert Uytterhoeven <ge...@linux-m68k.org> [2017-02-21 15:22:10 +0100]:


The first declaration fit nicely on a single line.
The second one indeed has a few spaces instead of TABs in the
continuation line. But that can be fixed easily, without moving the
first parameter to a continuation line.


What would the proposed fix be? A combination of spaces and hard-tabs? I
don't see checkpatch complaining about it, so that could work too.

--
-Matthew Giassa
e:<matt...@giassa.net>



Re: [PATCH] staging/ks7010: formatting updates.

2017-02-21 Thread Matthew Giassa

* Geert Uytterhoeven <ge...@linux-m68k.org> [2017-02-21 08:59:18 +0100]:

Hi Geert,


On Tue, Feb 21, 2017 at 5:20 AM, Matthew Giassa <matt...@giassa.net> wrote:

Please pardon the earlier e-mail which was missing the changelog text.


This line should be between the "---" and the diffstat below.



Thank you.


Some additional style changes to appease checkpatch.


Which additional style changes?



* Aligning function parameters in the function prototypes.
* Removing "double newlines". where checkpatch warns about them.
* Spaces between macro names, '+', and integer literals.
* Swapped out some line comments with C-style equivalent.
* Removing trailing spaces.



---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 80 +-
 1 file changed, 41 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 84554b6..00eec18 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h



 #include "ks_wlan.h"
 #include 

-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);
+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);


Really?
If checkpatch complained about the above, you should file a bug report
against checkpatch.

Gr{oetje,eeting}s,


It seems to be a very deliberate message from checkpatch, complaining
about the alignment of the beginning of individual function parameters
in the prototype. The only two configurations which appeased it was the
changes I put in above, or a combination of hard-tabs (8-wide, noexpand)
and spaces, which I thought was ugly.

--

Matthew


[PATCH] staging/ks7010: formatting updates.

2017-02-20 Thread Matthew Giassa
Please pardon the earlier e-mail which was missing the changelog text.

Wrapping complex macros with parentheses to remove checkpatch errors.
Some additional style changes to appease checkpatch.

---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 80 +-
 1 file changed, 41 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 84554b6..00eec18 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
@@ -8,60 +8,62 @@
  *   it under the terms of the GNU General Public License version 2 as
  *   published by the Free Software Foundation.
  */
-
 #ifndef _KS_WLAN_IOCTL_H
 #define _KS_WLAN_IOCTL_H
 
 #include 
-/* The low order bit identify a SET (0) or a GET (1) ioctl.  */
+/* 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_GAINSIOCIWFIRSTPRIV+14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV+15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV+16  /* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV+17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV+18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV+19
+#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_GAINSIOCIWFIRSTPRIV+20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV+21
+#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 */
+/* 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