staging: ks7010: add parentheses to complex macro
authorTobin C. Harding <me@tobin.cc>
Mon, 13 Mar 2017 07:54:08 +0000 (18:54 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 22:20:57 +0000 (06:20 +0800)
Checkpatch emits ERROR: Macros with complex values should be enclosed
in parentheses. Error may be fixed by adding parentheses around macro
definition, macros are simple arithmetic statement.

Add parentheses around macro definitions. Fix 24 cases of identical
error. Do commented out macros also to save the next developer from
having to add them.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_ioctl.h

index 1251d7edcac90e7ccc59641be3b14b246b2d4150..28b381c24b42ebf77ac9428afe1b1f4f591d0dc4 100644 (file)
 #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_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_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__