Commit 94b12302 authored by SeongJae Park's avatar SeongJae Park Committed by Greg Kroah-Hartman

staging: csr: csr_log.h: Fix coding style

Fix coding style for csr_log.h
Signed-off-by: default avatarSeongJae Park <sj38.park@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f28c4075
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
#define CSR_LOG_H__ #define CSR_LOG_H__
/***************************************************************************** /*****************************************************************************
(c) Cambridge Silicon Radio Limited 2010 (c) Cambridge Silicon Radio Limited 2010
All rights reserved and confidential information of CSR All rights reserved and confidential information of CSR
Refer to LICENSE.txt included with this source for details Refer to LICENSE.txt included with this source for details
on the license terms. on the license terms.
*****************************************************************************/ *****************************************************************************/
...@@ -77,34 +77,31 @@ u8 CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask level); ...@@ -77,34 +77,31 @@ u8 CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask level);
/* /*
* Logging stuff * Logging stuff
*/ */
#define CSR_LOG_STRINGIFY_REAL(a) #a #define CSR_LOG_STRINGIFY_REAL(a) (#a)
#define CSR_LOG_STRINGIFY(a) CSR_LOG_STRINGIFY_REAL(a) #define CSR_LOG_STRINGIFY(a) CSR_LOG_STRINGIFY_REAL(a)
#ifdef CSR_LOG_ASSERT_ENABLE #ifdef CSR_LOG_ASSERT_ENABLE
#define CSR_LOG_ASSERT(cond) \ #define CSR_LOG_ASSERT(cond) \
do { \ do { \
if (!(cond)) \ if (!(cond)) { \
{ \ char *panic_arg = "[" __FILE__ ":" CSR_LOG_STRINGIFY(__LINE__) "] - " CSR_LOG_STRINGIFY(cond); \
char *panic_arg = "[" __FILE__ ":" CSR_LOG_STRINGIFY(__LINE__) "] - " CSR_LOG_STRINGIFY(cond); \ CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, panic_arg); \
CsrPanic(CSR_TECH_FW, CSR_PANIC_FW_ASSERTION_FAIL, panic_arg); \ } \
} \ } while (0)
} while (0)
#else #else
#define CSR_LOG_ASSERT(cond) #define CSR_LOG_ASSERT(cond)
#endif #endif
typedef struct typedef struct {
{ u16 primitiveType;
u16 primitiveType; const char *primitiveName;
const char *primitiveName; CsrMsgConvMsgEntry *messageConv; /* Private - do not use */
CsrMsgConvMsgEntry *messageConv; /* Private - do not use */
} CsrLogPrimitiveInformation; } CsrLogPrimitiveInformation;
typedef struct typedef struct {
{ const char *techVer;
const char *techVer; u32 primitiveInfoCount;
u32 primitiveInfoCount; CsrLogPrimitiveInformation *primitiveInfo;
CsrLogPrimitiveInformation *primitiveInfo;
} CsrLogTechInformation; } CsrLogTechInformation;
/*---------------------------------*/ /*---------------------------------*/
...@@ -118,21 +115,19 @@ typedef u32 bitmask32_t; ...@@ -118,21 +115,19 @@ typedef u32 bitmask32_t;
#ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER #ifdef CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER
/* DEPRECATED - replaced by csr_log_text.h */ /* DEPRECATED - replaced by csr_log_text.h */
#define CSR_LOG_TEXT(text) \ #define CSR_LOG_TEXT(text) \
do { \ do { \
if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), CSR_LOG_LEVEL_TASK_TEXT)) \ if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), CSR_LOG_LEVEL_TASK_TEXT)) { \
{ \ CsrLogTaskText(text, __LINE__, __FILE__); \
CsrLogTaskText(text, __LINE__, __FILE__); \ } \
} \ } while (0)
} while (0)
#else #else
/* DEPRECATED - replaced by csr_log_text.h */ /* DEPRECATED - replaced by csr_log_text.h */
#define CSR_LOG_TEXT(text) \ #define CSR_LOG_TEXT(text) \
do { \ do { \
if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), CSR_LOG_LEVEL_TASK_TEXT)) \ if (!CsrLogTaskIsFiltered(CsrSchedTaskQueueGet(), CSR_LOG_LEVEL_TASK_TEXT)) { \
{ \ CsrLogTaskText(text, 0, NULL); \
CsrLogTaskText(text, 0, NULL); \ } \
} \ } while (0)
} while (0)
#endif #endif
#else #else
#define CSR_LOG_TEXT(text) #define CSR_LOG_TEXT(text)
...@@ -140,8 +135,8 @@ typedef u32 bitmask32_t; ...@@ -140,8 +135,8 @@ typedef u32 bitmask32_t;
/* DEPRECATED - replaced by csr_log_text.h */ /* DEPRECATED - replaced by csr_log_text.h */
void CsrLogTaskText(const char *text, void CsrLogTaskText(const char *text,
u32 line, u32 line,
const char *file); const char *file);
#define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME (0x001) #define CSR_LOG_STATE_TRANSITION_MASK_FSM_NAME (0x001)
#define CSR_LOG_STATE_TRANSITION_MASK_NEXT_STATE (0x002) #define CSR_LOG_STATE_TRANSITION_MASK_NEXT_STATE (0x002)
...@@ -153,16 +148,16 @@ void CsrLogTaskText(const char *text, ...@@ -153,16 +148,16 @@ void CsrLogTaskText(const char *text,
/* DEPRECATED - replaced by csr_log_text.h */ /* DEPRECATED - replaced by csr_log_text.h */
void CsrLogStateTransition(bitmask16_t mask, void CsrLogStateTransition(bitmask16_t mask,
u32 identifier, u32 identifier,
const char *fsm_name, const char *fsm_name,
u32 prev_state, u32 prev_state,
const char *prev_state_str, const char *prev_state_str,
u32 in_event, u32 in_event,
const char *in_event_str, const char *in_event_str,
u32 next_state, u32 next_state,
const char *next_state_str, const char *next_state_str,
u32 line, u32 line,
const char *file); const char *file);
/*---------------------------------*/ /*---------------------------------*/
/* BSP logging */ /* BSP logging */
...@@ -183,64 +178,64 @@ void CsrLogDeactivate(CsrSchedQid tskid); ...@@ -183,64 +178,64 @@ void CsrLogDeactivate(CsrSchedQid tskid);
#define SYNERGY_SERIALIZER_TYPE_SER (0x001) #define SYNERGY_SERIALIZER_TYPE_SER (0x001)
void CsrLogMessagePut(u32 line, void CsrLogMessagePut(u32 line,
const char *file, const char *file,
CsrSchedQid src_task_id, CsrSchedQid src_task_id,
CsrSchedQid dst_taskid, CsrSchedQid dst_taskid,
CsrSchedMsgId msg_id, CsrSchedMsgId msg_id,
u16 prim_type, u16 prim_type,
const void *msg); const void *msg);
void CsrLogMessageGet(CsrSchedQid src_task_id, void CsrLogMessageGet(CsrSchedQid src_task_id,
CsrSchedQid dst_taskid, CsrSchedQid dst_taskid,
u8 get_res, u8 get_res,
CsrSchedMsgId msg_id, CsrSchedMsgId msg_id,
u16 prim_type, u16 prim_type,
const void *msg); const void *msg);
void CsrLogTimedEventIn(u32 line, void CsrLogTimedEventIn(u32 line,
const char *file, const char *file,
CsrSchedQid task_id, CsrSchedQid task_id,
CsrSchedTid tid, CsrSchedTid tid,
u32 requested_delay, u32 requested_delay,
u16 fniarg, u16 fniarg,
const void *fnvarg); const void *fnvarg);
void CsrLogTimedEventFire(CsrSchedQid task_id, void CsrLogTimedEventFire(CsrSchedQid task_id,
CsrSchedTid tid); CsrSchedTid tid);
void CsrLogTimedEventDone(CsrSchedQid task_id, void CsrLogTimedEventDone(CsrSchedQid task_id,
CsrSchedTid tid); CsrSchedTid tid);
void CsrLogTimedEventCancel(u32 line, void CsrLogTimedEventCancel(u32 line,
const char *file, const char *file,
CsrSchedQid task_id, CsrSchedQid task_id,
CsrSchedTid tid, CsrSchedTid tid,
u8 cancel_res); u8 cancel_res);
void CsrLogBgintRegister(u8 thread_id, void CsrLogBgintRegister(u8 thread_id,
CsrSchedBgint irq, CsrSchedBgint irq,
const char *callback, const char *callback,
const void *ptr); const void *ptr);
void CsrLogBgintUnregister(CsrSchedBgint irq); void CsrLogBgintUnregister(CsrSchedBgint irq);
void CsrLogBgintSet(CsrSchedBgint irq); void CsrLogBgintSet(CsrSchedBgint irq);
void CsrLogBgintServiceStart(CsrSchedBgint irq); void CsrLogBgintServiceStart(CsrSchedBgint irq);
void CsrLogBgintServiceDone(CsrSchedBgint irq); void CsrLogBgintServiceDone(CsrSchedBgint irq);
void CsrLogExceptionStateEvent(u16 prim_type, void CsrLogExceptionStateEvent(u16 prim_type,
CsrPrim msg_type, CsrPrim msg_type,
u16 state, u16 state,
u32 line, u32 line,
const char *file); const char *file);
void CsrLogExceptionGeneral(u16 prim_type, void CsrLogExceptionGeneral(u16 prim_type,
u16 state, u16 state,
const char *text, const char *text,
u32 line, u32 line,
const char *file); const char *file);
void CsrLogExceptionWarning(u16 prim_type, void CsrLogExceptionWarning(u16 prim_type,
u16 state, u16 state,
const char *text, const char *text,
u32 line, u32 line,
const char *file); const char *file);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment