Merge "Documentation fixes"
[o-du/l2.git] / src / 5gnrmac / rg_uim.c
index 47d0982..6bdc8f0 100755 (executable)
@@ -74,10 +74,10 @@ static int RLOG_FILE_ID=178;
 /* forward references */
 
 #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
-PUBLIC S16 rgBatchProc(Void);
+S16 rgBatchProc(Void);
 #endif
-PUBLIC U8 rgRguDlSap;
-PUBLIC U8 rgRguUlSap;
+uint8_t rgRguDlSap;
+uint8_t rgRguUlSap;
 /**
  * @brief Handler for Bind request.
  *
@@ -96,14 +96,14 @@ PUBLIC U8 rgRguUlSap;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguBndReq
+S16 RgUiRguBndReq
 (
 Pst  *pst,
 SuId suId,
 SpId spId
 )
 #else
-PUBLIC S16 RgUiRguBndReq(pst, suId, spId)
+S16 RgUiRguBndReq(pst, suId, spId)
 Pst  *pst;
 SuId suId;
 SpId spId;
@@ -114,9 +114,6 @@ SpId spId;
    Pst       tmpPst;   /* Temporary Post Structure */
    RgUstaDgn dgn;      /* Alarm diagnostics structure */
 
-   TRC3(RgUiRguBndReq)
-
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 
@@ -182,7 +179,7 @@ SpId spId;
       /*T2K - Passing spId as it is required to access the SAP CB*/
       ret = rgUIMRguBndCfm(inst,spId, CM_BND_NOK);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguBndReq */
 
 
@@ -204,22 +201,20 @@ SpId spId;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguUbndReq
+S16 RgUiRguUbndReq
 (
 Pst    *pst,
 SpId   spId,
 Reason reason
 )
 #else
-PUBLIC S16 RgUiRguUbndReq(pst, spId, reason)
+S16 RgUiRguUbndReq(pst, spId, reason)
 Pst    *pst;
 SpId   spId;
 Reason reason;
 #endif
 {
    Inst      inst;
-   TRC3(RgUiRguUbndReq)
-   
 
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
@@ -248,9 +243,9 @@ Reason reason;
       RGLOGERROR(inst,ERRCLS_INT_PAR, ERG011, (ErrVal)rgCb[inst].rguSap[spId].sapCfg.spId,
             "Invalid SAP Id:RgUiRguUbndReq failed\n");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
-   RETVALUE(ROK);
+   return ROK;
 }  /* RgUiRguUbndReq */
 /**
  * @brief API for sending bind confirm from MAC to RLC
@@ -265,39 +260,36 @@ Reason reason;
  *           
  *  @param[in] Inst        inst
  *  @param[in]  SuId          suId
- *  @param[in]  U8            status
+ *  @param[in]  uint8_t            status
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMRguBndCfm
+S16 rgUIMRguBndCfm
 (
 Inst inst,
 SpId spId,
-U8 status
+uint8_t status
 )
 #else
-PUBLIC S16 rgUIMRguBndCfm(inst,spId, status)
+S16 rgUIMRguBndCfm(inst,spId, status)
 Inst          inst;
 SpId          spId;
-U8            status;
+uint8_t       status;
 #endif
 {
    S16  ret = ROK;
    
-   TRC2(rgUIMRguBndCfm)
-   
-
    ret = RgUiRguBndCfm(&rgCb[inst].rguSap[spId].sapCfg.sapPst, 
                       rgCb[inst].rguSap[spId].sapCfg.suId, status);
    if (ret != ROK)
    {
       
       RLOG0(L_ERROR,"RgUiRguBndCfm Failed ");
-      RETVALUE(ret);
+      return (ret);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMRguBndCfm*/
 
 
@@ -318,14 +310,14 @@ U8            status;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguDDatReq
+S16 RgUiRguDDatReq
 (
 Pst             *pst,
 SpId            spId,
 RguDDatReqInfo  *datReq
 )
 #else
-PUBLIC S16 RgUiRguDDatReq(pst, spId, datReq)
+S16 RgUiRguDDatReq(pst, spId, datReq)
 Pst             *pst;
 SpId            spId;
 RguDDatReqInfo  *datReq;
@@ -334,22 +326,19 @@ RguDDatReqInfo  *datReq;
    S16   ret = ROK;
    Inst  inst;
 #ifndef NO_ERRCLS 
