U8, U16, U32 data type changes
[o-du/l2.git] / src / 5gnrsch / rg_sch_ram.c
index ad27fe0..703b4e8 100755 (executable)
@@ -37,18 +37,7 @@ static int RLOG_MODULE_ID=4096;
 static int RLOG_FILE_ID=171;
 
 /* header include files (.h) */
-#include "envopt.h"        /* environment options */
-#include "envdep.h"        /* environment dependent */
-#include "envind.h"        /* environment independent */
-  
-#include "gen.h"           /* general */
-#include "ssi.h"           /* system services */
-
-#include "cm_tkns.h"       /* Common Token Defines */
-#include "cm_llist.h"      /* Common Link List Defines */
-#include "cm_hash.h"       /* Common Hash List Defines */
-#include "cm_mblk.h"       /* common memory link list library */
-#include "cm_lte.h"        /* Common LTE */
+#include "common_def.h"
 
 #include "rg_env.h"        /* MAC Environment Defines */
 #include "rgr.h"           /* RGR Interface defines */
@@ -64,15 +53,6 @@ static int RLOG_FILE_ID=171;
 #include "rl_common.h"
 
 /* header/extern include files (.x) */
-#include "gen.x"           /* general */
-#include "ssi.x"           /* system services */
-#include "cm5.x"           /* Timer */
-#include "cm_tkns.x"       /* Common Token Definitions */
-#include "cm_llist.x"      /* Common Link List Definitions */
-#include "cm_lib.x"        /* Common Library Definitions */
-#include "cm_hash.x"       /* Common Hash List Definitions */
-#include "cm_mblk.x"       /* common memory link list library */
-#include "cm_lte.x"        /* Common LTE */
 
 #include "rgr.x"           /* RGR Interface includes */
 #include "rgm.x"           /* RGR Interface includes */
@@ -152,18 +132,17 @@ EXTERN Void rgSCHChkEmtcContResTmrExp ARGS((RgSchCellCb        *cell));
  *      -# RFAILED
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamVldtUeCfg 
+S16 rgSCHRamVldtUeCfg 
 (
 RgSchCellCb  *cell,
 RgrUeCfg     *ueCfg
 )
 #else
-PUBLIC S16 rgSCHRamVldtUeCfg(cell, ueCfg)
+S16 rgSCHRamVldtUeCfg(cell, ueCfg)
 RgSchCellCb  *cell;
 RgrUeCfg     *ueCfg;
 #endif
 {
-   TRC2(rgSCHRamVldtUeCfg);
    if (ueCfg->dedPreambleId.pres == PRSNT_NODEF)
    {
       if ((ueCfg->dedPreambleId.val < cell->rachCfg.numRaPreamble) ||
@@ -178,10 +157,10 @@ RgrUeCfg     *ueCfg;
 #endif          
           )
       {
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /**
@@ -205,9 +184,9 @@ RgrUeCfg     *ueCfg;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamProcRaReq
+S16 rgSCHRamProcRaReq
 (
-U8                raReqCnt,
+uint8_t                raReqCnt,
 RgSchCellCb       *cell,
 CmLteRnti         raRnti,
 TfuRachInfo       *raReqInd,
@@ -216,8 +195,8 @@ RgSchUeCb         *ue,
 RgSchErrInfo      *err
 )
 #else
-PUBLIC S16 rgSCHRamProcRaReq(raReqCnt, cell, raRnti, raReqInd, timingInfo, ue, err)
-U8                raReqCnt;
+S16 rgSCHRamProcRaReq(raReqCnt, cell, raRnti, raReqInd, timingInfo, ue, err)
+uint8_t                raReqCnt;
 RgSchCellCb       *cell;
 CmLteRnti         raRnti;
 TfuRachInfo       *raReqInd;
@@ -227,13 +206,12 @@ RgSchErrInfo      *err;
 #endif
 {
    RgSchRaReqInfo *raReqInfo;
-   U16            raIndex;
+   uint16_t            raIndex;
 #ifdef LTE_TDD
-   U8             fid;
-   U8             tid;
+   uint8_t             fid;
+   uint8_t             tid;
 #endif
 
-   TRC2(rgSCHRamProcRaReq)
 
 
       /* SR_RACH_STATS : RACH REQ */
@@ -264,7 +242,7 @@ RgSchErrInfo      *err;
       RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
                "RARNTI:%d rgSCHTomRaReqInd(): RAM processing failed errType(%d) ",
                raReqInd->raRnti);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* SR_RACH_STATS : DED PREAMB*/
@@ -295,7 +273,7 @@ RgSchErrInfo      *err;
       RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamProcRaReq(): Allocation"
             " of RaReq failed RARNTI:%d",raRnti);
       err->errCause = RGSCHERR_RAM_MEM_EXHAUST;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* Insert the given raReqInfo */
@@ -322,7 +300,7 @@ RgSchErrInfo      *err;
       cmLListAdd2Tail(&cell->raInfo.raReqLst[raIndex], &raReqInfo->raReqLstEnt);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamProcRaReq */
 
 /**
@@ -342,14 +320,14 @@ RgSchErrInfo      *err;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamCreateRaCb
+S16 rgSCHRamCreateRaCb
 (
 RgSchCellCb       *cell,
 RgSchRaCb         **raCb,
 RgSchErrInfo      *err
 )
 #else
-PUBLIC S16 rgSCHRamCreateRaCb(cell, raCb, err)
+S16 rgSCHRamCreateRaCb(cell, raCb, err)
 RgSchCellCb       *cell;
 RgSchRaCb         **raCb;
 RgSchErrInfo      *err;
@@ -358,7 +336,6 @@ RgSchErrInfo      *err;
    RgSchRntiLnk *rntiLnk;
    Inst         inst = cell->instIdx;
 
-   TRC2(rgSCHRamCreateRaCb)
 
    if((rgSCHUtlAllocSBuf(inst, (Data **)(raCb),
                       sizeof(RgSchRaCb))) == RFAILED)
@@ -366,7 +343,7 @@ RgSchErrInfo      *err;
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamCreateRaCb(): Allocation of "
          "RaCb failed");
       err->errCause = RGSCHERR_RAM_MEM_EXHAUST;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    rntiLnk = rgSCHDbmGetRnti(cell);
@@ -388,7 +365,7 @@ RgSchErrInfo      *err;
       for proper NULLP assignment*/
       rgSCHUtlFreeSBuf(inst, (Data **)(raCb), sizeof(RgSchRaCb));
       err->errCause = RGSCHERR_RAM_RNTI_EXHAUST;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* Allocate and initialize the DL HARQ portion of the RACB */
@@ -402,7 +379,7 @@ RgSchErrInfo      *err;
       for proper NULLP assignment*/
       rgSCHUtlFreeSBuf(inst, (Data **)(raCb), sizeof(RgSchRaCb));
       err->errCause = RGSCHERR_RAM_MEM_EXHAUST;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #ifdef EMTC_ENABLE
    (*raCb)->isEmtcRaCb = FALSE;
@@ -419,7 +396,7 @@ RgSchErrInfo      *err;
    (*raCb)->raCbLnk.node = (PTR)(*raCb);
    cmLListAdd2Tail(&cell->raInfo.raCbLst, &(*raCb)->raCbLnk);
    
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamCreateRaCb */
 
 /**
@@ -445,7 +422,7 @@ RgSchErrInfo      *err;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamRgrUeCfg
+S16 rgSCHRamRgrUeCfg
 (
 RgSchCellCb    *cell,
 RgSchUeCb      *ue,
@@ -453,7 +430,7 @@ RgSchRaCb      *raCb,
 RgSchErrInfo   *err
 )
 #else
-PUBLIC S16 rgSCHRamRgrUeCfg(cell, ue, raCb, err)
+S16 rgSCHRamRgrUeCfg(cell, ue, raCb, err)
 RgSchCellCb    *cell;
 RgSchUeCb      *ue;
 RgSchRaCb      *raCb;
@@ -462,10 +439,9 @@ RgSchErrInfo   *err;
 {
    /* Releasing HARQ processes of old UE when ue
     *           reconfig with new crnti */
-  /* U32 cnt; */
+  /* uint32_t cnt; */
    RgSchDlHqEnt          **hqEnt = &(RG_SCH_CMN_GET_UE_HQE(ue, cell));
    RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
-   TRC2(rgSCHRamRgrUeCfg)
 
 
    /* Fix : set UE inactive in DL until UE is reinitialization completed */
@@ -494,10 +470,10 @@ RgSchErrInfo   *err;
       err->errCause = RGSCHERR_RAM_NO_MSG3_RCVD;
       *hqEnt = NULLP;
       raCb->dlHqE->ue = NULLP;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamRgrUeCfg */
 
 
@@ -537,7 +513,6 @@ RgSchErrInfo *err;
 {
    TfuUlCqiRpt   ulCqiRpt;
    RgSchCmnCell  *cellSch= (RgSchCmnCell *)(cell->sc.sch);
-   TRC2(rgSCHRamContResCrnti)
 
 
    /* Fix: syed It is incorrect to copy over msg3HqProc to ueCb's 
@@ -566,7 +541,7 @@ RgSchErrInfo *err;
    /* No need of raCb any more */
    rgSCHRamDelRaCb(cell, raCb, TRUE);
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamContResCrnti */
 
 
@@ -602,14 +577,13 @@ RgSchRaCb *raCb;
    CmLteTimingInfo expTime = {0}; 
    RgSchCmnCell  *cellSch  = RG_SCH_CMN_GET_CELL(cell);
 #endif
-   TRC2(rgSCHRamContResCcchsdu)
    if(raCb->raState != RGSCH_RA_MSG3_PENDING)
    {
       RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
                "RNTI:%d RaCb in wrong State %d Drop Msg 3",
                raCb->rntiLnk->rnti, 
                raCb->raState);
-      RETVALUE(ROK);
+      return ROK;
    }
 
    raCb->raState = RGSCH_RA_MSG4_PENDING;
@@ -631,7 +605,7 @@ RgSchRaCb *raCb;
       raCb->contResTmrLnk.node = (PTR)(raCb);
       cmLListAdd2Tail(&(cell->contResGrdTmrLst), &(raCb->contResTmrLnk));
 #endif
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamContResCcchsdu */
 
 
@@ -653,7 +627,7 @@ RgSchRaCb *raCb;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamProcMsg3
+S16 rgSCHRamProcMsg3
 (
 RgSchCellCb     *cell,
 RgSchUeCb       *ue,
@@ -662,7 +636,7 @@ RgInfUeDatInd   *pdu,
 RgSchErrInfo    *err
 )
 #else
-PUBLIC S16 rgSCHRamProcMsg3(cell, ue, raCb, pdu, err)
+S16 rgSCHRamProcMsg3(cell, ue, raCb, pdu, err)
 RgSchCellCb     *cell;
 RgSchUeCb       *ue;
 RgSchRaCb       *raCb;
@@ -670,7 +644,6 @@ RgInfUeDatInd   *pdu;
 RgSchErrInfo    *err;
 #endif
 {
-   TRC2(rgSCHRamProcMsg3)
 
 
    /* Update raCb with PHR if received along with Msg3 */ 
@@ -699,7 +672,7 @@ RgSchErrInfo    *err;
       }
    } 
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamProcMsg3 */
 
 
@@ -719,23 +692,22 @@ RgSchErrInfo    *err;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamUpdtBo
+S16 rgSCHRamUpdtBo
 (
 RgSchCellCb       *cell,
 RgSchRaCb         *raCb,
 RgInfCmnBoRpt     *staRsp
 )
 #else
