* [PATCH] staging: wilc1000: align defines
@ 2015-06-15 3:35 Chaehyun Lim
2015-06-17 2:08 ` Chaehyun Lim
0 siblings, 1 reply; 2+ messages in thread
From: Chaehyun Lim @ 2015-06-15 3:35 UTC (permalink / raw)
To: kernel-janitors
Align the lines of some defines in wilc_errorsupport.h
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_errorsupport.h | 32 ++++++++++++++--------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_errorsupport.h b/drivers/staging/wilc1000/wilc_errorsupport.h
index 6963a46..b9517dc 100644
--- a/drivers/staging/wilc1000/wilc_errorsupport.h
+++ b/drivers/staging/wilc1000/wilc_errorsupport.h
@@ -13,26 +13,26 @@
#include "linux_wlan_common.h"
/* Psitive Numbers to indicate sucess with special status */
-#define WILC_ALREADY_EXSIT (+100) /** The requested object already exists */
+#define WILC_ALREADY_EXSIT (+100) /** The requested object already exists */
/* Generic success will return 0 */
-#define WILC_SUCCESS 0 /** Generic success */
+#define WILC_SUCCESS 0 /** Generic success */
/* Negative numbers to indicate failures */
-#define WILC_FAIL -100 /** Generic Fail */
-#define WILC_BUSY -101 /** Busy with another operation*/
-#define WILC_INVALID_ARGUMENT -102 /** A given argument is invalid*/
-#define WILC_INVALID_STATE -103 /** An API request would violate the Driver state machine (i.e. to start PID while not camped)*/
-#define WILC_BUFFER_OVERFLOW -104 /** In copy operations if the copied data is larger than the allocated buffer*/
-#define WILC_NULL_PTR -105 /** null pointer is passed or used */
-#define WILC_EMPTY -107
-#define WILC_FULL -108
-#define WILC_TIMEOUT -109
-#define WILC_CANCELED -110 /** The required operation have been canceled by the user*/
-#define WILC_INVALID_FILE -112 /** The Loaded file is corruped or having an invalid format */
-#define WILC_NOT_FOUND -113 /** Cant find the file to load */
-#define WILC_NO_MEM -114
-#define WILC_UNSUPPORTED_VERSION -115
+#define WILC_FAIL -100 /** Generic Fail */
+#define WILC_BUSY -101 /** Busy with another operation*/
+#define WILC_INVALID_ARGUMENT -102 /** A given argument is invalid*/
+#define WILC_INVALID_STATE -103 /** An API request would violate the Driver state machine (i.e. to start PID while not camped)*/
+#define WILC_BUFFER_OVERFLOW -104 /** In copy operations if the copied data is larger than the allocated buffer*/
+#define WILC_NULL_PTR -105 /** null pointer is passed or used */
+#define WILC_EMPTY -107
+#define WILC_FULL -108
+#define WILC_TIMEOUT -109
+#define WILC_CANCELED -110 /** The required operation have been canceled by the user*/
+#define WILC_INVALID_FILE -112 /** The Loaded file is corruped or having an invalid format */
+#define WILC_NOT_FOUND -113 /** Cant find the file to load */
+#define WILC_NO_MEM -114
+#define WILC_UNSUPPORTED_VERSION -115
#define WILC_FILE_EOF -116
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] staging: wilc1000: align defines
2015-06-15 3:35 [PATCH] staging: wilc1000: align defines Chaehyun Lim
@ 2015-06-17 2:08 ` Chaehyun Lim
0 siblings, 0 replies; 2+ messages in thread
From: Chaehyun Lim @ 2015-06-17 2:08 UTC (permalink / raw)
To: kernel-janitors
Align some defines in linux_wlan_common.h
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/linux_wlan_common.h | 146 +++++++++++++++------------
1 file changed, 79 insertions(+), 67 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 541f19c..830d96a 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -22,25 +22,21 @@ enum debug_region {
COMP = 0xFFFFFFFF,
};
-#define GENERIC_DBG (1 << Generic_debug)
-#define HOSTAPD_DBG (1 << Hostapd_debug)
-#define HOSTINF_DBG (1 << Hostinf_debug)
-#define CORECONFIG_DBG (1 << Coreconfig_debug)
-#define CFG80211_DBG (1 << CFG80211_debug)
-#define INT_DBG (1 << Interrupt_debug)
-#define TX_DBG (1 << TX_debug)
-#define RX_DBG (1 << RX_debug)
-#define LOCK_DBG (1 << Lock_debug)
-#define TCP_ENH (1 << Tcp_enhance)
-
-
-/*Added by Amr - BugID_4720*/
-#define SPIN_DEBUG (1 << Spin_debug)
-
-#define INIT_DBG (1 << Init_debug)
-#define BUS_DBG (1 << Bus_debug)
-#define MEM_DBG (1 << Mem_debug)
-#define FIRM_DBG (1 << Firmware_debug)
+#define GENERIC_DBG (1 << Generic_debug)
+#define HOSTAPD_DBG (1 << Hostapd_debug)
+#define HOSTINF_DBG (1 << Hostinf_debug)
+#define CORECONFIG_DBG (1 << Coreconfig_debug)
+#define CFG80211_DBG (1 << CFG80211_debug)
+#define INT_DBG (1 << Interrupt_debug)
+#define TX_DBG (1 << TX_debug)
+#define RX_DBG (1 << RX_debug)
+#define LOCK_DBG (1 << Lock_debug)
+#define TCP_ENH (1 << Tcp_enhance)
+#define SPIN_DEBUG (1 << Spin_debug)
+#define INIT_DBG (1 << Init_debug)
+#define BUS_DBG (1 << Bus_debug)
+#define MEM_DBG (1 << Mem_debug)
+#define FIRM_DBG (1 << Firmware_debug)
#if defined (WILC_DEBUGFS)
extern int wilc_debugfs_init(void);
@@ -49,38 +45,45 @@ extern void wilc_debugfs_remove(void);
extern atomic_t REGION;
extern atomic_t DEBUG_LEVEL;
-#define DEBUG (1 << 0)
-#define INFO (1 << 1)
-#define WRN (1 << 2)
-#define ERR (1 << 3)
+#define DEBUG (1 << 0)
+#define INFO (1 << 1)
+#define WRN (1 << 2)
+#define ERR (1 << 3)
-#define PRINT_D(region, ...) do { \
- if ((atomic_read(&DEBUG_LEVEL) & DEBUG) && ((atomic_read(®ION)) & (region))) { \
+#define PRINT_D(region, ...) \
+ do { \
+ if ((atomic_read(&DEBUG_LEVEL) & DEBUG) && \
+ ((atomic_read(®ION)) & (region))) { \
printk("DBG [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } \
-} while (0)
-
-#define PRINT_INFO(region, ...) do { \
- if ((atomic_read(&DEBUG_LEVEL) & INFO) && ((atomic_read(®ION)) & (region))) { \
- printk("INFO [%s]", __FUNCTION__); \
- printk(__VA_ARGS__); \
- } \
-} while (0)
-
-#define PRINT_WRN(region, ...) do { \
- if ((atomic_read(&DEBUG_LEVEL) & WRN) && ((atomic_read(®ION)) & (region))) { \
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
+
+#define PRINT_INFO(region, ...) \
+ do { \
+ if ((atomic_read(&DEBUG_LEVEL) & INFO) && \
+ ((atomic_read(®ION)) & (region))) { \
+ printk("INFO [%s]", __FUNCTION__); \
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
+
+#define PRINT_WRN(region, ...) \
+ do { \
+ if ((atomic_read(&DEBUG_LEVEL) & WRN) && \
+ ((atomic_read(®ION)) & (region))) { \
printk("WRN [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } \
-} while (0)
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
-#define PRINT_ER(...) do { \
- if ((atomic_read(&DEBUG_LEVEL) & ERR)) { \
+#define PRINT_ER(...) \
+ do { \
+ if ((atomic_read(&DEBUG_LEVEL) & ERR)) { \
printk("ERR [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } \
-} while (0)
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
#else
@@ -89,27 +92,36 @@ extern atomic_t DEBUG_LEVEL;
#define DEBUG 1
#define INFO 0
#define WRN 0
-#define PRINT_D(region, ...) do { if (DEBUG = 1 && ((REGION)&(region))) { \
- printk("DBG [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } \
- } while (0)
-
-#define PRINT_INFO(region, ...) do { if (INFO = 1 && ((REGION)&(region))) { \
- printk("INFO [%s]", __FUNCTION__); \
- printk(__VA_ARGS__); \
- } \
- } while (0)
-
-#define PRINT_WRN(region, ...) do { if (WRN = 1 && ((REGION)&(region))) { \
- printk("WRN [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } \
- } while (0)
-
-#define PRINT_ER(...) do { printk("ERR [%s: %d]", __FUNCTION__, __LINE__); \
- printk(__VA_ARGS__); \
- } while (0)
+
+#define PRINT_D(region, ...) \
+ do { \
+ if (DEBUG = 1 && ((REGION)&(region))) { \
+ printk("DBG [%s: %d]", __FUNCTION__, __LINE__); \
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
+
+#define PRINT_INFO(region, ...) \
+ do { \
+ if (INFO = 1 && ((REGION)&(region))) { \
+ printk("INFO [%s]", __FUNCTION__); \
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
+
+#define PRINT_WRN(region, ...) \
+ do { \
+ if (WRN = 1 && ((REGION)&(region))) { \
+ printk("WRN [%s: %d]", __FUNCTION__, __LINE__); \
+ printk(__VA_ARGS__); \
+ } \
+ } while (0)
+
+#define PRINT_ER(...) \
+ do { \
+ printk("ERR [%s: %d]", __FUNCTION__, __LINE__); \
+ printk(__VA_ARGS__); \
+ } while (0)
#endif
#define FN_IN /* PRINT_D(">>> \n") */
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-17 2:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 3:35 [PATCH] staging: wilc1000: align defines Chaehyun Lim
2015-06-17 2:08 ` Chaehyun Lim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.