Skip to content

Commit

Permalink
Staging: epl: remove MEM
Browse files Browse the repository at this point in the history
It's not used and is not needed.

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Apr 3, 2009
1 parent 5318487 commit 5e9f6bc
Show file tree
Hide file tree
Showing 17 changed files with 151 additions and 174 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/epl/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,13 @@
extern "C" {
#endif

void DumpData(char *szStr_p, BYTE MEM * pbData_p, WORD wSize_p);
void DumpData(char *szStr_p, BYTE *pbData_p, WORD wSize_p);

#ifdef __cplusplus
} // von extern "C"
#endif
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \
DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz));
DumpData (str, (BYTE *)(ptr), (WORD)(siz));
#else

#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/epl/Epl.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ tEplKernel EplApiWriteLocalObject(unsigned int uiIndex_p,
void *pSrcData_p,
unsigned int uiSize_p);

tEplKernel EplApiCbObdAccess(tEplObdCbParam MEM *pParam_p);
tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p);

tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
void *pVar_p,
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/epl/EplApiGeneric.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static tEplKernel EplApiCbLedStateChange(tEplLedType LedType_p, BOOL fOn_p);
#endif

// OD initialization function (implemented in Objdict.c)
tEplKernel EplObdInitRam(tEplObdInitParam MEM *pInitParam_p);
tEplKernel EplObdInitRam(tEplObdInitParam *pInitParam_p);

//=========================================================================//
// //
Expand Down Expand Up @@ -558,7 +558,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
{
BYTE bVarEntries;
BYTE bIndexEntries;
BYTE MEM *pbData;
BYTE *pbData;
unsigned int uiSubindex;
tEplVarParam VarParam;
tEplObdSize EntrySize;
Expand All @@ -574,7 +574,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
goto Exit;
}

pbData = (BYTE MEM *) pVar_p;
pbData = (BYTE *)pVar_p;
bVarEntries = (BYTE) * puiVarEntries_p;
UsedSize = 0;

