Merge "replaced cmMemSet, cmMemcpy with memset and memcpy resp AND Removed TRC()...
[o-du/l2.git] / src / 5gnrsch / rg_sch_inf.c
index daf9730..f288719 100755 (executable)
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchUeDelInd
+S16 cmPkMacSchUeDelInd
 (
 Pst* pst,
 RgInfUeDelInd*  ueDelInd
 )
 #else
-PUBLIC S16 cmPkMacSchUeDelInd(pst, ueDelInd)
+S16 cmPkMacSchUeDelInd(pst, ueDelInd)
 Pst* pst;
 RgInfUeDelInd*  ueDelInd;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchUeDelInd)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    
 #ifdef MS_MBUF_CORRUPTION 
@@ -85,11 +83,11 @@ RgInfUeDelInd*  ueDelInd;
    if(SAddPstMsgMult((Data *)ueDelInd, sizeof(RgInfUeDelInd), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFUEDELIND;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 /**
@@ -108,14 +106,14 @@ RgInfUeDelInd*  ueDelInd;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchUeDelInd
+S16 cmUnpkMacSchUeDelInd
 (
 UeDelInd func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchUeDelInd(func, pst, mBuf)
+S16 cmUnpkMacSchUeDelInd(func, pst, mBuf)
 UeDelInd func;
 Pst *pst;
 Buffer *mBuf;
@@ -123,17 +121,15 @@ Buffer *mBuf;
 {
    RgInfUeDelInd ueDelInd;
    
-   TRC2(cmUnpkMacSchUeDelInd)
-
    if(SRemPreMsgMult((Data *)&ueDelInd, sizeof(RgInfUeDelInd), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
 
-   RETVALUE((*func)(pst, &ueDelInd));
+   return ((*func)(pst, &ueDelInd));
 }
 /*Fix: end: Inform UE delete to scheduler*/
 
@@ -152,22 +148,21 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchDedBoUpdtReq
+S16 cmPkMacSchDedBoUpdtReq
 (
 Pst* pst,
 RgInfDedBoRpt* boRpt
 )
 #else
-PUBLIC S16 cmPkMacSchDedBoUpdtReq(pst, boRpt)
+S16 cmPkMacSchDedBoUpdtReq(pst, boRpt)
 Pst* pst;
 RgInfDedBoRpt* boRpt;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchDedBoUpdtReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef MS_MBUF_CORRUPTION 
@@ -176,11 +171,11 @@ RgInfDedBoRpt* boRpt;
    if(SAddPstMsgMult((Data *)boRpt, sizeof(RgInfDedBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFDEDBOUPDTREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 
@@ -199,14 +194,14 @@ RgInfDedBoRpt* boRpt;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchDedBoUpdtReq
+S16 cmUnpkMacSchDedBoUpdtReq
 (
 DedBoUpdtReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchDedBoUpdtReq(func, pst, mBuf)
+S16 cmUnpkMacSchDedBoUpdtReq(func, pst, mBuf)
 DedBoUpdtReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -214,16 +209,14 @@ Buffer *mBuf;
 {
    RgInfDedBoRpt boRpt;
    
-   TRC2(cmUnpkMacSchDedBoUpdtReq)
-
    if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfDedBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &boRpt));
+   return ((*func)(pst, &boRpt));
 }
 /**
 * @brief Request from RLC to MAC for forwarding SDUs on 
@@ -240,22 +233,21 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchCmnBoUpdtReq
+S16 cmPkMacSchCmnBoUpdtReq
 (
 Pst* pst,
 RgInfCmnBoRpt* boRpt
 )
 #else
-PUBLIC S16 cmPkMacSchCmnBoUpdtReq(pst, boRpt)
+S16 cmPkMacSchCmnBoUpdtReq(pst, boRpt)
 Pst* pst;
 RgInfCmnBoRpt* boRpt;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchCmnBoUpdtReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef MS_MBUF_CORRUPTION 
@@ -264,11 +256,11 @@ RgInfCmnBoRpt* boRpt;
    if(SAddPstMsgMult((Data *)boRpt, sizeof(RgInfCmnBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFCMNBOUPDTREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 
@@ -287,14 +279,14 @@ RgInfCmnBoRpt* boRpt;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchCmnBoUpdtReq
+S16 cmUnpkMacSchCmnBoUpdtReq
 (
 CmnBoUpdtReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchCmnBoUpdtReq(func, pst, mBuf)
+S16 cmUnpkMacSchCmnBoUpdtReq(func, pst, mBuf)
 CmnBoUpdtReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -302,16 +294,14 @@ Buffer *mBuf;
 {
    RgInfCmnBoRpt boRpt;
    
-   TRC2(cmUnpkMacSchCmnBoUpdtReq)
-
    if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfCmnBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &boRpt));
+   return ((*func)(pst, &boRpt));
 }
 /**
 * @brief Request from RLC to MAC for forwarding SDUs on 
@@ -328,32 +318,31 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchSfRecpInd
+S16 cmPkMacSchSfRecpInd
 (
 Pst* pst,
 RgInfSfDatInd*  datInd
 )
 #else
-PUBLIC S16 cmPkMacSchSfRecpInd(pst, datInd)
+S16 cmPkMacSchSfRecpInd(pst, datInd)
 Pst* pst;
 RgInfSfDatInd*  datInd;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchSfRecpInd)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)datInd, mBuf) != ROK)
+   if(oduPackPointer((PTR)datInd, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFSFRECPIND;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 
@@ -372,14 +361,14 @@ RgInfSfDatInd*  datInd;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchSfRecpInd
+S16 cmUnpkMacSchSfRecpInd
 (
 SfRecpInd func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchSfRecpInd(func, pst, mBuf)
+S16 cmUnpkMacSchSfRecpInd(func, pst, mBuf)
 SfRecpInd func;
 Pst *pst;
 Buffer *mBuf;
@@ -387,17 +376,15 @@ Buffer *mBuf;
 {
    RgInfSfDatInd* datInd;
    
-   TRC2(cmUnpkMacSchCmnBoUpdtReq)
-
-   if(cmUnpkPtr((PTR *)&datInd, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&datInd, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
    /* Call cmFreeMem(datInd) in scheduler */
-   RETVALUE((*func)(pst, datInd));
+   return ((*func)(pst, datInd));
 }
 
 #ifdef LTEMAC_SPS
@@ -414,33 +401,31 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchSpsRelInd
+S16 cmPkMacSchSpsRelInd
 (
 Pst*                 pst,
 RgInfSpsRelInfo*     relInfo
 )
 #else
-PUBLIC S16 cmPkMacSchSpsRelInd(pst, relInfo)
+S16 cmPkMacSchSpsRelInd(pst, relInfo)
 Pst*                 pst;
 RgInfSpsRelInfo*     relInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchSpsRelInd)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)relInfo, mBuf) != ROK)