-PUBLIC S16 rgSCHRamUpdtBo(cell, raCb, staRsp)
+S16 rgSCHRamUpdtBo(cell, raCb, staRsp)
 RgSchCellCb       *cell;
 RgSchRaCb         *raCb;
 RgInfCmnBoRpt     *staRsp;
 #endif
 {
-   TRC2(rgSCHRamUpdtBo)
 
    /* Update Bo in RaCb */
-   raCb->dlCcchInfo.bo = (U32)(staRsp->bo);
+   raCb->dlCcchInfo.bo = (uint32_t)(staRsp->bo);
    /* SR_RACH_STATS : MSG4 WITH CCCH SDU */
    rgNumMsg4WithCCCHSdu++;
 
@@ -744,7 +716,7 @@ RgInfCmnBoRpt     *staRsp;
    rgSCHRamAddToRaInfoSchdLst(cell, raCb);
    /* MSG4 Fix  End */      
    
-   RETVALUE(ROK);
+   return ROK;
 } /* rgSCHRamUpdtBo */
 
 /**
@@ -763,23 +735,22 @@ RgInfCmnBoRpt     *staRsp;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamMsg3DatInd
+S16 rgSCHRamMsg3DatInd
 (
 RgSchRaCb      *raCb
 )
 #else
-PUBLIC S16 rgSCHRamMsg3DatInd(raCb)
+S16 rgSCHRamMsg3DatInd(raCb)
 RgSchRaCb      *raCb;
 #endif
 {
-   TRC2(rgSCHRamMsg3DatInd)
 
    /* SR_RACH_STATS : MSG3 ACK*/
    rgNumMsg3CrcPassed++;
    /*ccpu00128820 - MOD - Msg3 alloc double delete issue*/
    rgSCHUhmProcMsg3DatInd(&(raCb->msg3HqProc));
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamMsg3DatInd */
 
 /**
@@ -798,21 +769,20 @@ RgSchRaCb      *raCb;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamMsg3FailureInd
+S16 rgSCHRamMsg3FailureInd
 (
 RgSchRaCb      *raCb
 )
 #else
-PUBLIC S16 rgSCHRamMsg3FailureInd(raCb)
+S16 rgSCHRamMsg3FailureInd(raCb)
 RgSchRaCb      *raCb;
 #endif
 {
-   TRC2(rgSCHRamMsg3FailureInd)
 
    /*ccpu00128820 - MOD - Msg3 alloc double delete issue*/
    rgSCHUhmProcMsg3Failure(&(raCb->msg3HqProc));
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamMsg3FailureInd */
 
 /**
@@ -831,18 +801,17 @@ RgSchRaCb      *raCb;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamMsg4FdbkInd
+S16 rgSCHRamMsg4FdbkInd
 (
 RgSchRaCb      *raCb
 )
 #else
-PUBLIC S16 rgSCHRamMsg4FdbkInd(raCb)
+S16 rgSCHRamMsg4FdbkInd(raCb)
 RgSchRaCb      *raCb;
 #endif
 {
-   TRC2(rgSCHRamMsg4FdbkInd)
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamMsg4FdbkInd */
 
 
@@ -864,18 +833,17 @@ RgSchRaCb      *raCb;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamMsg4Done
+S16 rgSCHRamMsg4Done
 (
 RgSchCellCb    *cell,
 RgSchRaCb      *raCb
 )
 #else
