@@ -213,23 +213,23 @@ static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl)
count = 0;
for (idx = 0; idx < SECONDARY_HASH_TBL_SIZE; idx++) {
hash_tbl_entry = secondary_hash_tbl->hash_entries[idx];
- if (hash_tbl_entry != 0) {
- if ((hash_tbl_entry & 0x3F) != 0) {
- name_tbl_entry = (name_tbl_entry_t *)
- (uintptr_t)(hash_tbl_entry & ~0x3F);
- entry_cnt = hash_tbl_entry & 0x3F;
- list_cnt = linked_list_len(name_tbl_entry);
- if (entry_cnt != list_cnt)
- ODP_DBG("%s idx=%u entry_cnt=%u "
- "list_cnt=%u\n",
- __func__,
- idx, entry_cnt, list_cnt);
+ if (!hash_tbl_entry)
+ break;
+ if ((hash_tbl_entry & 0x3F) != 0) {
+ name_tbl_entry = (name_tbl_entry_t *)
+ (uintptr_t)(hash_tbl_entry & ~0x3F);
+ entry_cnt = hash_tbl_entry & 0x3F;
+ list_cnt = linked_list_len(name_tbl_entry);
+ if (entry_cnt != list_cnt)
+ ODP_DBG("%s idx=%u entry_cnt=%u "
+ "list_cnt=%u\n",
+ __func__,
+ idx, entry_cnt, list_cnt);
- count += entry_cnt;
- } else {
- ODP_DBG("%s inner secondary tbl\n",
- __func__);
- }
+ count += entry_cnt;
+ } else {
+ ODP_DBG("%s inner secondary tbl\n",
+ __func__);
}
}
No functinal change. Just make more room for code. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/odp_name_table.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)