Commit 8c87f69a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: csr: remove CsrUint16 typedef



Use the in-kernel u16 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 163eb0d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ CsrResult CsrMutexUnlock(CsrMutexHandle *mutexHandle)
 *      void
 *
 *----------------------------------------------------------------------------*/
void CsrThreadSleep(CsrUint16 sleepTimeInMs)
void CsrThreadSleep(u16 sleepTimeInMs)
{
    unsigned long t;

+9 −9
Original line number Diff line number Diff line
@@ -27,13 +27,13 @@ extern "C" {
#define CSR_FE_RESULT_NO_MORE_THREADS   ((CsrResult) 0x0006)

/* Thread priorities */
#define CSR_THREAD_PRIORITY_HIGHEST     ((CsrUint16) 0)
#define CSR_THREAD_PRIORITY_HIGH        ((CsrUint16) 1)
#define CSR_THREAD_PRIORITY_NORMAL      ((CsrUint16) 2)
#define CSR_THREAD_PRIORITY_LOW         ((CsrUint16) 3)
#define CSR_THREAD_PRIORITY_LOWEST      ((CsrUint16) 4)
#define CSR_THREAD_PRIORITY_HIGHEST     ((u16) 0)
#define CSR_THREAD_PRIORITY_HIGH        ((u16) 1)
#define CSR_THREAD_PRIORITY_NORMAL      ((u16) 2)
#define CSR_THREAD_PRIORITY_LOW         ((u16) 3)
#define CSR_THREAD_PRIORITY_LOWEST      ((u16) 4)

#define CSR_EVENT_WAIT_INFINITE         ((CsrUint16) 0xFFFF)
#define CSR_EVENT_WAIT_INFINITE         ((u16) 0xFFFF)

/*----------------------------------------------------------------------------*
 *  NAME
@@ -66,7 +66,7 @@ CsrResult CsrEventCreate(CsrEventHandle *eventHandle);
 *          CSR_FE_RESULT_INVALID_POINTER      in case the eventBits pointer is invalid
 *
 *----------------------------------------------------------------------------*/
CsrResult CsrEventWait(CsrEventHandle *eventHandle, CsrUint16 timeoutInMs, CsrUint32 *eventBits);
CsrResult CsrEventWait(CsrEventHandle *eventHandle, u16 timeoutInMs, CsrUint32 *eventBits);

/*----------------------------------------------------------------------------*
 *  NAME
@@ -195,7 +195,7 @@ void CsrGlobalMutexUnlock(void);
 *
 *----------------------------------------------------------------------------*/
CsrResult CsrThreadCreate(void (*threadFunction)(void *pointer), void *pointer,
    CsrUint32 stackSize, CsrUint16 priority,
    CsrUint32 stackSize, u16 priority,
    const CsrCharString *threadName, CsrThreadHandle *threadHandle);

/*----------------------------------------------------------------------------*
@@ -240,7 +240,7 @@ CsrResult CsrThreadEqual(CsrThreadHandle *threadHandle1, CsrThreadHandle *thread
 *      void
 *
 *----------------------------------------------------------------------------*/
void CsrThreadSleep(CsrUint16 sleepTimeInMs);
void CsrThreadSleep(u16 sleepTimeInMs);

#ifndef CSR_PMEM_DEBUG_ENABLE
/*----------------------------------------------------------------------------*
+17 −17
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEvent
 *
 *----------------------------------------------------------------------------*/
CsrEvent *CsrEvent_struct(CsrUint16 primtype, CsrUint16 msgtype);
CsrEvent *CsrEvent_struct(u16 primtype, u16 msgtype);

typedef struct
{
@@ -46,12 +46,12 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint8
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint8 *CsrEventCsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, u8 value);
CsrEventCsrUint8 *CsrEventCsrUint8_struct(u16 primtype, u16 msgtype, u8 value);

typedef struct
{
    CsrPrim   type;
    CsrUint16 value;
    u16 value;
} CsrEventCsrUint16;

/*----------------------------------------------------------------------------*
@@ -62,12 +62,12 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint16
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint16 *CsrEventCsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value);
CsrEventCsrUint16 *CsrEventCsrUint16_struct(u16 primtype, u16 msgtype, u16 value);

typedef struct
{
    CsrPrim   type;
    CsrUint16 value1;
    u16 value1;
    u8  value2;
} CsrEventCsrUint16CsrUint8;

@@ -79,13 +79,13 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint8
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint16CsrUint8 *CsrEventCsrUint16CsrUint8_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, u8 value2);
CsrEventCsrUint16CsrUint8 *CsrEventCsrUint16CsrUint8_struct(u16 primtype, u16 msgtype, u16 value1, u8 value2);

typedef struct
{
    CsrPrim   type;
    CsrUint16 value1;
    CsrUint16 value2;
    u16 value1;
    u16 value2;
} CsrEventCsrUint16CsrUint16;

/*----------------------------------------------------------------------------*
@@ -96,12 +96,12 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrUint16
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint16CsrUint16 *CsrEventCsrUint16CsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrUint16 value2);
CsrEventCsrUint16CsrUint16 *CsrEventCsrUint16CsrUint16_struct(u16 primtype, u16 msgtype, u16 value1, u16 value2);

typedef struct
{
    CsrPrim   type;
    CsrUint16 value1;
    u16 value1;
    CsrUint32 value2;
} CsrEventCsrUint16CsrUint32;

@@ -113,12 +113,12 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint16
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrUint32 value2);
CsrEventCsrUint16CsrUint32 *CsrEventCsrUint16CsrUint32_struct(u16 primtype, u16 msgtype, u16 value1, CsrUint32 value2);

typedef struct
{
    CsrPrim        type;
    CsrUint16      value1;
    u16      value1;
    CsrCharString *value2;
} CsrEventCsrUint16CsrCharString;

@@ -130,7 +130,7 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint16CsrCharString
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint16 value1, CsrCharString *value2);
CsrEventCsrUint16CsrCharString *CsrEventCsrUint16CsrCharString_struct(u16 primtype, u16 msgtype, u16 value1, CsrCharString *value2);

typedef struct
{
@@ -146,13 +146,13 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint32
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint32 *CsrEventCsrUint32_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value);
CsrEventCsrUint32 *CsrEventCsrUint32_struct(u16 primtype, u16 msgtype, CsrUint32 value);

typedef struct
{
    CsrPrim   type;
    CsrUint32 value1;
    CsrUint16 value2;
    u16 value2;
} CsrEventCsrUint32CsrUint16;

/*----------------------------------------------------------------------------*
@@ -163,7 +163,7 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint32CsrUint16
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value1, CsrUint32 value2);
CsrEventCsrUint32CsrUint16 *CsrEventCsrUint32CsrUint16_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrUint32 value2);

typedef struct
{
@@ -180,7 +180,7 @@ typedef struct
 *      Allocates and fills in a message with the signature CsrEventCsrUint32CsrCharString
 *
 *----------------------------------------------------------------------------*/
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(CsrUint16 primtype, CsrUint16 msgtype, CsrUint32 value1, CsrCharString *value2);
CsrEventCsrUint32CsrCharString *CsrEventCsrUint32CsrCharString_struct(u16 primtype, u16 msgtype, CsrUint32 value1, CsrCharString *value2);

#ifdef __cplusplus
}
+12 −12
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ CsrBool CsrLogTaskIsFiltered(CsrSchedQid taskId, CsrLogLevelTask level);

typedef struct
{
    CsrUint16            primitiveType;
    u16            primitiveType;
    const CsrCharString *primitiveName;
    CsrMsgConvMsgEntry  *messageConv; /* Private - do not use */
} CsrLogPrimitiveInformation;
@@ -112,7 +112,7 @@ typedef struct
/*  Tech logging */
/*---------------------------------*/
typedef u8 bitmask8_t;
typedef CsrUint16 bitmask16_t;
typedef u16 bitmask16_t;
typedef CsrUint32 bitmask32_t;

#ifdef CSR_LOG_ENABLE
@@ -175,7 +175,7 @@ void CsrLogSchedStart(u8 thread_id);
void CsrLogSchedStop(u8 thread_id);

void CsrLogInitTask(u8 thread_id, CsrSchedQid tskid, const CsrCharString *tskName);
void CsrLogDeinitTask(CsrUint16 task_id);
void CsrLogDeinitTask(u16 task_id);

void CsrLogActivate(CsrSchedQid tskid);
void CsrLogDeactivate(CsrSchedQid tskid);
@@ -188,14 +188,14 @@ void CsrLogMessagePut(CsrUint32 line,
    CsrSchedQid src_task_id,
    CsrSchedQid dst_taskid,
    CsrSchedMsgId msg_id,
    CsrUint16 prim_type,
    u16 prim_type,
    const void *msg);

void CsrLogMessageGet(CsrSchedQid src_task_id,
    CsrSchedQid dst_taskid,
    CsrBool get_res,
    CsrSchedMsgId msg_id,
    CsrUint16 prim_type,
    u16 prim_type,
    const void *msg);

void CsrLogTimedEventIn(CsrUint32 line,
@@ -203,7 +203,7 @@ void CsrLogTimedEventIn(CsrUint32 line,
    CsrSchedQid task_id,
    CsrSchedTid tid,
    CsrTime requested_delay,
    CsrUint16 fniarg,
    u16 fniarg,
    const void *fnvarg);

void CsrLogTimedEventFire(CsrSchedQid task_id,
@@ -227,18 +227,18 @@ void CsrLogBgintSet(CsrSchedBgint irq);
void CsrLogBgintServiceStart(CsrSchedBgint irq);
void CsrLogBgintServiceDone(CsrSchedBgint irq);

void CsrLogExceptionStateEvent(CsrUint16 prim_type,
void CsrLogExceptionStateEvent(u16 prim_type,
    CsrPrim msg_type,
    CsrUint16 state,
    u16 state,
    CsrUint32 line,
    const CsrCharString *file);
void CsrLogExceptionGeneral(CsrUint16 prim_type,
    CsrUint16 state,
void CsrLogExceptionGeneral(u16 prim_type,
    u16 state,
    const CsrCharString *text,
    CsrUint32 line,
    const CsrCharString *file);
void CsrLogExceptionWarning(CsrUint16 prim_type,
    CsrUint16 state,
void CsrLogExceptionWarning(u16 prim_type,
    u16 state,
    const CsrCharString *text,
    CsrUint32 line,
    const CsrCharString *file);
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ typedef CsrUint32 CsrLogLevelText;
#define CSR_LOG_LEVEL_TEXT_ALL       ((CsrLogLevelText) 0xFFFF)

/* The log text interface is used by both scheduler tasks and components outside the scheduler context.
 * Therefore a CsrLogTextTaskId is introduced. It is effectively considered as two CsrUint16's. The lower
 * Therefore a CsrLogTextTaskId is introduced. It is effectively considered as two u16's. The lower
 * 16 bits corresponds one2one with the scheduler queueId's (CsrSchedQid) and as such these bits can not be used
 * by components outside scheduler tasks. The upper 16 bits are allocated for use of components outside the
 * scheduler like drivers etc. Components in this range is defined independently by each technology. To avoid
@@ -78,7 +78,7 @@ void CsrLogLevelTextSetTask(CsrLogTextTaskId taskId, CsrLogLevelText warningLeve
/* Set the text logging level for a given tasks subOrigin */
/* This function can be used as a complement to CsrLogLevelTextSetAll() and CsrLogLevelTextSetTask() to add more _or_ less log from a given
 * subOrigin within a task than what is set generally with CsrLogLevelTextSetAll() _or_ CsrLogLevelTextSetTask(). */
void CsrLogLevelTextSetTaskSubOrigin(CsrLogTextTaskId taskId, CsrUint16 subOrigin, CsrLogLevelText warningLevelMask);
void CsrLogLevelTextSetTaskSubOrigin(CsrLogTextTaskId taskId, u16 subOrigin, CsrLogLevelText warningLevelMask);

/*******************************************************************************

Loading