-PUBLIC S16 rgSCHRamMsg4Done(cell, raCb)
+S16 rgSCHRamMsg4Done(cell, raCb)
 RgSchCellCb    *cell;
 RgSchRaCb      *raCb;
 #endif
 {
-   TRC2(rgSCHRamMsg4Done)
 
    RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
             "rgSCHRamMsg4Done(): tmpCRNTI = %u",
@@ -936,7 +904,7 @@ RgSchRaCb      *raCb;
       rgSCHDhmRlsHqpTb(raCb->dlHqE->msg4Proc, 0, TRUE);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamMsg4Done */
 
 
@@ -958,14 +926,14 @@ RgSchRaCb      *raCb;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamDelRaCb
+S16 rgSCHRamDelRaCb
 (
 RgSchCellCb *cell,
 RgSchRaCb   *raCb,
 Bool        rlsRnti
 )
 #else
-PUBLIC S16 rgSCHRamDelRaCb(cell, raCb, rlsRnti)
+S16 rgSCHRamDelRaCb(cell, raCb, rlsRnti)
 RgSchCellCb *cell;
 RgSchRaCb   *raCb;
 Bool        rlsRnti;
@@ -973,7 +941,6 @@ Bool        rlsRnti;
 {
    Inst         inst = cell->instIdx;
    Bool         isEmtc = FALSE;
-   TRC2(rgSCHRamDelRaCb)
  
     /* Delete from all the lists it is enqueued */
     cmLListDelFrm(&(cell->raInfo.raCbLst),&(raCb->raCbLnk));
@@ -1062,7 +1029,7 @@ Bool        rlsRnti;
 #endif
    rgSCHUtlFreeSBuf(inst, (Data **)&raCb, sizeof(RgSchRaCb));
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgSCHRamDelRaCb */
 
 
@@ -1086,32 +1053,31 @@ Bool        rlsRnti;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamTtiHndlr
+S16 rgSCHRamTtiHndlr
 (
 RgSchCellCb  *cell
 )
 #else
-PUBLIC S16 rgSCHRamTtiHndlr(cell)
+S16 rgSCHRamTtiHndlr(cell)
 RgSchCellCb  *cell;
 #endif
 {
    RgSchRaCb   *raCb;
-   U16         raSfn;
-   U16         crntSfn;
-   U16         dist;       /* Number of frames between raCb's creation and crnt
+   uint16_t         raSfn;
+   uint16_t         crntSfn;
+   uint16_t         dist;       /* Number of frames between raCb's creation and crnt
                               frame */
-   U8          idx;
-   U32         maxCnt;
+   uint8_t          idx;
+   uint32_t         maxCnt;
 #ifndef LTE_TDD
-   U8          winGap;        
-   U8          raIdx;
+   uint8_t          winGap;        
+   uint8_t          raIdx;
    RgSchRaReqInfo *raReqInfo;
 #else
    CmLteTimingInfo      frm;
-   U8                   raIdx;
+   uint8_t                   raIdx;
 #endif
 
-   TRC2(rgSCHRamTtiHndlr)
 
    crntSfn = cell->crntTime.sfn;
   
@@ -1134,7 +1100,7 @@ RgSchCellCb  *cell;
    winGap = (rgRaPrmblToRaFrmTbl[cell->rachCfg.preambleFormat]-1)+ 
       (cell->rachCfg.raWinSize -1 ) + RGSCH_RARSP_WAIT_PERIOD;   
  
-   raIdx = (((crntSfn & 1) * RGSCH_MAX_RA_RNTI+ cell->crntTime.subframe 
+   raIdx = (((crntSfn & 1) * RGSCH_MAX_RA_RNTI+ cell->crntTime.slot 
             + RG_SCH_CMN_DL_DELTA - winGap)+ RGSCH_RAREQ_ARRAY_SIZE ) 
            % RGSCH_RAREQ_ARRAY_SIZE;
 
@@ -1154,10 +1120,10 @@ RgSchCellCb  *cell;
    /* Fixes for RACH handling: Added deletion of queued RaReq */
    frm   = cell->crntTime;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
-   if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe] !=
+   if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot] !=
                      RG_SCH_TDD_UL_SUBFRAME)
    {
-      raIdx = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe]-1;
+      raIdx = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot]-1;
       rgSCHRamDelRaReq(cell, cell->crntTime, raIdx);
    }
 #endif