+   if(oduPackPointer((PTR)relInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFSPSRELIND;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkMacSchSpsRelInd */
 
 /**
@@ -457,14 +442,14 @@ RgInfSpsRelInfo*     relInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchSpsRelInd
+S16 cmUnpkMacSchSpsRelInd
 (
 SpsRelInd      func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchSpsRelInd(func, pst, mBuf)
+S16 cmUnpkMacSchSpsRelInd(func, pst, mBuf)
 SpsRelInd      func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -472,16 +457,14 @@ Buffer         *mBuf;
 {
    RgInfSpsRelInfo *relInfo;
    
-   TRC2(cmUnpkMacSchSpsRelInd)
-
-   if(cmUnpkPtr((PTR *)&relInfo, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&relInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, relInfo));
+   return ((*func)(pst, relInfo));
 } /* end of cmUnpkMacSchSpsRelInd */
 #endif /* LTEMAC_SPS */
 
@@ -502,32 +485,31 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacSfAllocReq
+S16 cmPkSchMacSfAllocReq
 (
 Pst* pst,
 RgInfSfAlloc*   resAllocReq
 )
 #else
-PUBLIC S16 cmPkSchMacSfAllocReq(pst, resAllocReq)
+S16 cmPkSchMacSfAllocReq(pst, resAllocReq)
 Pst* pst;
 RgInfSfAlloc*   resAllocReq;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacSfAllocReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)resAllocReq, mBuf) != ROK)