-   U32   id;
-   U32   id1;
-   U32   id2;
-   U32   id3;
+   uint32_t   id;
+   uint32_t   id1;
+   uint32_t   id2;
+   uint32_t   id3;
 #endif
    
-   TRC3(RgUiRguDDatReq)
-
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 #ifndef NO_ERRCLS
    if (datReq == NULLP)
    {
       RLOG0(L_ERROR,"Input Message Buffer is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    
    if(rgCb[inst].rguSap[spId].sapCfg.spId == spId)
@@ -370,7 +359,7 @@ RguDDatReqInfo  *datReq;
                RG_DROP_RGUDDATREQ_MBUF(datReq->datReq[id3]);
             }
 #endif
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -385,7 +374,7 @@ RguDDatReqInfo  *datReq;
          RG_DROP_RGUDDATREQ_MBUF(datReq->datReq[id3]);
       }
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* Update RGU SAP statistics for received sdu count */
@@ -419,7 +408,7 @@ RguDDatReqInfo  *datReq;
    ret = rgROMDedDatReq(inst,datReq);
     SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq,sizeof(RguDDatReqInfo), SS_SHARABLE_MEMORY);
    datReq = NULLP;
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguDDatReq */
 
 
@@ -440,14 +429,14 @@ RguDDatReqInfo  *datReq;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguCDatReq
+S16 RgUiRguCDatReq
 (
 Pst             *pst,
 SpId            spId,
 RguCDatReqInfo  *datReq
 )
 #else
-PUBLIC S16 RgUiRguCDatReq(pst, spId, datReq)
+S16 RgUiRguCDatReq(pst, spId, datReq)
 Pst             *pst;
 SpId            spId;
 RguCDatReqInfo  *datReq;
@@ -456,16 +445,13 @@ RguCDatReqInfo  *datReq;
    Inst  inst;
    S16   ret = ROK;
    