@@ -1166,7 +1132,7 @@ RgSchCellCb  *cell;
    /* ccpu00132536:MOD- racb timeout will be verified in each SFN such that 
     * the RACB whose processing is not completed in RG_MAX_RA_PRC_FRM
     * will be deleted*/
-   if (cell->crntTime.subframe == 0)
+   if (cell->crntTime.slot == 0)
    {
       maxCnt = cell->raInfo.raCbLst.count;
       for (idx = 0; idx < maxCnt; idx++)
@@ -1196,7 +1162,7 @@ RgSchCellCb  *cell;
       }
    }
    
-   RETVALUE(ROK)
+   return ROK
 }  /* rgSCHRamTtiHndlr */
 
 
@@ -1216,28 +1182,27 @@ RgSchCellCb  *cell;
  *      -# ROK 
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamFreeCell
+S16 rgSCHRamFreeCell
 (
 RgSchCellCb    *cell
 )
 #else
-PUBLIC S16 rgSCHRamFreeCell(cell)
+S16 rgSCHRamFreeCell(cell)
 RgSchCellCb    *cell;
 #endif
 {
    RgSchRaReqInfo  *raReqInfo;
    RgSchRaCb       *raCb;
-   U8              idx;
-   U8              raCbCnt;
+   uint8_t              idx;
+   uint8_t              raCbCnt;
    Inst            inst = cell->instIdx;
-   U8              lstSz;
+   uint8_t              lstSz;
 #ifdef LTE_TDD
-   U8              maxUlSubframes;
-   U8              maxDlSubframes;
+   uint8_t              maxUlSubframes;
+   uint8_t              maxDlSubframes;
 #endif
 
 
-   TRC2(rgSCHRamFreeCell)
 
 
 #ifdef LTE_TDD
@@ -1302,7 +1267,7 @@ RgSchCellCb    *cell;
       rgSCHRamDelRaCb(cell, raCb, TRUE);
    }
 