+   if(oduPackPointer((PTR)resAllocReq, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFSFALLOCREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 
@@ -546,14 +528,14 @@ RgInfSfAlloc*   resAllocReq;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacSfAllocReq
+S16 cmUnpkSchMacSfAllocReq
 (
 SfAllocReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacSfAllocReq(func, pst, mBuf)
+S16 cmUnpkSchMacSfAllocReq(func, pst, mBuf)
 SfAllocReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -561,16 +543,14 @@ Buffer *mBuf;
 {
    RgInfSfAlloc* resAllocReq;
    
-   TRC2(cmUnpkSchMacSfAllocReq)
-
-   if(cmUnpkPtr((PTR *)&resAllocReq, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&resAllocReq, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, resAllocReq));
+   return ((*func)(pst, resAllocReq));
 }
 /**
 * @brief Request from  SCH To MAC for harq entity reset
@@ -585,32 +565,31 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacRstHqEntReq
+S16 cmPkSchMacRstHqEntReq
 (
 Pst*                 pst,
 RgInfResetHqEnt*     hqEntInfo
 )
 #else
-PUBLIC S16 cmPkSchMacRstHqEntReq(pst, sfHqInfo)
+S16 cmPkSchMacRstHqEntReq(pst, sfHqInfo)
 Pst*                 pst,    
 RgInfResetHqEnt*     hqEntInfo
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRstHqEntReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)hqEntInfo, mBuf) != ROK)
+   if(oduPackPointer((PTR)hqEntInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFHQENTRESET;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 /**
@@ -626,14 +605,14 @@ RgInfResetHqEnt*     hqEntInfo
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacRstHqEntReq
+S16 cmUnpkSchMacRstHqEntReq
 (
 RstHqEntReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacRstHqEntReq(func, pst, mBuf)
+S16 cmUnpkSchMacRstHqEntReq(func, pst, mBuf)
 RstHqEntReq func,
 Pst *pst,
 Buffer *mBuf
@@ -641,16 +620,14 @@ Buffer *mBuf
 {
    RgInfResetHqEnt* hqEntRstInfo;
    
-   TRC2(cmUnpkSchMacRstHqEntReq)
-
-   if(cmUnpkPtr((PTR *)&hqEntRstInfo, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&hqEntRstInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, hqEntRstInfo));
+   return ((*func)(pst, hqEntRstInfo));
 }
 
 /**
@@ -668,32 +645,31 @@ Buffer *mBuf
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacRlsHqReq
+S16 cmPkSchMacRlsHqReq
 (
 Pst* pst,
 RgInfRlsHqInfo* sfHqInfo
 )
 #else
-PUBLIC S16 cmPkSchMacRlsHqReq(pst, sfHqInfo)
+S16 cmPkSchMacRlsHqReq(pst, sfHqInfo)
 Pst* pst;
 RgInfRlsHqInfo* sfHqInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRlsHqReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)sfHqInfo, mBuf) != ROK)
+   if(oduPackPointer((PTR)sfHqInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFRLSHQREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 /**
@@ -711,14 +687,14 @@ RgInfRlsHqInfo* sfHqInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacRlsHqReq
+S16 cmUnpkSchMacRlsHqReq
 (
 RlsHqReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacRlsHqReq(func, pst, mBuf)
+S16 cmUnpkSchMacRlsHqReq(func, pst, mBuf)
 RlsHqReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -726,16 +702,14 @@ Buffer *mBuf;
 {
    RgInfRlsHqInfo* sfHqInfo;
    
-   TRC2(cmUnpkSchMacRlsHqReq)
-
-   if(cmUnpkPtr((PTR *)&sfHqInfo, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&sfHqInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, sfHqInfo));
+   return ((*func)(pst, sfHqInfo));
 }
 /**
 * @brief Request from RLC to MAC for forwarding SDUs on 
@@ -752,22 +726,21 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacRlsRntiReq
+S16 cmPkSchMacRlsRntiReq
 (
 Pst* pst,
 RgInfRlsRnti* rlsRnti
 )
 #else
-PUBLIC S16 cmPkSchMacRlsRntiReq(pst, rlsRnti)
+S16 cmPkSchMacRlsRntiReq(pst, rlsRnti)
 Pst* pst;
 RgInfRlsRnti* rlsRnti;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRlsRntiReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef MS_MBUF_CORRUPTION 
@@ -776,11 +749,11 @@ RgInfRlsRnti* rlsRnti;
    if(SAddPstMsgMult((Data *)rlsRnti, sizeof(RgInfRlsRnti), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFRLSRNTIREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 /**
@@ -798,14 +771,14 @@ RgInfRlsRnti* rlsRnti;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacRlsRntiReq
+S16 cmUnpkSchMacRlsRntiReq
 (
 RlsRntiReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacRlsRntiReq(func, pst, mBuf)
+S16 cmUnpkSchMacRlsRntiReq(func, pst, mBuf)
 RlsRntiReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -813,16 +786,14 @@ Buffer *mBuf;
 {
    RgInfRlsRnti rlsRnti;
    
-   TRC2(cmUnpkSchMacRlsRntiReq)
-
    if(SRemPreMsgMult((Data *)&rlsRnti, sizeof(RgInfRlsRnti), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &rlsRnti));
+   return ((*func)(pst, &rlsRnti));
 }
 
 /**
@@ -840,22 +811,21 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacCellRegReq
+S16 cmPkSchMacCellRegReq
 (
 Pst* pst,
 RgInfCellReg* regReq
 )
 #else
-PUBLIC S16 cmPkSchMacCellRegReq(pst, regReq)
+S16 cmPkSchMacCellRegReq(pst, regReq)
 Pst* pst;
 RgInfCellReg* regReq;
 #endif
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacCellRegReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef MS_MBUF_CORRUPTION 
@@ -864,11 +834,11 @@ RgInfCellReg* regReq;
    if(SAddPstMsgMult((Data *)regReq, sizeof(RgInfCellReg), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFCELLREGREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }
 
 /**
@@ -886,14 +856,14 @@ RgInfCellReg* regReq;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacCellRegReq
+S16 cmUnpkSchMacCellRegReq
 (
 CellRegReq func,
 Pst *pst,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacCellRegReq(func, pst, mBuf)
+S16 cmUnpkSchMacCellRegReq(func, pst, mBuf)
 CellRegReq func;
 Pst *pst;
 Buffer *mBuf;
@@ -901,16 +871,14 @@ Buffer *mBuf;
 {
    RgInfCellReg regReq;
    
-   TRC2(cmUnpkSchMacCellRegReq)
-
    if(SRemPreMsgMult((Data *)&regReq, sizeof(RgInfCellReg), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &regReq));
+   return ((*func)(pst, &regReq));
 }
 
 /**
@@ -926,33 +894,31 @@ Buffer *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacLcgRegReq
+S16 cmPkSchMacLcgRegReq
 (
 Pst*                 pst,
 RgInfLcgRegReq       *lcgRegReq
 )
 #else
-PUBLIC S16 cmPkSchMacLcgRegReq(pst, lcgRegReq)
+S16 cmPkSchMacLcgRegReq(pst, lcgRegReq)
 Pst*                 pst;
 RgInfLcgRegReq       *lcgRegReq;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacLcgRegReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if(SAddPstMsgMult((Data *)lcgRegReq, sizeof(RgInfLcgRegReq), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFLCGREG;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacLcgRegReq */
 
 /**
@@ -969,14 +935,14 @@ RgInfLcgRegReq       *lcgRegReq;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacLcgRegReq
+S16 cmUnpkSchMacLcgRegReq
 (
 LcgReg         func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacLcgRegReq(func, pst, mBuf)
+S16 cmUnpkSchMacLcgRegReq(func, pst, mBuf)
 LcgReg         func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -984,16 +950,14 @@ Buffer         *mBuf;
 {
    RgInfLcgRegReq       *lcgRegReq;
    
-   TRC2(cmUnpkSchMacLcgRegReq)
-
-   if(cmUnpkPtr((PTR *)&lcgRegReq, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&lcgRegReq, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, lcgRegReq));
+   return ((*func)(pst, lcgRegReq));
 } /* end of cmUnpkSchMacLcgRegReq */
 
 #ifdef LTEMAC_SPS
@@ -1011,33 +975,31 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacSpsLcRegReq
+S16 cmPkSchMacSpsLcRegReq
 (
 Pst*                 pst,
 RgInfSpsLcInfo       *lcInfo
 )
 #else
-PUBLIC S16 cmPkSchMacSpsLcRegReq(pst, lcInfo)
+S16 cmPkSchMacSpsLcRegReq(pst, lcInfo)
 Pst*                 pst;
 RgInfSpsLcInfo       *lcInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacSpsLcRegReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)lcInfo, mBuf) != ROK)
