X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fcm_hash.c;h=2d2668d567562dfd500ae665681303d24d59760c;hb=3f340f5742e5c7c92b8541479ee7f2d670200cfb;hp=10dccff8b3c2428bb8ea72108f4e9fd61ef3f9d6;hpb=aee73991f728cc127d1ed76d5a52571d916235a4;p=o-du%2Fl2.git diff --git a/src/cm/cm_hash.c b/src/cm/cm_hash.c index 10dccff8b..2d2668d56 100644 --- a/src/cm/cm_hash.c +++ b/src/cm/cm_hash.c @@ -193,7 +193,6 @@ U16 *idx; /* idx to return */ U32 len; /* length */ /*cm_hash_c_001.main_23 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmHashFuncAnyKey); /* Set up the internal state */ len = keyLen; /* key length */ a = 0x9e3779b9; /* a = b = the golden ratio; an arbitrary value */ @@ -276,7 +275,6 @@ U16 *idx; /* idx to return */ { U32 sum; /* Sum of octets for hash function */ - TRC2(cmHashFuncU32Mod); /* keyLen is marked Unused to remove compilation * warnings. */ @@ -340,7 +338,6 @@ U16 *idx; /* idx to return */ U32 secondU32 = 0; /* Second U32 prepared for higher 4 octets */ U32 sum; /* Sum of the above 2 octets to get the index */ - TRC2(cmHashFuncBCD8); /* keyLen is marked Unused to remove compilation * warnings. */ @@ -413,7 +410,6 @@ U16 *idx; /* idx to return */ U16 cntr; /* Index */ U32 sum; /* Sum of octets for hash function */ - TRC2(cmHashFuncString) sum = 0; @@ -470,7 +466,6 @@ U16 *idx; /* index to return */ { U32 sum; /* sum of key string octets */ - TRC2(cmHashFuncDefault); /* add all bytes of the key */ sum = 0; @@ -540,7 +535,6 @@ U16 *idx; /* index to return */ U32 prod; /* (constant multiplier * key) */ U8 shift; /* Bits to be shifted to get index */ - TRC2(cmHashFuncMult24); UNUSED(keyLen); @@ -601,7 +595,6 @@ U16 *idx; /* index to return */ #endif { - TRC2(cmHashFuncConId); /* switch based on the length of the key */ switch (keyLen) @@ -669,7 +662,6 @@ U16 keyLen; /* length of key string */ U16 *idx; /* index to return */ #endif { - TRC2(cmHashFuncDirIdx); UNUSED(hashListCp); UNUSED(keyLen); @@ -711,7 +703,6 @@ U8 *key2; /* second key string */ U16 keyLen2; /* length of second key string */ #endif { - TRC2(cmHashMatchKey); /* compare key lengths */ if (keyLen1 != keyLen2) @@ -748,7 +739,6 @@ CmListEnt *oldEntry; /* add new entry after this entry */ CmListEnt *newEntry; /* new entry to add */ #endif { - TRC2(cmListInsert); newEntry->next = oldEntry->next; newEntry->prev = oldEntry; @@ -783,7 +773,6 @@ PRIVATE S16 cmListDelete(entry) CmListEnt *entry; /* entry to delete */ #endif { - TRC2(cmListDelete); if (entry == NULLP) return RFAILED; @@ -836,7 +825,7 @@ CmListEnt *entry; /* entry to delete */ * */ #ifdef ANSI -PUBLIC S16 cmHashListInit +S16 cmHashListInit ( CmHashListCp *hashListCp, /* hash list to initialize */ U16 nmbBins, /* number of hash list bins */ @@ -847,7 +836,7 @@ Region region, /* memory region to allocate bins */ Pool pool /* memory pool to allocate bins */ ) #else -PUBLIC S16 cmHashListInit(hashListCp, nmbBins, offset, dupFlg, keyType, region, pool) +S16 cmHashListInit(hashListCp, nmbBins, offset, dupFlg, keyType, region, pool) CmHashListCp *hashListCp; /* hash list to initialize */ U16 nmbBins; /* number of hash list bins */ U16 offset; /* offset of CmHashListEnt in entries */ @@ -864,7 +853,6 @@ Pool pool; /* memory pool to allocate bins */ CmListBinEnt *hl; #endif - TRC2(cmHashListInit); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -995,16 +983,15 @@ Pool pool; /* memory pool to allocate bins */ * */ #ifdef ANSI -PUBLIC S16 cmHashListDeinit +S16 cmHashListDeinit ( CmHashListCp *hashListCp /* hash list to deinitialize */ ) #else -PUBLIC S16 cmHashListDeinit(hashListCp) +S16 cmHashListDeinit(hashListCp) CmHashListCp *hashListCp; /* hash list to deinitialize */ #endif { - TRC2(cmHashListDeinit); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1064,7 +1051,7 @@ CmHashListCp *hashListCp; /* hash list to deinitialize */ */ #ifdef ANSI -PUBLIC S16 cmHashListInsert +S16 cmHashListInsert ( CmHashListCp *hashListCp, /* hash list to add to */ PTR entry, /* entry to add */ @@ -1072,7 +1059,7 @@ U8 *key, /* pointer to key */ U16 keyLen /* length of key */ ) #else -PUBLIC S16 cmHashListInsert(hashListCp, entry, key, keyLen) +S16 cmHashListInsert(hashListCp, entry, key, keyLen) CmHashListCp *hashListCp; /* hash list to add to */ PTR entry; /* entry to add */ U8 *key; /* pointer to key */ @@ -1083,7 +1070,6 @@ U16 keyLen; /* length of key */ PTR dupEntry; /* pointer to entry with duplicate key */ U16 idx; /* index for insertion into hash list */ - TRC2(cmHashListInsert); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1148,13 +1134,13 @@ U16 keyLen; /* length of key */ */ #ifdef ANSI -PUBLIC S16 cmHashListDelete +S16 cmHashListDelete ( CmHashListCp *hashListCp, /* hash list to delete from */ PTR entry /* entry to delete */ ) #else -PUBLIC S16 cmHashListDelete(hashListCp, entry) +S16 cmHashListDelete(hashListCp, entry) CmHashListCp *hashListCp; /* hash list to delete from */ PTR entry; /* entry to delete */ #endif @@ -1164,7 +1150,6 @@ PTR entry; /* entry to delete */ U16 idx; /* index for selecting the right hash list bin */ #endif - TRC2(cmHashListDelete); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1232,7 +1217,7 @@ PTR entry; /* entry to delete */ */ #ifdef ANSI -PUBLIC S16 cmHashListFind +S16 cmHashListFind ( CmHashListCp *hashListCp, /* hash list to search */ U8 *key, /* pointer to key */ @@ -1241,7 +1226,7 @@ U16 seqNmb, /* used in case of duplicate keys */ PTR *entry /* entry to be returned */ ) #else -PUBLIC S16 cmHashListFind(hashListCp, key, keyLen, seqNmb, entry) +S16 cmHashListFind(hashListCp, key, keyLen, seqNmb, entry) CmHashListCp *hashListCp; /* hash list to search */ U8 *key; /* pointer to key */ U16 keyLen; /* length of key */ @@ -1259,7 +1244,6 @@ PTR *entry; /* entry to be returned */ U16 i; /* counter for sequence number */ U16 idx; /* index for insertion into hash list */ - TRC2(cmHashListFind); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1338,14 +1322,14 @@ PTR *entry; /* entry to be returned */ * */ #ifdef ANSI -PUBLIC S16 cmHashListGetNext +S16 cmHashListGetNext ( CmHashListCp *hashListCp, /* hash list to get from */ PTR prevEnt, /* previous entry */ PTR *entry /* entry to be returned */ ) #else -PUBLIC S16 cmHashListGetNext(hashListCp, prevEnt, entry) +S16 cmHashListGetNext(hashListCp, prevEnt, entry) CmHashListCp *hashListCp; /* hash list to get from */ PTR prevEnt; /* previous entry */ PTR *entry; /* entry to be returned */ @@ -1360,7 +1344,6 @@ PTR *entry; /* entry to be returned */ CmHashListEnt *prevListEnt; /* previous hash list entry pointer */ U16 i; /* hash list counter */ - TRC2(cmHashListGetNext); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1456,7 +1439,7 @@ PTR *entry; /* entry to be returned */ * */ #ifdef ANSI -PUBLIC S16 cmHashListBinGetNextEntry +S16 cmHashListBinGetNextEntry ( CmHashListCp *hashListCp, /* hash list to get from */ U16 binIdx, /* Bin Index to retreive the entry */ @@ -1464,7 +1447,7 @@ PTR prevEnt, /* previous entry */ PTR *entry /* entry to be returned */ ) #else -PUBLIC S16 cmHashListBinGetNextEntry(hashListCp, binIdx, prevEnt, entry) +S16 cmHashListBinGetNextEntry(hashListCp, binIdx, prevEnt, entry) CmHashListCp *hashListCp; /* hash list to get from */ U16 binIdx; /* Bin Index to retreive the entry */ PTR prevEnt; /* previous entry */ @@ -1475,7 +1458,6 @@ PTR *entry; /* entry to be returned */ CmHashListEnt *hashListEnt; /* temporary hash list entry pointer */ CmHashListEnt *prevListEnt; /* previous hash list entry pointer */ - TRC2(cmHashListBinGetNextEntry); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */ @@ -1547,14 +1529,14 @@ PTR *entry; /* entry to be returned */ * */ #ifdef ANSI -PUBLIC S16 cmHashListQuery +S16 cmHashListQuery ( CmHashListCp *hashListCp, /* hash list to query */ U8 queryType, /* type of query */ U16 *result /* result of query */ ) #else -PUBLIC S16 cmHashListQuery(hashListCp, queryType, result) +S16 cmHashListQuery(hashListCp, queryType, result) CmHashListCp *hashListCp; /* hash list to query */ U8 queryType; /* type of query */ U16 *result; /* result of query */ @@ -1564,7 +1546,6 @@ U16 *result; /* result of query */ U8 i; #endif - TRC2(cmHashListQuery); /* deal with queries that do not need hashListCp */ @@ -1658,7 +1639,7 @@ U16 *result; /* result of query */ */ #ifdef ANSI -PUBLIC S16 cmHashListOAInsert +S16 cmHashListOAInsert ( CmHashListCp *hashListCp, /* hash table to add to */ PTR entry, /* entry to add */ @@ -1666,7 +1647,7 @@ U8 *key, /* pointer to key */ U16 keyLen /* length of key */ ) #else -PUBLIC S16 cmHashListOAInsert(hashListCp, entry, key, keyLen) +S16 cmHashListOAInsert(hashListCp, entry, key, keyLen) CmHashListCp *hashListCp; /* hash table to add to */ PTR entry; /* entry to add */ U8 *key; /* pointer to key */ @@ -1686,7 +1667,6 @@ U16 keyLen; /* length of key */ /* cm_hash_c_001.main_21. Modify. Compilation Issue resolved. */ U16 nmbEnt; - TRC2(cmHashListOAInsert); #if (ERRCLASS & ERRCLS_DEBUG) /* error check on parameters */