-   RETVALUE(ROK)
+   return ROK
 } /* rgSCHRamFreeCell */
 #ifdef RGR_V1
 #ifdef ANSI
@@ -1317,7 +1282,6 @@ RgSchCellCb *cell;
 RgSchRaCb  *raCb;
 #endif
 {
-   TRC2(rgSCHRamProcContResExp);
    raCb->expiryTime.sfn = RGSCH_CONTRES_EXP;
    /*MSG4 Fix*/
    if (raCb->ue)
@@ -1332,7 +1296,7 @@ RgSchRaCb  *raCb;
       /* Delete RACB and release RNTI */
       rgSCHRamDelRaCb(cell, raCb, TRUE);
    }
-   RETVOID;
+   return;
 }
 
 #ifdef ANSI
@@ -1347,7 +1311,6 @@ RgSchCellCb  *cell;
 RgSchRaCb  *raCb;
 #endif
 {
-   TRC2(rgSCHRamProcContResGrdExp)
 
 
 /*Guard timer has expired, schedule only the contention REsolution CE with 
@@ -1368,7 +1331,7 @@ RgSchRaCb  *raCb;
             raCb->rntiLnk->rnti);   
    rgSCHRamAddToRaInfoSchdLst(cell, raCb);
    /* MSG4 Fix End */    
-   RETVOID;
+   return;
    
 }
 /**
@@ -1398,7 +1361,6 @@ RgSchCellCb        *cell;
    CmLList         *chkLnk    = NULLP;
    RgSchRaCb       *raCb = NULLP;
    
-   TRC2(rgSCHChkContResTmrExp)
       
    chkLnk = cmLListFirst(&(cell->contResTmrLst));
    
@@ -1445,7 +1407,6 @@ RgSchCellCb        *cell;
    CmLList         *chkLnk    = NULLP;
    RgSchRaCb       *raCb = NULLP;
    
-   TRC2(rgSCHChkContResGrdTmrExp)
       
    chkLnk = cmLListFirst(&(cell->contResGrdTmrLst));
    
@@ -1480,36 +1441,35 @@ RgSchCellCb        *cell;
  *
  *  @param[in,out] RgSchCellCb      *cell
  *  @param[in]     CmLteTimingInfo  timingInfo
- *  @param[in]     U8               raIdx
+ *  @param[in]     uint8_t               raIdx
  *  @return  S16
  *      -# ROK
  **/
 #ifdef ANSI
-PUBLIC S16 rgSCHRamDelRaReq
+S16 rgSCHRamDelRaReq
 (
 RgSchCellCb          *cell,
 CmLteTimingInfo      timingInfo,
-U8                   raIdx
+uint8_t                   raIdx
 )
 #else
-PUBLIC S16 rgSCHRamDelRaReq(cell, timingInfo, raIdx)
+S16 rgSCHRamDelRaReq(cell, timingInfo, raIdx)
 RgSchCellCb          *cell;
 CmLteTimingInfo      timingInfo;
