Minor updates
[keystone-rtos/rm-lld.git] / src / rm.c
index c4ffbd8ec9e5c82c9fba6ba79a14cbc78203201d..d66ae06494669a74a004f62e7b9aea6a431b61e0 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -99,17 +99,11 @@ static uint32_t transactionInitSequenceNum(void)
  */
 static uint32_t transactionGetSequenceNum(Rm_Inst *rmInst)
 {
-    uint32_t sequenceNum = 0;
-
-    if (rmInst->transactionSeqNum + 1 < rmInst->transactionSeqNum) {
-        /* Rollover */
-        sequenceNum = rmInst->transactionSeqNum;
-        rmInst->transactionSeqNum = transactionInitSequenceNum();
-    }
-    else {
-        sequenceNum = rmInst->transactionSeqNum++;
+    rmInst->transactionSeqNum++;
+    if (!rmInst->transactionSeqNum) {
+        rmInst->transactionSeqNum++;
     }    
-    return (sequenceNum);
+    return (rmInst->transactionSeqNum);
 }
 
 /* FUNCTION PURPOSE: Creates a resource allocator
@@ -1987,7 +1981,7 @@ void Rm_printInstanceStatus(Rm_Handle rmHandle)
  *              using the parameters provided via the initCfg
  *              structure.
  */
-Rm_Handle Rm_init(Rm_InitCfg *initCfg, int32_t *result)
+Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
 {
     Rm_Inst *rmInst;
     void    *globalResourceDtb = NULL;