From: Greg Kroah-Hartman Date: Mon, 23 Mar 2009 19:09:26 +0000 (-0700) Subject: Staging: epl: remove MEM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e9f6bc67d44c7b73208d4038b8a637ff942ca52;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Staging: epl: remove MEM It's not used and is not needed. Cc: Daniel Krueger Cc: Ronald Sieber Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/epl/Debug.h b/drivers/staging/epl/Debug.h index 35f784c82d22..68fe3c4b9f51 100644 --- a/drivers/staging/epl/Debug.h +++ b/drivers/staging/epl/Debug.h @@ -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) diff --git a/drivers/staging/epl/Epl.h b/drivers/staging/epl/Epl.h index cfcb067f34ff..454b2ba6ad3e 100644 --- a/drivers/staging/epl/Epl.h +++ b/drivers/staging/epl/Epl.h @@ -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, diff --git a/drivers/staging/epl/EplApiGeneric.c b/drivers/staging/epl/EplApiGeneric.c index 58286fccfc20..7a52267aca0c 100644 --- a/drivers/staging/epl/EplApiGeneric.c +++ b/drivers/staging/epl/EplApiGeneric.c @@ -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); //=========================================================================// // // @@ -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; @@ -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; @@ -962,7 +962,7 @@ tEplKernel EplApiMnTriggerStateChange(unsigned int uiNodeId_p, // //--------------------------------------------------------------------------- -tEplKernel EplApiCbObdAccess(tEplObdCbParam MEM *pParam_p) +tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p) { tEplKernel Ret = kEplSuccessful; diff --git a/drivers/staging/epl/EplInstDef.h b/drivers/staging/epl/EplInstDef.h index 31406662b3c2..5b7be34c14b8 100644 --- a/drivers/staging/epl/EplInstDef.h +++ b/drivers/staging/epl/EplInstDef.h @@ -83,7 +83,7 @@ typedef enum { //------------------------------------------------------------------------------------------ -typedef void MEM *tEplPtrInstance; +typedef void *tEplPtrInstance; typedef BYTE tEplInstanceHdl; // define const for illegale values @@ -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 { @@ -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: @@ -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 @@ -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. @@ -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; \ @@ -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--; } \ @@ -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 @@ -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 diff --git a/drivers/staging/epl/EplNmtk.c b/drivers/staging/epl/EplNmtk.c index ad85d8e8511e..51df9e68ac27 100644 --- a/drivers/staging/epl/EplNmtk.c +++ b/drivers/staging/epl/EplNmtk.c @@ -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 //--------------------------------------------------------------------------- @@ -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 diff --git a/drivers/staging/epl/EplObd.c b/drivers/staging/epl/EplObd.c index 7485c82d7c45..6d53e1ca83bc 100644 --- a/drivers/staging/epl/EplObd.c +++ b/drivers/staging/epl/EplObd.c @@ -101,7 +101,7 @@ // struct for instance table INSTANCE_TYPE_BEGIN EPL_MCO_DECL_INSTANCE_MEMBER() -STATIC tEplObdInitParam INST_FAR m_ObdInitParam; +STATIC tEplObdInitParam m_ObdInitParam; STATIC tEplObdStoreLoadObjCallback m_fpStoreLoadObjCallback; INSTANCE_TYPE_END @@ -119,11 +119,11 @@ typedef union { // 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() -BYTE MEM abEplObdTrashObject_g[8]; +BYTE abEplObdTrashObject_g[8]; //--------------------------------------------------------------------------- // local function prototypes @@ -133,7 +133,7 @@ EPL_MCO_DEFINE_INSTANCE_FCT() static tEplKernel EplObdCallObjectCallback(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdCallback fpCallback_p, - tEplObdCbParam MEM * pCbParam_p); + tEplObdCbParam *pCbParam_p); static tEplObdSize EplObdGetDataSizeIntern(tEplObdSubEntryPtr pSubIndexEntry_p); @@ -146,7 +146,7 @@ static tEplKernel EplObdCheckObjectRange(tEplObdSubEntryPtr pSubindexEntry_p, #endif static tEplKernel EplObdGetVarEntry(tEplObdSubEntryPtr pSubindexEntry_p, - tEplObdVarEntry MEM ** ppVarEntry_p); + tEplObdVarEntry **ppVarEntry_p); static tEplKernel EplObdGetEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, @@ -156,7 +156,7 @@ static tEplKernel EplObdGetEntry(EPL_MCO_DECL_INSTANCE_PTR_ static tEplObdSize EplObdGetObjectSize(tEplObdSubEntryPtr pSubIndexEntry_p); -static tEplKernel EplObdGetIndexIntern(tEplObdInitParam MEM * pInitParam_p, +static tEplKernel EplObdGetIndexIntern(tEplObdInitParam *pInitParam_p, unsigned int uiIndex_p, tEplObdEntryPtr * ppObdEntry_p); @@ -170,17 +170,15 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdDir Direction_p); static void *EplObdGetObjectDefaultPtr(tEplObdSubEntryPtr pSubIndexEntry_p); -static void MEM *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p); +static void *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p); #if (EPL_OBD_USE_STORE_RESTORE != FALSE) -static tEplKernel EplObdCallStoreCallback(EPL_MCO_DECL_INSTANCE_PTR_ - tEplObdCbStoreParam MEM * - pCbStoreParam_p); +static tEplKernel EplObdCallStoreCallback(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdCbStoreParam *pCbStoreParam_p); #endif // (EPL_OBD_USE_STORE_RESTORE != FALSE) -static void EplObdCopyObjectData(void MEM * pDstData_p, +static void EplObdCopyObjectData(void *pDstData_p, void *pSrcData_p, tEplObdSize ObjSize_p, tEplObdType ObjType_p); @@ -196,12 +194,12 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui tEplObdSize Size_p, tEplObdEntryPtr *ppObdEntry_p, tEplObdSubEntryPtr *ppSubEntry_p, - tEplObdCbParam MEM *pCbParam_p, + tEplObdCbParam *pCbParam_p, tEplObdSize *pObdSize_p); static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPtr pObdEntry_p, tEplObdSubEntryPtr pSubEntry_p, - tEplObdCbParam MEM *pCbParam_p, + tEplObdCbParam *pCbParam_p, void *pSrcData_p, void *pDstData_p, tEplObdSize ObdSize_p); @@ -226,7 +224,7 @@ static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPt // //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdInit(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam MEM *pInitParam_p) +EPLDLLEXPORT tEplKernel EplObdInit(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam *pInitParam_p) { tEplKernel Ret; @@ -258,7 +256,7 @@ EPLDLLEXPORT tEplKernel EplObdInit(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitPar // //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdAddInstance(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam MEM *pInitParam_p) +EPLDLLEXPORT tEplKernel EplObdAddInstance(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam *pInitParam_p) { EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplKernel Ret; @@ -345,8 +343,8 @@ EPLDLLEXPORT tEplKernel EplObdWriteEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int tEplKernel Ret; tEplObdEntryPtr pObdEntry; tEplObdSubEntryPtr pSubEntry; - tEplObdCbParam MEM CbParam; - void MEM *pDstData; + tEplObdCbParam CbParam; + void *pDstData; tEplObdSize ObdSize; Ret = EplObdWriteEntryPre(EPL_MCO_INSTANCE_PTR_ @@ -405,7 +403,7 @@ EPLDLLEXPORT tEplKernel EplObdReadEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int tEplKernel Ret; tEplObdEntryPtr pObdEntry; tEplObdSubEntryPtr pSubEntry; - tEplObdCbParam MEM CbParam; + tEplObdCbParam CbParam; void *pSrcData; tEplObdSize ObdSize; @@ -579,11 +577,11 @@ EPLDLLEXPORT tEplKernel EplObdAccessOdPart(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdPar // //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdDefineVar(EPL_MCO_DECL_INSTANCE_PTR_ tEplVarParam MEM *pVarParam_p) +EPLDLLEXPORT tEplKernel EplObdDefineVar(EPL_MCO_DECL_INSTANCE_PTR_ tEplVarParam *pVarParam_p) { tEplKernel Ret; - tEplObdVarEntry MEM *pVarEntry; + tEplObdVarEntry *pVarEntry; tEplVarParamValid VarValid; tEplObdSubEntryPtr pSubindexEntry; @@ -738,7 +736,7 @@ EPLDLLEXPORT tEplKernel EplObdRegisterUserOd(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdE // //--------------------------------------------------------------------------- -EPLDLLEXPORT void EplObdInitVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdVarEntry MEM *pVarEntry_p, +EPLDLLEXPORT void EplObdInitVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdVarEntry *pVarEntry_p, tEplObdType Type_p, tEplObdSize ObdSize_p) { /* @@ -1010,7 +1008,7 @@ EPLDLLEXPORT tEplKernel EplObdReadEntryToLe(EPL_MCO_DECL_INSTANCE_PTR_ unsigned tEplKernel Ret; tEplObdEntryPtr pObdEntry; tEplObdSubEntryPtr pSubEntry; - tEplObdCbParam MEM CbParam; + tEplObdCbParam CbParam; void *pSrcData; tEplObdSize ObdSize; @@ -1190,8 +1188,8 @@ EPLDLLEXPORT tEplKernel EplObdWriteEntryFromLe(EPL_MCO_DECL_INSTANCE_PTR_ unsign tEplKernel Ret; tEplObdEntryPtr pObdEntry; tEplObdSubEntryPtr pSubEntry; - tEplObdCbParam MEM CbParam; - void MEM *pDstData; + tEplObdCbParam CbParam; + void *pDstData; tEplObdSize ObdSize; QWORD qwBuffer; void *pBuffer = &qwBuffer; @@ -1371,7 +1369,7 @@ EPLDLLEXPORT tEplKernel EplObdGetAccessType(EPL_MCO_DECL_INSTANCE_PTR_ unsigned tEplKernel EplObdSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM **ppVarEntry_p) + tEplObdVarEntry **ppVarEntry_p) { tEplKernel Ret; @@ -1415,11 +1413,11 @@ EPL_MCO_DECL_INSTANCE_FCT() //--------------------------------------------------------------------------- static tEplKernel EplObdCallObjectCallback(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdCallback fpCallback_p, - tEplObdCbParam MEM * pCbParam_p) + tEplObdCbParam *pCbParam_p) { tEplKernel Ret; - tEplObdCallback MEM fpCallback; + tEplObdCallback fpCallback; // check for all API function if instance is valid EPL_MCO_CHECK_INSTANCE_STATE(); @@ -1461,7 +1459,7 @@ static tEplObdSize EplObdGetDataSizeIntern(tEplObdSubEntryPtr pSubIndexEntry_p) { tEplObdSize DataSize; - void MEM *pData; + void *pData; // If OD entry is defined by macro EPL_OBD_SUBINDEX_ROM_VSTRING // then the current pointer is always NULL. The function @@ -1470,8 +1468,7 @@ static tEplObdSize EplObdGetDataSizeIntern(tEplObdSubEntryPtr pSubIndexEntry_p) if (pSubIndexEntry_p->m_Type == kEplObdTypVString) { // The pointer to current value can be received from EplObdGetObjectCurrentPtr() - pData = - ((void MEM *)EplObdGetObjectCurrentPtr(pSubIndexEntry_p)); + pData = ((void *)EplObdGetObjectCurrentPtr(pSubIndexEntry_p)); if (pData != NULL) { DataSize = EplObdGetStrLen((void *)pData, DataSize, @@ -1857,7 +1854,7 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui tEplObdSize Size_p, tEplObdEntryPtr *ppObdEntry_p, tEplObdSubEntryPtr *ppSubEntry_p, - tEplObdCbParam MEM *pCbParam_p, + tEplObdCbParam *pCbParam_p, tEplObdSize *pObdSize_p) { @@ -1865,13 +1862,13 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui tEplObdEntryPtr pObdEntry; tEplObdSubEntryPtr pSubEntry; tEplObdAccess Access; - void MEM *pDstData; + void *pDstData; tEplObdSize ObdSize; BOOL fEntryNumerical; #if (EPL_OBD_USE_STRING_DOMAIN_IN_RAM != FALSE) - tEplObdVStringDomain MEM MemVStringDomain; - void MEM *pCurrData; + tEplObdVStringDomain MemVStringDomain; + void *pCurrData; #endif // check for all API function if instance is valid @@ -1887,7 +1884,7 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui goto Exit; } // get pointer to object data - pDstData = (void MEM *)EplObdGetObjectDataPtrIntern(pSubEntry); + pDstData = (void *)EplObdGetObjectDataPtrIntern(pSubEntry); Access = (tEplObdAccess) pSubEntry->m_Access; @@ -1912,7 +1909,7 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui // adapted by user callback function, re-read // this values. ObdSize = EplObdGetObjectSize(pSubEntry); - pDstData = (void MEM *)EplObdGetObjectDataPtrIntern(pSubEntry); + pDstData = (void *)EplObdGetObjectDataPtrIntern(pSubEntry); // 09-dec-2004 r.d.: // Function EplObdWriteEntry() calls new event kEplObdEvWrStringDomain @@ -1946,23 +1943,19 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui pCurrData = pSubEntry->m_pCurrent; if ((pSubEntry->m_Type == kEplObdTypVString) || (pSubEntry->m_Type == kEplObdTypOString)) { - ((tEplObdVString MEM *) pCurrData)->m_Size = - MemVStringDomain.m_ObjSize; - ((tEplObdVString MEM *) pCurrData)->m_pString = - MemVStringDomain.m_pData; + ((tEplObdVString *)pCurrData)->m_Size = MemVStringDomain.m_ObjSize; + ((tEplObdVString *)pCurrData)->m_pString = MemVStringDomain.m_pData; } else // if (pSdosTableEntry_p->m_bObjType == kEplObdTypDomain) { - ((tEplObdVarEntry MEM *) pCurrData)->m_Size = - MemVStringDomain.m_ObjSize; - ((tEplObdVarEntry MEM *) pCurrData)->m_pData = - (void MEM *)MemVStringDomain.m_pData; + ((tEplObdVarEntry *)pCurrData)->m_Size = MemVStringDomain.m_ObjSize; + ((tEplObdVarEntry *)pCurrData)->m_pData = (void *)MemVStringDomain.m_pData; } // Because object size and object pointer are // adapted by user callback function, re-read // this values. ObdSize = MemVStringDomain.m_ObjSize; - pDstData = (void MEM *)MemVStringDomain.m_pData; + pDstData = (void *)MemVStringDomain.m_pData; } #endif //#if (OBD_USE_STRING_DOMAIN_IN_RAM != FALSE) @@ -1983,7 +1976,7 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui } if (pSubEntry->m_Type == kEplObdTypVString) { - if (((char MEM *)pSrcData_p)[Size_p - 1] == '\0') { // last byte of source string contains null character + if (((char *)pSrcData_p)[Size_p - 1] == '\0') { // last byte of source string contains null character // reserve one byte in destination for 0-termination Size_p -= 1; @@ -2045,7 +2038,7 @@ static tEplKernel EplObdWriteEntryPre(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int ui static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPtr pObdEntry_p, tEplObdSubEntryPtr pSubEntry_p, - tEplObdCbParam MEM *pCbParam_p, + tEplObdCbParam *pCbParam_p, void *pSrcData_p, void *pDstData_p, tEplObdSize ObdSize_p) @@ -2081,7 +2074,7 @@ static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPt // terminate string with 0 if (pSubEntry_p->m_Type == kEplObdTypVString) { - ((char MEM *)pDstData_p)[ObdSize_p] = '\0'; + ((char *)pDstData_p)[ObdSize_p] = '\0'; } // write address of destination to structure of callback parameters // so callback function can change data subsequently @@ -2170,8 +2163,8 @@ static tEplObdSize EplObdGetObjectSize(tEplObdSubEntryPtr pSubIndexEntry_p) case kEplObdTypDomain: pData = (void *)pSubIndexEntry_p->m_pCurrent; - if ((void MEM *)pData != (void MEM *)NULL) { - DataSize = ((tEplObdVarEntry MEM *) pData)->m_Size; + if ((void *)pData != (void *)NULL) { + DataSize = ((tEplObdVarEntry *) pData)->m_Size; } break; @@ -2183,11 +2176,11 @@ static tEplObdSize EplObdGetObjectSize(tEplObdSubEntryPtr pSubIndexEntry_p) // then the current pointer is always NULL. The function // returns the length of default string. pData = (void *)pSubIndexEntry_p->m_pCurrent; - if ((void MEM *)pData != (void MEM *)NULL) { + if ((void *)pData != (void *)NULL) { // The max. size of strings defined by STRING-Macro is stored in // tEplObdVString of current value. // (types tEplObdVString, tEplObdOString and tEplObdUString has the same members) - DataSize = ((tEplObdVString MEM *) pData)->m_Size; + DataSize = ((tEplObdVString *) pData)->m_Size; } else { // The current position is not decleared. The string // is located in ROM, therefor use default pointer. @@ -2207,11 +2200,11 @@ static tEplObdSize EplObdGetObjectSize(tEplObdSubEntryPtr pSubIndexEntry_p) case kEplObdTypOString: pData = (void *)pSubIndexEntry_p->m_pCurrent; - if ((void MEM *)pData != (void MEM *)NULL) { + if ((void *)pData != (void *)NULL) { // The max. size of strings defined by STRING-Macro is stored in // tEplObdVString of current value. // (types tEplObdVString, tEplObdOString and tEplObdUString has the same members) - DataSize = ((tEplObdOString MEM *) pData)->m_Size; + DataSize = ((tEplObdOString *) pData)->m_Size; } else { // The current position is not decleared. The string // is located in ROM, therefor use default pointer. @@ -2344,7 +2337,7 @@ static void *EplObdGetObjectDefaultPtr(tEplObdSubEntryPtr pSubIndexEntry_p) //--------------------------------------------------------------------------- static tEplKernel EplObdGetVarEntry(tEplObdSubEntryPtr pSubindexEntry_p, - tEplObdVarEntry MEM ** ppVarEntry_p) + tEplObdVarEntry **ppVarEntry_p) { tEplKernel Ret = kEplObdVarEntryNotExist; @@ -2356,13 +2349,9 @@ static tEplKernel EplObdGetVarEntry(tEplObdSubEntryPtr pSubindexEntry_p, if ((pSubindexEntry_p->m_Access & kEplObdAccVar) != 0) { // check if object is an array if ((pSubindexEntry_p->m_Access & kEplObdAccArray) != 0) { - *ppVarEntry_p = - &((tEplObdVarEntry MEM *) pSubindexEntry_p-> - m_pCurrent)[pSubindexEntry_p->m_uiSubIndex - 1]; + *ppVarEntry_p = &((tEplObdVarEntry *)pSubindexEntry_p->m_pCurrent)[pSubindexEntry_p->m_uiSubIndex - 1]; } else { - *ppVarEntry_p = - (tEplObdVarEntry MEM *) pSubindexEntry_p-> - m_pCurrent; + *ppVarEntry_p = (tEplObdVarEntry *)pSubindexEntry_p->m_pCurrent; } Ret = kEplSuccessful; @@ -2398,7 +2387,7 @@ static tEplKernel EplObdGetEntry(EPL_MCO_DECL_INSTANCE_PTR_ { tEplObdEntryPtr pObdEntry; - tEplObdCbParam MEM CbParam; + tEplObdCbParam CbParam; tEplKernel Ret; // check for all API function if instance is valid @@ -2452,16 +2441,16 @@ static tEplKernel EplObdGetEntry(EPL_MCO_DECL_INSTANCE_PTR_ // // Parameters: pSubIndexEntry_p // -// Return: void MEM* +// Return: void * // // State: // //--------------------------------------------------------------------------- -static void MEM *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p) +static void *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p) { - void MEM *pData; + void *pData; unsigned int uiArrayIndex; tEplObdSize Size; @@ -2478,24 +2467,21 @@ static void MEM *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p) } else { Size = EplObdGetObjectSize(pSubIndexEntry_p); } - pData = ((BYTE MEM *) pData) + (Size * uiArrayIndex); + pData = ((BYTE *) pData) + (Size * uiArrayIndex); } // check if VarEntry if ((pSubIndexEntry_p->m_Access & kEplObdAccVar) != 0) { // The data pointer is stored in VarEntry->pData - pData = ((tEplObdVarEntry MEM *) pData)->m_pData; + pData = ((tEplObdVarEntry *) pData)->m_pData; } // the default pointer is stored for strings in tEplObdVString else if ((pSubIndexEntry_p->m_Type == kEplObdTypVString) /* || (pSubIndexEntry_p->m_Type == kEplObdTypUString) */ ) { - pData = - (void MEM *)((tEplObdVString MEM *) pData)-> - m_pString; + pData = (void *)((tEplObdVString *)pData)->m_pString; } else if (pSubIndexEntry_p->m_Type == kEplObdTypOString) { pData = - (void MEM *)((tEplObdOString MEM *) pData)-> - m_pString; + (void *)((tEplObdOString *)pData)->m_pString; } } @@ -2519,7 +2505,7 @@ static void MEM *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p) // //--------------------------------------------------------------------------- -static tEplKernel EplObdGetIndexIntern(tEplObdInitParam MEM * pInitParam_p, +static tEplKernel EplObdGetIndexIntern(tEplObdInitParam *pInitParam_p, unsigned int uiIndex_p, tEplObdEntryPtr * ppObdEntry_p) { @@ -2778,12 +2764,12 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdSubEntryPtr pSubIndex; unsigned int nSubIndexCount; tEplObdAccess Access; - void MEM *pDstData; + void *pDstData; void *pDefault; tEplObdSize ObjSize; tEplKernel Ret; - tEplObdCbStoreParam MEM CbStore; - tEplObdVarEntry MEM *pVarEntry; + tEplObdCbStoreParam CbStore; + tEplObdVarEntry *pVarEntry; ASSERT(pObdEnty_p != NULL); @@ -2866,7 +2852,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ } else { - EplObdInitVarEntry ((tEplObdVarEntry MEM*) (((BYTE MEM*) pSubIndex->m_pCurrent) + (sizeof (tEplObdVarEntry) * pSubIndex->m_uiSubIndex)), + EplObdInitVarEntry ((tEplObdVarEntry *) (((BYTE *) pSubIndex->m_pCurrent) + (sizeof (tEplObdVarEntry) * pSubIndex->m_uiSubIndex)), pSubIndex->m_Type, ObjSize); } */ @@ -2893,11 +2879,11 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ // For copying data we have to set the destination pointer to the real RAM string. This // pointer to RAM string is located in default string info structure. (translated r.d.) - pDstData = (void MEM *)((tEplObdVStringDef*) pSubIndex->m_pDefault)->m_pString; + pDstData = (void *)((tEplObdVStringDef*) pSubIndex->m_pDefault)->m_pString; ObjSize = ((tEplObdVStringDef *)pSubIndex->m_pDefault)->m_Size; - ((tEplObdVString MEM *)pSubIndex->m_pCurrent)->m_pString = pDstData; - ((tEplObdVString MEM *)pSubIndex->m_pCurrent)->m_Size = ObjSize; + ((tEplObdVString *)pSubIndex->m_pCurrent)->m_pString = pDstData; + ((tEplObdVString *)pSubIndex->m_pCurrent)->m_Size = ObjSize; } } else if (pSubIndex->m_Type == @@ -2912,11 +2898,11 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ // For copying data we have to set the destination pointer to the real RAM string. This // pointer to RAM string is located in default string info structure. (translated r.d.) - pDstData = (void MEM *)((tEplObdOStringDef *) pSubIndex->m_pDefault)->m_pString; + pDstData = (void *)((tEplObdOStringDef *) pSubIndex->m_pDefault)->m_pString; ObjSize = ((tEplObdOStringDef *)pSubIndex->m_pDefault)->m_Size; - ((tEplObdOString MEM *)pSubIndex->m_pCurrent)->m_pString = pDstData; - ((tEplObdOString MEM *)pSubIndex->m_pCurrent)->m_Size = ObjSize; + ((tEplObdOString *)pSubIndex->m_pCurrent)->m_pString = pDstData; + ((tEplObdOString *)pSubIndex->m_pCurrent)->m_Size = ObjSize; } } @@ -3056,7 +3042,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ // Returns: tEplKernel = error code // ---------------------------------------------------------------------------- -static void EplObdCopyObjectData(void MEM * pDstData_p, +static void EplObdCopyObjectData(void *pDstData_p, void *pSrcData_p, tEplObdSize ObjSize_p, tEplObdType ObjType_p) { @@ -3087,7 +3073,7 @@ static void EplObdCopyObjectData(void MEM * pDstData_p, EPL_MEMCPY(pDstData_p, pSrcData_p, ObjSize_p); if (ObjType_p == kEplObdTypVString) { - ((char MEM *)pDstData_p)[StrSize] = '\0'; + ((char *)pDstData_p)[StrSize] = '\0'; } } } @@ -3148,7 +3134,7 @@ static tEplKernel EplObdIsNumericalIntern(tEplObdSubEntryPtr pObdSubEntry_p, // ---------------------------------------------------------------------------- #if (EPL_OBD_USE_STORE_RESTORE != FALSE) static tEplKernel EplObdCallStoreCallback(EPL_MCO_DECL_INSTANCE_PTR_ - tEplObdCbStoreParam MEM * + tEplObdCbStoreParam * pCbStoreParam_p) { diff --git a/drivers/staging/epl/EplObd.h b/drivers/staging/epl/EplObd.h index a70139c6bbc2..e2dd2278a1bc 100644 --- a/drivers/staging/epl/EplObd.h +++ b/drivers/staging/epl/EplObd.h @@ -290,14 +290,14 @@ typedef struct { unsigned int m_uiIndex; unsigned int m_uiSubindex; tEplObdSize m_Size; - void MEM *m_pData; + void *m_pData; // tEplVarCallback m_fpCallback; // void * m_pArg; } tEplVarParam; typedef struct { - void MEM *m_pData; + void *m_pData; tEplObdSize m_Size; /* #if (EPL_PDO_USE_STATIC_MAPPING == FALSE) @@ -353,7 +353,7 @@ typedef struct { tEplObdType m_Type; tEplObdAccess m_Access; void *m_pDefault; - void MEM *m_pCurrent; // points always to RAM + void *m_pCurrent; // points always to RAM } tEplObdSubEntry; @@ -375,7 +375,7 @@ typedef struct { } tEplObdCbParam; // define type for callback function: pParam_p points to tEplObdCbParam -typedef tEplKernel(*tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ tEplObdCbParam MEM * pParam_p); +typedef tEplKernel(*tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ tEplObdCbParam *pParam_p); // do not change the order for this struct!!! @@ -414,15 +414,14 @@ typedef struct { typedef struct { tEplObdCommand m_bCommand; tEplObdPart m_bCurrentOdPart; - void MEM *m_pData; + void *m_pData; tEplObdSize m_ObjSize; } tEplObdCbStoreParam; -typedef tEplKernel(*tInitTabEntryCallback) (void MEM * pTabEntry_p, - unsigned int uiObjIndex_p); +typedef tEplKernel(*tInitTabEntryCallback) (void *pTabEntry_p, unsigned int uiObjIndex_p); -typedef tEplKernel(*tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ tEplObdCbStoreParam MEM *pCbStoreParam_p); +typedef tEplKernel(*tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ tEplObdCbStoreParam *pCbStoreParam_p); // ------------------------------------------------------------------------- // this stucture is used for parameters for function ObdInitModuleTab() @@ -431,7 +430,7 @@ typedef struct { unsigned int m_uiLowerObjIndex; // lower limit of ObjIndex unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found - void MEM *m_pTabBase; // base address of table + void *m_pTabBase; // base address of table unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping unsigned int m_uiMaxEntries; // max. tabel entries diff --git a/drivers/staging/epl/EplObdMacro.h b/drivers/staging/epl/EplObdMacro.h index 23f2ad80dde8..21849b059e3b 100644 --- a/drivers/staging/epl/EplObdMacro.h +++ b/drivers/staging/epl/EplObdMacro.h @@ -102,10 +102,10 @@ #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) -#define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char MEM szCur##ind##_##sub##_g[size+1]; \ +#define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char szCur##ind##_##sub##_g[size+1]; \ static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g}; -#define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE MEM bCur##ind##_##sub##_g[size]; \ +#define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE bCur##ind##_##sub##_g[size]; \ static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((BYTE*)""), bCur##ind##_##sub##_g}; #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; @@ -129,20 +129,20 @@ //--------------------------------------------------------------------------------------- #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) #define EPL_OBD_END_INDEX(ind) -#define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp MEM axCur##ind##_g[cnt]; -#define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; -#define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; +#define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp axCur##ind##_g[cnt]; +#define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry aVarEntry##ind##_g[cnt]; +#define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry aVarEntry##ind##_g[cnt]; //--------------------------------------------------------------------------------------- -#define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp MEM xCur##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp MEM xCur##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString MEM xCur##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString MEM xCur##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp MEM xCur##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; -#define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xCur##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xCur##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString xCur##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString xCur##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp xCur##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry VarEntry##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry VarEntry##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry VarEntry##ind##_##sub##_g; +#define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry VarEntry##ind##_##sub##_g; //------------------------------------------------------------------------------------------- #elif defined (EPL_OBD_CREATE_SUBINDEX_TAB) @@ -159,17 +159,17 @@ #define EPL_OBD_END_PART() //--------------------------------------------------------------------------------------- -#define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[cnt]= { +#define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry aObdSubEntry##ind##Ram_g[cnt]= { #define EPL_OBD_END_INDEX(ind) EPL_OBD_END_SUBINDEX()}; -#define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ +#define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry aObdSubEntry##ind##Ram_g[]= { \ {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ {1, typ, (acc)|kEplObdAccArray, &xDef##ind##_0x01_g, &axCur##ind##_g[0]}, \ EPL_OBD_END_SUBINDEX()}; -#define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ +#define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry aObdSubEntry##ind##Ram_g[]= { \ {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, &xDef##ind##_0x01_g, &aVarEntry##ind##_g[0]}, \ EPL_OBD_END_SUBINDEX()}; -#define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ +#define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry aObdSubEntry##ind##Ram_g[]= { \ {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, NULL, &aVarEntry##ind##_g[0]}, \ EPL_OBD_END_SUBINDEX()}; diff --git a/drivers/staging/epl/EplObdu.c b/drivers/staging/epl/EplObdu.c index 60f590bfbea0..da975ff01f30 100644 --- a/drivers/staging/epl/EplObdu.c +++ b/drivers/staging/epl/EplObdu.c @@ -201,7 +201,7 @@ EPLDLLEXPORT tEplKernel EplObduAccessOdPart(tEplObdPart ObdPart_p, // State: // //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObduDefineVar(tEplVarParam MEM *pVarParam_p) +EPLDLLEXPORT tEplKernel EplObduDefineVar(tEplVarParam *pVarParam_p) { tEplKernel Ret; @@ -274,7 +274,7 @@ EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p) // State: // //--------------------------------------------------------------------------- -EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry MEM *pVarEntry_p, +EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p, BYTE bType_p, tEplObdSize ObdSize_p) { EplObduCalInitVarEntry(pVarEntry_p, bType_p, ObdSize_p); @@ -473,7 +473,7 @@ EPLDLLEXPORT tEplKernel EplObduWriteEntryFromLe(unsigned int uiIndex_p, //--------------------------------------------------------------------------- EPLDLLEXPORT tEplKernel EplObduSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM **ppVarEntry_p) + tEplObdVarEntry **ppVarEntry_p) { tEplKernel Ret; diff --git a/drivers/staging/epl/EplObduCal.c b/drivers/staging/epl/EplObduCal.c index 980d382d49a4..fc04d9a7c0e4 100644 --- a/drivers/staging/epl/EplObduCal.c +++ b/drivers/staging/epl/EplObduCal.c @@ -212,7 +212,7 @@ EPLDLLEXPORT tEplKernel EplObduCalAccessOdPart(tEplObdPart ObdPart_p, // State: // //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObduCalDefineVar(tEplVarParam MEM *pVarParam_p) +EPLDLLEXPORT tEplKernel EplObduCalDefineVar(tEplVarParam *pVarParam_p) { tEplKernel Ret; @@ -296,7 +296,7 @@ EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p) // State: // //--------------------------------------------------------------------------- -EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry MEM *pVarEntry_p, +EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p, BYTE bType_p, tEplObdSize ObdSize_p) { #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0) @@ -507,7 +507,7 @@ EPLDLLEXPORT tEplKernel EplObduCalWriteEntryFromLe(unsigned int uiIndex_p, //--------------------------------------------------------------------------- EPLDLLEXPORT tEplKernel EplObduCalSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM **ppVarEntry_p) + tEplObdVarEntry **ppVarEntry_p) { tEplKernel Ret; diff --git a/drivers/staging/epl/EplPdou.c b/drivers/staging/epl/EplPdou.c index dfaabb4b9496..606f03269b34 100644 --- a/drivers/staging/epl/EplPdou.c +++ b/drivers/staging/epl/EplPdou.c @@ -149,7 +149,7 @@ // local function prototypes //--------------------------------------------------------------------------- -static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam MEM * pParam_p, +static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam *pParam_p, unsigned int uiIndex_p); static void EplPdouDecodeObjectMapping(QWORD qwObjectMapping_p, @@ -226,7 +226,7 @@ tEplKernel EplPdouDelInstance(void) // //--------------------------------------------------------------------------- -tEplKernel EplPdouCbObdAccess(tEplObdCbParam MEM *pParam_p) +tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p) { tEplKernel Ret = kEplSuccessful; unsigned int uiPdoId; @@ -394,7 +394,7 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam MEM *pParam_p) // //--------------------------------------------------------------------------- -static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam MEM * pParam_p, +static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam *pParam_p, unsigned int uiIndex_p) { tEplKernel Ret = kEplSuccessful; diff --git a/drivers/staging/epl/demo_main.c b/drivers/staging/epl/demo_main.c index 20787dc18b9a..6e0db9a25fe9 100644 --- a/drivers/staging/epl/demo_main.c +++ b/drivers/staging/epl/demo_main.c @@ -188,7 +188,7 @@ module_param_named(cyclelen, uiCycleLen_g, uint, 0); // this function prototype here. If you want to use more than one Epl // instances then the function name of each object dictionary has to differ. -tEplKernel EplObdInitRam(tEplObdInitParam MEM * pInitParam_p); +tEplKernel EplObdInitRam(tEplObdInitParam *pInitParam_p); tEplKernel AppCbEvent(tEplApiEventType EventType_p, // IN: event type (enum) tEplApiEventArg *pEventArg_p, // IN: event argument (union) diff --git a/drivers/staging/epl/global.h b/drivers/staging/epl/global.h index b5902da8fa46..74db85ce36c9 100644 --- a/drivers/staging/epl/global.h +++ b/drivers/staging/epl/global.h @@ -27,12 +27,6 @@ #define QWORD long long int #endif - // ------------------ GNUC for I386 --------------------------------------------- - -#define HWACC // hardware access through external memory (i.e. CAN) - -#define MEM // Memory attribute to optimize speed and code of pointer access. - #ifndef CONST #define CONST const // variables mapped to ROM (i.e. flash) #endif diff --git a/drivers/staging/epl/kernel/EplObdk.h b/drivers/staging/epl/kernel/EplObdk.h index eafd0bf54bea..30e51d0eb46a 100644 --- a/drivers/staging/epl/kernel/EplObdk.h +++ b/drivers/staging/epl/kernel/EplObdk.h @@ -85,17 +85,17 @@ // global variables //--------------------------------------------------------------------------- -extern BYTE MEM abEplObdTrashObject_g[8]; +extern BYTE abEplObdTrashObject_g[8]; //--------------------------------------------------------------------------- // function prototypes //--------------------------------------------------------------------------- #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0) // --------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdInit(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam MEM *pInitParam_p); +EPLDLLEXPORT tEplKernel EplObdInit(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam *pInitParam_p); // --------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdAddInstance(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam MEM *pInitParam_p); +EPLDLLEXPORT tEplKernel EplObdAddInstance(EPL_MCO_DECL_PTR_INSTANCE_PTR_ tEplObdInitParam *pInitParam_p); // --------------------------------------------------------------------- EPLDLLEXPORT tEplKernel EplObdDeleteInstance(EPL_MCO_DECL_INSTANCE_PTR); @@ -120,7 +120,7 @@ EPLDLLEXPORT tEplKernel EplObdAccessOdPart(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdPar tEplObdDir Direction_p); // --------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObdDefineVar(EPL_MCO_DECL_INSTANCE_PTR_ tEplVarParam MEM *pVarParam_p); +EPLDLLEXPORT tEplKernel EplObdDefineVar(EPL_MCO_DECL_INSTANCE_PTR_ tEplVarParam *pVarParam_p); // --------------------------------------------------------------------- EPLDLLEXPORT void *EplObdGetObjectDataPtr(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, @@ -129,7 +129,7 @@ EPLDLLEXPORT void *EplObdGetObjectDataPtr(EPL_MCO_DECL_INSTANCE_PTR_ unsigned in EPLDLLEXPORT tEplKernel EplObdRegisterUserOd(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPtr pUserOd_p); // --------------------------------------------------------------------- -EPLDLLEXPORT void EplObdInitVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdVarEntry MEM *pVarEntry_p, +EPLDLLEXPORT void EplObdInitVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdVarEntry *pVarEntry_p, tEplObdType Type_p, tEplObdSize ObdSize_p); @@ -168,7 +168,7 @@ EPLDLLEXPORT tEplKernel EplObdGetAccessType(EPL_MCO_DECL_INSTANCE_PTR_ unsigned // --------------------------------------------------------------------- EPLDLLEXPORT tEplKernel EplObdSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM **ppVarEntry_p); + tEplObdVarEntry **ppVarEntry_p); #endif // end of #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0) diff --git a/drivers/staging/epl/user/EplObdu.h b/drivers/staging/epl/user/EplObdu.h index c9138cb084ef..679ff6f054f3 100644 --- a/drivers/staging/epl/user/EplObdu.h +++ b/drivers/staging/epl/user/EplObdu.h @@ -107,7 +107,7 @@ EPLDLLEXPORT tEplKernel EplObduAccessOdPart(tEplObdPart ObdPart_p, tEplObdDir Direction_p); // --------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObduDefineVar(tEplVarParam MEM * pVarParam_p); +EPLDLLEXPORT tEplKernel EplObduDefineVar(tEplVarParam *pVarParam_p); // --------------------------------------------------------------------- EPLDLLEXPORT void *EplObduGetObjectDataPtr(unsigned int uiIndex_p, @@ -116,7 +116,7 @@ EPLDLLEXPORT void *EplObduGetObjectDataPtr(unsigned int uiIndex_p, EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p); // --------------------------------------------------------------------- -EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry MEM * pVarEntry_p, +EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p, BYTE bType_p, tEplObdSize ObdSize_p); // --------------------------------------------------------------------- @@ -148,7 +148,7 @@ EPLDLLEXPORT tEplKernel EplObduWriteEntryFromLe(unsigned int uiIndex_p, EPLDLLEXPORT tEplKernel EplObduSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM **ppVarEntry_p); + tEplObdVarEntry **ppVarEntry_p); #elif EPL_OBD_USE_KERNEL != FALSE #include "../kernel/EplObdk.h" diff --git a/drivers/staging/epl/user/EplObduCal.h b/drivers/staging/epl/user/EplObduCal.h index 367ecc56d15f..2f067bfd7c16 100644 --- a/drivers/staging/epl/user/EplObduCal.h +++ b/drivers/staging/epl/user/EplObduCal.h @@ -98,14 +98,14 @@ EPLDLLEXPORT tEplKernel EplObduCalReadEntry(unsigned int uiIndex_p, EPLDLLEXPORT tEplKernel EplObduCalAccessOdPart(tEplObdPart ObdPart_p, tEplObdDir Direction_p); //--------------------------------------------------------------------------- -EPLDLLEXPORT tEplKernel EplObduCalDefineVar(tEplVarParam MEM *pVarParam_p); +EPLDLLEXPORT tEplKernel EplObduCalDefineVar(tEplVarParam *pVarParam_p); //--------------------------------------------------------------------------- EPLDLLEXPORT void *EplObduCalGetObjectDataPtr(unsigned int uiIndex_p, unsigned int uiSubIndex_p); //--------------------------------------------------------------------------- EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p); //--------------------------------------------------------------------------- -EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry MEM *pVarEntry_p, +EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p, BYTE bType_p, tEplObdSize ObdSize_p); //--------------------------------------------------------------------------- EPLDLLEXPORT tEplObdSize EplObduCalGetDataSize(unsigned int uiIndex_p, @@ -133,6 +133,6 @@ EPLDLLEXPORT tEplKernel EplObduCalWriteEntryFromLe(unsigned int uiIndex_p, EPLDLLEXPORT tEplKernel EplObduCalSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p, unsigned int uiSubindex_p, - tEplObdVarEntry MEM ** ppVarEntry_p); + tEplObdVarEntry **ppVarEntry_p); #endif // #ifndef _EPLOBDUCAL_H_ diff --git a/drivers/staging/epl/user/EplPdou.h b/drivers/staging/epl/user/EplPdou.h index ebc6cd021f46..8e4b711c8c5c 100644 --- a/drivers/staging/epl/user/EplPdou.h +++ b/drivers/staging/epl/user/EplPdou.h @@ -89,7 +89,7 @@ tEplKernel EplPdouAddInstance(void); tEplKernel EplPdouDelInstance(void); #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOU)) != 0) -tEplKernel EplPdouCbObdAccess(tEplObdCbParam MEM * pParam_p); +tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p); #else #define EplPdouCbObdAccess NULL #endif