-U8                   raIdx;
+uint8_t                   raIdx;
 #endif
 {
-   U8                   subfrmIdx;
+   uint8_t                   subfrmIdx;
    RgSchTddRachRspLst   *rachRsp;
-   U16                   sfnIdx;
+   uint16_t                   sfnIdx;
    S16                  calcSfn;
-   U8                   subfrm;
+   uint8_t                   subfrm;
    RgSchRaReqInfo       *raReqInfo;
-   U8                   idx;
-   U8                   i;
-   U8                   raRntiIdx;
+   uint8_t                   idx;
+   uint8_t                   i;
+   uint8_t                   raRntiIdx;
    CmLteRnti            raRnti;
 
-   TRC2(rgSCHRamDelRaReq)
 
 
    rachRsp = &cell->rachRspLst[raIdx];
@@ -1554,19 +1514,19 @@ U8                   raIdx;
       }
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif
 
 /*MSG4 Fix Start */
 #ifdef ANSI
-PUBLIC S16 rgSCHRamAddToRaInfoSchdLst
+S16 rgSCHRamAddToRaInfoSchdLst
 (
 RgSchCellCb       *cell,
 RgSchRaCb         *raCb
 )
 #else
-PUBLIC S16 rgSCHRamAddToRaInfoSchdLst(cell, raCb)
+S16 rgSCHRamAddToRaInfoSchdLst(cell, raCb)
 RgSchCellCb       *cell;
 RgSchRaCb         *raCb;
 #endif
@@ -1574,7 +1534,6 @@ RgSchRaCb         *raCb;
    CmLteTimingInfo expTime ={0};
    RgSchCmnCell    *cellSch =  RG_SCH_CMN_GET_CELL(cell);
 
-   TRC2(rgSCHRamAddToRaInfoSchdLst)
 
    /*Fix: This can be called even when guard timer is not expired. 
        * In this case CR timer expiry should be guard timer expiry time + Guard timer time*/
@@ -1584,30 +1543,29 @@ RgSchRaCb         *raCb;
    cmLListAdd2Tail(&(cell->raInfo.toBeSchdLst), &(raCb->schdLnk));
    raCb->contResTmrLnk.node = (PTR)(raCb);
    cmLListAdd2Tail(&(cell->contResTmrLst), &(raCb->contResTmrLnk));
-   RETVALUE(ROK);
+   return ROK;
 } /* rgSCHRamAddToRaInfoSchdLst */
 
 
 
 #ifdef ANSI
-PUBLIC S16 rgSCHRamRmvFrmRaInfoSchdLst
+S16 rgSCHRamRmvFrmRaInfoSchdLst
 (
 RgSchCellCb       *cell,
 RgSchRaCb         *raCb
 )
 #else
-PUBLIC S16 rgSCHRamRmvFrmRaInfoSchdLst(cell, raCb)
+S16 rgSCHRamRmvFrmRaInfoSchdLst(cell, raCb)
 RgSchCellCb       *cell;
 RgSchRaCb         *raCb;
 #endif
 {
-   TRC2(rgSCHRamRmvFrmRaInfoSchdLst)
 
    cmLListDelFrm(&(cell->raInfo.toBeSchdLst), &(raCb->schdLnk));
    raCb->schdLnk.node = NULLP;   
    cmLListDelFrm(&(cell->contResTmrLst), &(raCb->contResTmrLnk));
    raCb->contResTmrLnk.node = NULLP;
-   RETVALUE(ROK);
+   return ROK;
 } /* rgSCHRamRmvFrmRaInfoSchdLst */
 
 /*MSG4 Fix End*/
@@ -1643,14 +1601,13 @@ RgSchCellCb     *cell;
 Bool            isEmtc;
 #endif
 {
-   TRC2(rgSCHRamUlFreeAllocation);
 
    rgSCHUhmFreeProc(alloc->hqProc, cell);
    if(!isEmtc)
    {
       rgSCHUtlUlAllocRls(sf, alloc);
    }
-   RETVOID;
+   return;
 }
 
 /**********************************************************************