+   if(oduPackPointer((PTR)lcInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFSPSLCREG;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacSpsLcRegReq */
 
 /**
@@ -1053,33 +1015,31 @@ RgInfSpsLcInfo       *lcInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacUlSpsResetReq
+S16 cmPkSchMacUlSpsResetReq
 (
 Pst*                 pst,
 RgInfUlSpsReset      *ulSpsResetInfo
 )
 #else
-PUBLIC S16 cmPkSchMacUlSpsResetReq(pst, ulSpsResetInfo)
+S16 cmPkSchMacUlSpsResetReq(pst, ulSpsResetInfo)
 Pst*                 pst;
 RgInfUlSpsReset       *ulSpsResetInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacUlSpsResetReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   if(cmPkPtr((PTR)ulSpsResetInfo, mBuf) != ROK)
+   if(oduPackPointer((PTR)ulSpsResetInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFSPSRESET;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacUlSpsResetReq */
 
 /**
@@ -1096,14 +1056,14 @@ RgInfUlSpsReset       *ulSpsResetInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacSpsLcRegReq
+S16 cmUnpkSchMacSpsLcRegReq
 (
 SpsLcReg       func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacSpsLcRegReq(func, pst, mBuf)
+S16 cmUnpkSchMacSpsLcRegReq(func, pst, mBuf)
 SpsLcReg       func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1111,16 +1071,14 @@ Buffer         *mBuf;
 {
    RgInfSpsLcInfo       *lcInfo;
    
-   TRC2(cmUnpkSchMacSpsLcRegReq)
-
-   if(cmUnpkPtr((PTR *)&lcInfo, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&lcInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, lcInfo));
+   return ((*func)(pst, lcInfo));
 } /* end of cmUnpkSchMacSpsLcRegReq */
 
 
@@ -1139,14 +1097,14 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacUlSpsResetReq
+S16 cmUnpkSchMacUlSpsResetReq
 (
 UlSpsReset       func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacUlSpsResetReq(func, pst, mBuf)
+S16 cmUnpkSchMacUlSpsResetReq(func, pst, mBuf)
 UlSpsReset       func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1154,16 +1112,14 @@ Buffer         *mBuf;
 {
    RgInfUlSpsReset       *ulSpsResetInfo;
    
-   TRC2(cmUnpkSchMacUlSpsResetReq)
-
-   if(cmUnpkPtr((PTR *)&ulSpsResetInfo, mBuf) != ROK)
+   if(oduUnpackPointer((PTR *)&ulSpsResetInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, ulSpsResetInfo));
+   return ((*func)(pst, ulSpsResetInfo));
 } /* end of cmUnpkSchMacUlSpsResetReq */
 
 
@@ -1182,14 +1138,14 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacSpsLcDeregReq
+S16 cmPkSchMacSpsLcDeregReq
 (
 Pst*                 pst,
 CmLteCellId          cellId,
 CmLteRnti            crnti
 )
 #else
-PUBLIC S16 cmPkSchMacSpsLcDeregReq(pst, cellId, crnti)
+S16 cmPkSchMacSpsLcDeregReq(pst, cellId, crnti)
 Pst*                 pst;
 CmLteCellId          cellId;
 CmLteRnti            crnti;
@@ -1197,17 +1153,15 @@ CmLteRnti            crnti;
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacSpsLcDeregReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    CMCHKPK(cmPkLteCellId, cellId, mBuf);
    CMCHKPK(cmPkLteRnti, crnti, mBuf);
 
    pst->event = (Event) EVTINFSPSLCDEREG;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacSpsLcDeregReq */
 
 /**
@@ -1224,14 +1178,14 @@ CmLteRnti            crnti;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacSpsLcDeregReq
+S16 cmUnpkSchMacSpsLcDeregReq
 (
 SpsLcDereg     func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacSpsLcDeregReq(func, pst, mBuf)
+S16 cmUnpkSchMacSpsLcDeregReq(func, pst, mBuf)
 SpsLcDereg     func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1240,13 +1194,11 @@ Buffer         *mBuf;
    CmLteCellId  cellId;
    CmLteRnti    crnti;
    
-   TRC2(cmUnpkSchMacSpsLcDeregReq)
-
    CMCHKUNPK(cmUnpkLteRnti, &crnti, mBuf);
    CMCHKUNPK(cmUnpkLteCellId, &cellId, mBuf);
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, cellId, crnti));
+   return ((*func)(pst, cellId, crnti));
 } /* end of cmUnpkSchMacSpsLcDeregReq */
 
 #endif /* LTEMAC_SPS */
@@ -1265,32 +1217,30 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacL2MeasReq
+S16 cmPkSchMacL2MeasReq
 (
 Pst*                 pst,
 RgInfL2MeasReq      *measInfo
 )
 #else
-PUBLIC S16 cmPkSchMacL2MeasReq(pst, measInfo)
+S16 cmPkSchMacL2MeasReq(pst, measInfo)
 Pst*                 pst;
 RgInfL2MeasReq      *measInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFL2MEASREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacL2MeasReq */
 
 /**
@@ -1306,32 +1256,30 @@ RgInfL2MeasReq      *measInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacL2MeasStopReq
+S16 cmPkSchMacL2MeasStopReq
 (
 Pst*                 pst,
 RgInfL2MeasStopReq *measInfo
 )
 #else
-PUBLIC S16 cmPkSchMacL2MeasStopReq(pst, measInfo)
+S16 cmPkSchMacL2MeasStopReq(pst, measInfo)
 Pst*                 pst;
 RgInfL2MeasStopReq *measInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasStopReq)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-       RETVALUE(RFAILED);
+       return RFAILED;
   }
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFL2MEASSTOPREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacL2MeasStopReq */
 /**
 * @brief Primitive from SCH to MAC for L2 Measurement
@@ -1346,32 +1294,31 @@ RgInfL2MeasStopReq *measInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkSchMacL2MeasSendReq
+S16 cmPkSchMacL2MeasSendReq
 (
 Pst*                 pst,
 RgInfL2MeasSndReq *measInfo
 )
 #else
-PUBLIC S16 cmPkSchMacL2MeasSendReq(pst, measInfo)
+S16 cmPkSchMacL2MeasSendReq(pst, measInfo)
 Pst*                 pst;
 RgInfL2MeasSndReq *measInfo;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasSendReq)
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-       RETVALUE(RFAILED);
+   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+       return RFAILED;
   }
 
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFL2MEASSENDREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkSchMacL2MeasSendReq */
 
 /**
@@ -1388,14 +1335,14 @@ RgInfL2MeasSndReq *measInfo;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacL2MeasReq
+S16 cmUnpkSchMacL2MeasReq
 (
 L2MeasReq      func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacL2MeasReq(func, pst, mBuf)
+S16 cmUnpkSchMacL2MeasReq(func, pst, mBuf)
 L2MeasReq      func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1403,16 +1350,14 @@ Buffer         *mBuf;
 {
    RgInfL2MeasReq      measInfo;
    
-   TRC2(cmUnpkSchMacL2MeasReq)
-
    if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &measInfo));
+   return ((*func)(pst, &measInfo));
 } /* end of cmUnpkSchMacL2MeasReq */
 
 /**
@@ -1429,14 +1374,14 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacL2MeasStopReq
+S16 cmUnpkSchMacL2MeasStopReq
 (
 L2MeasStopReq func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacL2MeasStopReq(func, pst, mBuf)
+S16 cmUnpkSchMacL2MeasStopReq(func, pst, mBuf)
 L2MeasStopReq      func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1444,15 +1389,14 @@ Buffer         *mBuf;
 {
    RgInfL2MeasStopReq measInfo;
 
-   TRC2(cmUnpkSchMacL2MeasStopReq)
    if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    SPutMsg(mBuf);
-   RETVALUE((*func)(pst, &measInfo));
+   return ((*func)(pst, &measInfo));
 } /* end of cmUnpkSchMacL2MeasReq */
 /**
 * @brief Primitive from SCH to MAC for L2 Measurement request
@@ -1468,14 +1412,14 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkSchMacL2MeasSendReq
+S16 cmUnpkSchMacL2MeasSendReq
 (
 L2MeasSendReq      func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkSchMacL2MeasSendReq(func, pst, mBuf)
+S16 cmUnpkSchMacL2MeasSendReq(func, pst, mBuf)
 L2MeasSendReq func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1483,15 +1427,14 @@ Buffer         *mBuf;
 {
    RgInfL2MeasSndReq measInfo;
 
-   TRC2(cmUnpkSchMacL2MeasSendReq)
  if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)  
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    SPutMsg(mBuf);
-   RETVALUE((*func)(pst, &measInfo));
+   return ((*func)(pst, &measInfo));
 } /* end of cmUnpkSchMacL2MeasSendReq*/
 
 /**
@@ -1507,33 +1450,31 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchL2MeasCfm
+S16 cmPkMacSchL2MeasCfm
 (
 Pst*                 pst,
 RgInfL2MeasCfm       *measCfm
 )
 #else
-PUBLIC S16 cmPkMacSchL2MeasCfm(pst, measCfm)
+S16 cmPkMacSchL2MeasCfm(pst, measCfm)
 Pst*                 pst;
 RgInfL2MeasCfm       *measCfm;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchL2MeasCfm)
-
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if(SAddPstMsgMult((Data *)measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFL2MEASCFM;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 } /* end of cmPkMacSchL2MeasCfm */
 
 
@@ -1550,32 +1491,31 @@ RgInfL2MeasCfm       *measCfm;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmPkMacSchL2MeasStopCfm
+S16 cmPkMacSchL2MeasStopCfm
 (
 Pst*                 pst,
 RgInfL2MeasCfm       *measCfm
 )
 #else
-PUBLIC S16 cmPkMacSchL2MeasStopCfm(pst, measCfm)
+S16 cmPkMacSchL2MeasStopCfm(pst, measCfm)
 Pst*                 pst;
 RgInfL2MeasCfm       *measCfm;
 #endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchL2MeasStopCfm)
  if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if(SAddPstMsgMult((Data *)measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    pst->event = (Event) EVTINFL2MEASSTOPCFM;
-   RETVALUE(SPstTsk(pst,mBuf));
+   return (SPstTsk(pst,mBuf));
 }/*cmPkMacSchL2MeasStopCfm*/
 /**
 * @brief Primitive from MAC to SCH for L2 Measurement Cfm
@@ -1591,14 +1531,14 @@ RgInfL2MeasCfm       *measCfm;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchL2MeasCfm
+S16 cmUnpkMacSchL2MeasCfm
 (
 L2MeasCfm      func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchL2MeasCfm(func, pst, mBuf)
+S16 cmUnpkMacSchL2MeasCfm(func, pst, mBuf)
 L2MeasCfm      func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1606,16 +1546,14 @@ Buffer         *mBuf;
 {
    RgInfL2MeasCfm      measCfm;
    
-   TRC2(cmUnpkMacSchL2MeasCfm)
-
    if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    RGSCHINF_FREE_MSG(mBuf);
-   RETVALUE((*func)(pst, &measCfm));
+   return ((*func)(pst, &measCfm));
 } /* end of cmUnpkMacSchL2MeasCfm */
 
 /**
@@ -1632,14 +1570,14 @@ Buffer         *mBuf;
 *      -# ROK
 **/
 #ifdef ANSI
-PUBLIC S16 cmUnpkMacSchL2MeasStopCfm
+S16 cmUnpkMacSchL2MeasStopCfm
 (
 L2MeasCfm      func,
 Pst            *pst,
 Buffer         *mBuf
 )
 #else
-PUBLIC S16 cmUnpkMacSchL2MeasStopCfm(func, pst, mBuf)
+S16 cmUnpkMacSchL2MeasStopCfm(func, pst, mBuf)
 L2MeasCfm      func;
 Pst            *pst;
 Buffer         *mBuf;
@@ -1647,16 +1585,14 @@ Buffer         *mBuf;
 {
 RgInfL2MeasCfm      measCfm;
 
-   TRC2(cmUnpkMacSchL2MeasStopCfm)
-
    if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
       SPutMsg(mBuf);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    SPutMsg(mBuf);
-   RETVALUE((*func)(pst, &measCfm));
+   return ((*func)(pst, &measCfm));
 } /* end of cmUnpkMacSchL2MeasStopCfm */
 
 #endif/* LTE_L2_MEAS */