Expand Down Expand Up @@ -962,7 +962,7 @@ tEplKernel EplApiMnTriggerStateChange(unsigned int uiNodeId_p,
//
//---------------------------------------------------------------------------

tEplKernel EplApiCbObdAccess(tEplObdCbParam MEM *pParam_p)
tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p)
{
tEplKernel Ret = kEplSuccessful;

Expand Down
34 changes: 16 additions & 18 deletions drivers/staging/epl/EplInstDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ typedef enum {

//------------------------------------------------------------------------------------------

typedef void MEM *tEplPtrInstance;
typedef void *tEplPtrInstance;
typedef BYTE tEplInstanceHdl;

// define const for illegale values
Expand All @@ -99,7 +99,6 @@ typedef BYTE tEplInstanceHdl;
//--------------------------------------------------------------------------------------

// memory attributes for instance table
#define INST_FAR // variables wich have to located in xdata
#define STATIC // prevent warnings for variables with same name

#define INSTANCE_TYPE_BEGIN typedef struct {
Expand All @@ -116,12 +115,12 @@ typedef BYTE tEplInstanceHdl;
#define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle,

// macros for declaration of pointer to instance handle within function header or prototype of API functions
#define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle
#define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle,
#define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl *pInstanceHandle
#define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl *pInstanceHandle,

// macros for declaration instance as lokacl variable within functions
#define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance;
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle;
#define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo *pInstance;
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl *pInstanceHandle;

// reference:

Expand Down Expand Up @@ -162,10 +161,10 @@ typedef BYTE tEplInstanceHdl;
//--------------------------------------------------------------------------------------

// macros for declaration within the function header, prototype or local var list
// Declaration of pointers within function paramater list must defined as void MEM*
// Declaration of pointers within function paramater list must defined as void *
// pointer.
#define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance
#define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance,
#define EPL_MCO_DECL_INSTANCE_PTR void *pInstance
#define EPL_MCO_DECL_INSTANCE_PTR_ void *pInstance,
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance;

// macros for reference of pointer to instance
Expand All @@ -190,8 +189,8 @@ typedef BYTE tEplInstanceHdl;
ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed);

// macros for declaration of pointer to instance pointer
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr,
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void **pInstancePtr
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void **pInstancePtr,

// macros for reference of pointer to instance pointer
// These macros are used for parameter passing to called function.
Expand All @@ -211,9 +210,9 @@ typedef BYTE tEplInstanceHdl;
// this macro deletes all instance entries as unused
#define EPL_MCO_DELETE_INSTANCE_TABLE() \
{ \
tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \
tFastByte InstNumber = 0; \
tFastByte i = EPL_MAX_INSTANCES; \
tEplInstanceInfo * pInstance = &aEplInstanceTable_g[0]; \
tFastByte InstNumber = 0; \
tFastByte i = EPL_MAX_INSTANCES; \
do { \
pInstance->m_InstState = (BYTE) kStateUnused; \
pInstance->m_bInstIndex = (BYTE) InstNumber; \
Expand All @@ -229,8 +228,8 @@ typedef BYTE tEplInstanceHdl;
static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \
return &aEplInstanceTable_g[InstHandle_p]; } \
static tEplPtrInstance GetFreeInstance (void) { \
tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \
tFastByte i = EPL_MAX_INSTANCES; \
tEplInstanceInfo *pInstance = &aEplInstanceTable_g[0]; \
tFastByte i = EPL_MAX_INSTANCES; \
do { if (pInstance->m_InstState != kStateUsed) { \
return (tEplPtrInstance) pInstance; } \
pInstance++; i--; } \
Expand All @@ -239,7 +238,7 @@ typedef BYTE tEplInstanceHdl;

// this macro defines the instance table. Each entry is reserved for an instance of CANopen.
#define EPL_MCO_DECL_INSTANCE_VAR() \
static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES];
static tEplInstanceInfo aEplInstanceTable_g [EPL_MAX_INSTANCES];

// this macro defines member variables in instance table which are needed in
// all modules of Epl stack
Expand All @@ -253,7 +252,6 @@ typedef BYTE tEplInstanceHdl;
#else // only one instance is used

// Memory attributes for instance table.
#define INST_FAR MEM // variables wich have to located in xdata
#define STATIC static // prevent warnings for variables with same name

#define INSTANCE_TYPE_BEGIN
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/epl/EplNmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
// struct for instance table
INSTANCE_TYPE_BEGIN EPL_MCO_DECL_INSTANCE_MEMBER()

STATIC volatile tEplNmtState INST_FAR m_NmtState;
STATIC volatile BOOL INST_FAR m_fEnableReadyToOperate;
STATIC volatile BOOL INST_FAR m_fAppReadyToOperate;
STATIC volatile BOOL INST_FAR m_fTimerMsPreOp2;
STATIC volatile BOOL INST_FAR m_fAllMandatoryCNIdent;
STATIC volatile BOOL INST_FAR m_fFrozen;
STATIC volatile tEplNmtState m_NmtState;
STATIC volatile BOOL m_fEnableReadyToOperate;
STATIC volatile BOOL m_fAppReadyToOperate;
STATIC volatile BOOL m_fTimerMsPreOp2;
STATIC volatile BOOL m_fAllMandatoryCNIdent;
STATIC volatile BOOL m_fFrozen;

INSTANCE_TYPE_END
//---------------------------------------------------------------------------
Expand All @@ -121,7 +121,7 @@ INSTANCE_TYPE_END
// This macro replace the unspecific pointer to an instance through
// the modul specific type for the local instance table. This macro
// must defined in each modul.
//#define tEplPtrInstance tEplInstanceInfo MEM*
//#define tEplPtrInstance tEplInstanceInfo*
EPL_MCO_DECL_INSTANCE_VAR()
//---------------------------------------------------------------------------
// local function prototypes
Expand Down
Loading

0 comments on commit 5e9f6bc

Please sign in to comment.