-   TRC3(RgUiRguCDatReq)
-
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 #ifndef NO_ERRCLS
    if (datReq == NULLP)
    {
       RLOG0(L_ERROR,"Input Message Buffer is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    
    if(rgCb[inst].rguSap[spId].sapCfg.spId == spId)
@@ -480,7 +466,7 @@ RguCDatReqInfo  *datReq;
             RLOG1(L_ERROR,"Invalid SAP State:%d RgUiRguCDatReq failed",
                   rgCb[inst].rguSap[spId].sapSta.sapState);
 #endif
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -488,7 +474,7 @@ RguCDatReqInfo  *datReq;
 #if (ERRCLASS & ERRCLS_ADD_RES)      
       RLOG1(L_ERROR,"Invalid SAP Id:%d RgUiRguCDatReq failed ",spId);
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -510,7 +496,7 @@ RguCDatReqInfo  *datReq;
    }
    ret = SPutStaticBuffer(pst->region, pst->pool,(Data *)datReq,sizeof(RguCDatReqInfo) , SS_SHARABLE_MEMORY);
    datReq = NULLP;
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguCDatReq */
 
 
@@ -531,25 +517,23 @@ RguCDatReqInfo  *datReq;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguDStaRsp
+S16 RgUiRguDStaRsp
 (
 Pst             *pst,
 SpId            spId,
 RguDStaRspInfo  *staRsp
 )
 #else
-PUBLIC S16 RgUiRguDStaRsp(pst, spId, staRsp)
+S16 RgUiRguDStaRsp(pst, spId, staRsp)
 Pst             *pst;
 SpId            spId;
 RguDStaRspInfo  *staRsp;
 #endif
 {
    Inst  inst;
+   S16   ret       = ROK;
+   volatile uint32_t     startTime = 0;
 
-   S16              ret       = ROK;
-   VOLATILE U32     startTime = 0;
-
-   TRC3(RgUiRguDStaRsp)
 
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
@@ -566,7 +550,7 @@ RguDStaRspInfo  *staRsp;
 
    /*stoping Task*/
    SStopTask(startTime, PID_MAC_STA_RSP);
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguDStaRsp */
 
 
@@ -589,14 +573,14 @@ RguDStaRspInfo  *staRsp;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguCStaRsp
+S16 RgUiRguCStaRsp
 (
 Pst             *pst,
 SpId            spId,
 RguCStaRspInfo  *staRsp
 )
 #else
-PUBLIC S16 RgUiRguCStaRsp(pst, spId, staRsp)
+S16 RgUiRguCStaRsp(pst, spId, staRsp)
 Pst             *pst;
 SpId            spId;
 RguCStaRspInfo  *staRsp;
@@ -605,16 +589,13 @@ RguCStaRspInfo  *staRsp;
    Inst  inst;
    S16   ret = ROK;
 
-   TRC3(RgUiRguCStaRsp)
-   
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 #ifndef NO_ERRCLS
    if (staRsp == NULLP)
    {
       RLOG0(L_ERROR,"Input Response Buffer is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (spId == rgCb[inst].rguSap[spId].sapCfg.spId)
@@ -629,7 +610,7 @@ RguCStaRspInfo  *staRsp;
             RLOG1(L_ERROR,"Invalid SAP State:%d RgUiRguCStaRsp failed",
                   rgCb[inst].rguSap[spId].sapSta.sapState);
 #endif
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -637,7 +618,7 @@ RguCStaRspInfo  *staRsp;
 #if (ERRCLASS & ERRCLS_ADD_RES)      
       RLOG1(L_ERROR,"Invalid SAP Id:%d RgUiRguCStaRsp failed",spId);
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -645,12 +626,12 @@ RguCStaRspInfo  *staRsp;
    if (ret != ROK)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,staRsp->cellId,"Processing Of Status Response Failed");
-      RETVALUE(ret);
+      return (ret);
    }
 
    ret = SPutStaticBuffer(pst->region, pst->pool, (Data *)staRsp,sizeof(RguCStaRspInfo) , SS_SHARABLE_MEMORY);
    staRsp = NULLP;
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguCStaRsp */
 
 #ifdef LTE_L2_MEAS
@@ -672,14 +653,14 @@ RguCStaRspInfo  *staRsp;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiRguL2MUlThrpMeasReq 
+S16 RgUiRguL2MUlThrpMeasReq 
 (
 Pst             *pst,
 SpId            spId,
 RguL2MUlThrpMeasReqInfo  *measReq
 )
 #else
-PUBLIC S16 RgUiRguL2MUlThrpMeasReq(pst, spId, measReq)
+S16 RgUiRguL2MUlThrpMeasReq(pst, spId, measReq)
 Pst             *pst;
 SpId            spId;
 RguL2MUlThrpMeasReqInfo  *measReq;
@@ -689,16 +670,13 @@ RguL2MUlThrpMeasReqInfo  *measReq;
 
    S16   ret = ROK;
 
-   TRC3(RgUiRguL2MUlThrpMeasReq)
-   
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 #ifndef NO_ERRCLS
    if (measReq == NULLP)
    {
       RLOG0(L_ERROR,"Input Response Buffer is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (spId == rgCb[inst].rguSap[spId].sapCfg.spId)
@@ -713,7 +691,7 @@ RguL2MUlThrpMeasReqInfo  *measReq;
             RLOG1(L_ERROR,"Invalid SAP State:%d RgUiRguL2MUlThrpMeasReq failed",
                   rgCb[inst].rguSap[spId].sapSta.sapState);
 #endif
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -721,7 +699,7 @@ RguL2MUlThrpMeasReqInfo  *measReq;
 #if (ERRCLASS & ERRCLS_ADD_RES)      
       RLOG1(L_ERROR,"Invalid SAP Id:%d RgUiRguL2MUlThrpMeasReq failed",spId);
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -733,7 +711,7 @@ RguL2MUlThrpMeasReqInfo  *measReq;
 
   SPutStaticBuffer(pst->region, pst->pool, (Data *)measReq,sizeof(RguL2MUlThrpMeasReqInfo) , SS_SHARABLE_MEMORY);
    measReq= NULLP;
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiRguL2MUlThrpMeasReq */
 #endif
 
@@ -756,14 +734,14 @@ RguL2MUlThrpMeasReqInfo  *measReq;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMSndDedStaInd
+S16 rgUIMSndDedStaInd
 (
 Inst         inst,
 RgUpSapCb    *rguSap,
 RgRguDedStaInd  *staInd
 )
 #else
-PUBLIC S16 rgUIMSndDedStaInd(inst,rguSap,staInd)
+S16 rgUIMSndDedStaInd(inst,rguSap,staInd)
 Inst         inst;
 RgUpSapCb    *rguSap;
 RgRguDedStaInd  *staInd;
@@ -771,8 +749,6 @@ RgRguDedStaInd  *staInd;
 {
    S16  ret = ROK;
    
-   TRC2(rgUIMSndDedStaInd)
-   
    RGDBGPRM(inst,(rgPBuf(inst),"rgUIMSndDedStaInd(): staInd = %p;\n", (void *)staInd));
    
    ret = RgUiRguDStaInd(&(rguSap->sapCfg.sapPst), rguSap->sapCfg.suId, 
@@ -780,9 +756,9 @@ RgRguDedStaInd  *staInd;
    if (ret != ROK)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,staInd->cellId,"RgUiRguDStaInd Failed");
-      RETVALUE(ret);
+      return (ret);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMSndDedStaInd */
 
 
@@ -805,14 +781,14 @@ RgRguDedStaInd  *staInd;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMSndCmnStaInd
+S16 rgUIMSndCmnStaInd
 (
 Inst            inst,
 RgUpSapCb    *rguDlSap,
 RgRguCmnStaInd  *staInd
 )
 #else
-PUBLIC S16 rgUIMSndCmnStaInd(inst,rguDlSap,staInd)
+S16 rgUIMSndCmnStaInd(inst,rguDlSap,staInd)
 Inst          inst,
 RgUpSapCb    *rguDlSap,
 RgRguCmnStaInd  *staInd;
@@ -820,18 +796,14 @@ RgRguCmnStaInd  *staInd;
 {
    S16  ret = ROK;
 
-
-   TRC2(rgUIMSndCmnStaInd)
-   
-
    ret = RgUiRguCStaInd(&(rguDlSap->sapCfg.sapPst), rguDlSap->sapCfg.suId, 
          staInd);
    if (ret != ROK)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,staInd->cellId,"RgUiRguCStaInd Failed");
-      RETVALUE(ret);
+      return (ret);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMSndCmnStaInd */
 
 
@@ -854,14 +826,14 @@ RgRguCmnStaInd  *staInd;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMSndDedDatInd
+S16 rgUIMSndDedDatInd
 (
 Inst         inst,
 RgUpSapCb    *rguUlSap,
 RgRguDedDatInd  *datInd
 )
 #else
-PUBLIC S16 rgUIMSndDedDatInd(datInd)
+S16 rgUIMSndDedDatInd(datInd)
 Inst         inst;
 RgUpSapCb    *rguUlSap;
 RgRguDedDatInd  *datInd;
@@ -869,10 +841,6 @@ RgRguDedDatInd  *datInd;
 {
    S16  ret = ROK;
 
-
-   TRC2(rgUIMSndDedDatInd)
-   
-
    rguUlSap->sapSts.numPduTxmit += datInd->numLch;
 #ifndef SS_RBUF
    ret = RgUiRguDDatInd(&(rguUlSap->sapCfg.sapPst), rguUlSap->sapCfg.suId, 
@@ -880,13 +848,13 @@ RgRguDedDatInd  *datInd;
    if (ret != ROK)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"RgUiRguDdatInd Failed");
-      RETVALUE(ret);
+      return (ret);
    }
 #else
    SRngIncrWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
    SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].pktRate++;
 #endif
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMSndDedDatInd */
 
 
@@ -909,14 +877,14 @@ RgRguDedDatInd  *datInd;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMSndCmnDatInd
+S16 rgUIMSndCmnDatInd
 (
 Inst         inst,
 RgUpSapCb    *rguUlSap,
 RgRguCmnDatInd  *datInd
 )
 #else
-PUBLIC S16 rgUIMSndCmnDatInd(datInd)
+S16 rgUIMSndCmnDatInd(datInd)
 Inst         inst;
 RgUpSapCb    *rguUlSap;
 RgRguCmnDatInd  *datInd;
@@ -924,9 +892,6 @@ RgRguCmnDatInd  *datInd;
 {
    S16  ret = ROK;
 
-   TRC2(rgUIMSndCmnDatInd)
-
-
    RGDBGPRM(inst,(rgPBuf(inst),"rgUIMSndCmnDatInd(): staInd = %p;\n", (void *)datInd));
 
    rguUlSap->sapSts.numPduTxmit++;
@@ -938,9 +903,9 @@ RgRguCmnDatInd  *datInd;
    {
       RGDBGERRNEW(inst,(rgPBuf(inst),"RgUiRguCDatInd Failed\n"));
       RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"RgUiRguCDatInd Failed");
-      RETVALUE(ret);
+      return (ret);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMSndCmnDatInd */
 
 /**
@@ -963,14 +928,14 @@ RgRguCmnDatInd  *datInd;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiCrgBndReq
+S16 RgUiCrgBndReq
 (
 Pst   *pst, 
 SuId  suId,
 SpId  spId
 )
 #else
-PUBLIC S16 RgUiCrgBndReq(pst, suId, spId)
+S16 RgUiCrgBndReq(pst, suId, spId)
 Pst   *pst; 
 SuId  suId;
 SpId  spId;
@@ -981,9 +946,6 @@ SpId  spId;
    RgUstaDgn dgn;      /* Alarm diagnostics structure */
    Inst      inst;
 
-   TRC3(RgUiCrgBndReq)
-
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
 
@@ -1048,7 +1010,7 @@ SpId  spId;
 #endif
       ret = rgUIMCrgBndCfm(inst,suId, CM_BND_NOK);
    }
-   RETVALUE(ret);
+   return (ret);
 }  /* RgUiCrgBndReq */
 
 
@@ -1071,22 +1033,20 @@ SpId  spId;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiCrgUbndReq
+S16 RgUiCrgUbndReq
 (
 Pst    *pst,
 SpId   spId,
 Reason reason
 )
 #else
-PUBLIC S16 RgUiCrgUbndReq(pst, spId, reason)
+S16 RgUiCrgUbndReq(pst, spId, reason)
 Pst    *pst; 
 SpId   spId;
 Reason reason;
 #endif
 {
    Inst      inst;
-   TRC3(RgUiCrgUbndReq)
-
 
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
@@ -1106,7 +1066,7 @@ Reason reason;
             RLOG1(L_ERROR,"Invalid SAP State:%d RgUiCrgUbndReq failed",
                   rgCb[inst].crgSap.sapSta.sapState);
 #endif
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -1115,9 +1075,9 @@ Reason reason;
       RLOG1(L_ERROR,"Invalid SAP Id:%d RgUiCrgUbndReq failed",
             rgCb[inst].crgSap.sapCfg.spId);
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
-   RETVALUE(ROK);
+   return ROK;
 }  /* RgUiCrgUbndReq */
 
 /**
@@ -1133,35 +1093,33 @@ Reason reason;
  *           
  *  @param[in] Inst        inst
  *  @param[in]  SuId          suId
- *  @param[in]  U8            status
+ *  @param[in]  uint8_t            status
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMCrgBndCfm
+S16 rgUIMCrgBndCfm
 (
 Inst  inst,
 SuId suId,
-U8 status
+uint8_t status
 )
 #else
-PUBLIC S16 rgUIMCrgBndCfm(inst,suId, status)
+S16 rgUIMCrgBndCfm(inst,suId, status)
 Inst          inst;
 SuId          suId;
-U8            status;
+uint8_t       status;
 #endif
 {
-   TRC2(rgUIMCrgBndCfm)
-   
 
    if(RgUiCrgBndCfm(&(rgCb[inst].crgSap.sapCfg.sapPst), rgCb[inst].crgSap.sapCfg.suId, status) != ROK)
    {
       RLOG0(L_ERROR,"RgUiCrgBndCfm Failed ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* rgUIMCrgBndCfm*/
 
 /**
@@ -1185,7 +1143,7 @@ U8            status;
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 RgUiCrgCfgReq
+S16 RgUiCrgCfgReq
 (
 Pst           *pst, 
 SpId          spId,
@@ -1193,7 +1151,7 @@ CrgCfgTransId transId,
 CrgCfgReqInfo *cfgReqInfo
 )
 #else
-PUBLIC S16 RgUiCrgCfgReq(pst, spId, transId, cfgReqInfo)
+S16 RgUiCrgCfgReq(pst, spId, transId, cfgReqInfo)
 Pst           *pst; 
 SpId          spId;
 CrgCfgTransId transId;
@@ -1202,15 +1160,13 @@ CrgCfgReqInfo *cfgReqInfo;
 {
    Inst      inst;
    S16       ret       = ROK;
-   U8        cfmStatus = 0x00ff;
-   U8        prntTrans[CRG_CFG_TRANSID_SIZE+1];
-
-   TRC3(RgUiCrgCfgReq);
+   uint8_t   cfmStatus = 0x00ff;
+   uint8_t   prntTrans[CRG_CFG_TRANSID_SIZE+1];
 
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
    /* Ensuring transId is always Null terminated. */
-   cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, CRG_CFG_TRANSID_SIZE);
+   memcpy(prntTrans, transId.trans, CRG_CFG_TRANSID_SIZE);
    prntTrans[CRG_CFG_TRANSID_SIZE] = '\0';
 
 
@@ -1219,7 +1175,7 @@ CrgCfgReqInfo *cfgReqInfo;
    {
       RLOG0(L_ERROR,"Input Param crgReqInfo is NULL ");
       rgUIMCrgCfgCfm(inst,transId, cfmStatus); 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* Upper SAP Id and State validation */
@@ -1240,7 +1196,7 @@ CrgCfgReqInfo *cfgReqInfo;
          cfgReqInfo = NULLP;
 
             rgUIMCrgCfgCfm(inst,transId, cfmStatus);
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
    }
    else
@@ -1253,7 +1209,7 @@ CrgCfgReqInfo *cfgReqInfo;
             sizeof(CrgCfgReqInfo));
       cfgReqInfo = NULLP;
       rgUIMCrgCfgCfm(inst,transId, cfmStatus); 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    ret = rgCOMCfgReq(inst,transId, cfgReqInfo);
    SPutSBuf (pst->region, pst->pool, (Data *)cfgReqInfo,
@@ -1262,10 +1218,10 @@ CrgCfgReqInfo *cfgReqInfo;
    if (ret != ROK)
    {
       RLOG0(L_ERROR,"Configuration Request Handling Failed ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }  /* RgUiCrgCfgReq */
 
 /**
@@ -1281,31 +1237,29 @@ CrgCfgReqInfo *cfgReqInfo;
  *           
  *  @param[in] Inst        inst
  *  @param[in]  CrgCfgTransId transId
- *  @param[in]  U8            status
+ *  @param[in]  uint8_t            status
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  **/
 #ifdef ANSI
-PUBLIC S16 rgUIMCrgCfgCfm
+S16 rgUIMCrgCfgCfm
 (
 Inst      inst,
 CrgCfgTransId transId,
-U8            status
+uint8_t       status
 )
 #else
-PUBLIC S16 rgUIMCrgCfgCfm(inst,transId, status)
+S16 rgUIMCrgCfgCfm(inst,transId, status)
 Inst      inst;
 CrgCfgTransId transId;
-U8            status;
+uint8_t       status;
 #endif
 {
    S16  ret = ROK;
-   U8   prntTrans[CRG_CFG_TRANSID_SIZE+1];
+   uint8_t   prntTrans[CRG_CFG_TRANSID_SIZE+1];
 
-   TRC2(rgUIMCrgCfgCfm)
-   
-   cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, CRG_CFG_TRANSID_SIZE);
+   memcpy(prntTrans, transId.trans, CRG_CFG_TRANSID_SIZE);
    prntTrans[CRG_CFG_TRANSID_SIZE] = '\0';
 
 
@@ -1313,20 +1267,20 @@ U8            status;
    if (ret != ROK)
    {
       RLOG0(L_ERROR,"RgUiCrgCfgCfm Failed ");
-      RETVALUE(ret);
+      return (ret);
    }
 
-   RETVALUE(ret);
+   return (ret);
 }  /* rgUIMCrgCfgCfm */
 #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
 
 #ifdef ANSI
-PUBLIC S16 rgBatchProc
+S16 rgBatchProc
 (
 Void
 )
 #else
-PUBLIC S16 rgBatchProc()
+S16 rgBatchProc()
 Void;
 #endif
 {
@@ -1334,14 +1288,14 @@ Void;
    Pst pst = {0};
    SpId spId = 0;
    RguDStaRspInfo  *staRsp;
-   U32 elmIndx = 0;
+   uint32_t elmIndx = 0;
 #ifndef LTE_ADV
 /* Fill pst */
    pst.srcProcId = 1;
    pst.dstProcId = 1;
-   pst.dstEnt = ENTRG;
+   pst.dstEnt = ENTMAC;
    pst.dstInst = 0;
-   pst.srcEnt = ENTKW;
+   pst.srcEnt = ENTRLC;
    pst.srcInst = 1;
    pst.prior = PRIOR0;
    pst.route = RTESPEC;
@@ -1352,7 +1306,7 @@ Void;
 #else
 #endif
   
-   elmIndx = (U32)SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
+   elmIndx = (uint32_t)SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
    while(NULLP != elmIndx)
    {
       staRsp = (RguDStaRspInfo *)elmIndx;
@@ -1365,10 +1319,10 @@ Void;
       staRsp = NULLP;
       SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
 
-      if((elmIndx = (U32)SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC)) == NULLP)
+      if((elmIndx = (uint32_t)SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC)) == NULLP)
       break;
    }
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif