diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index f66615aa3d..be1da99de9 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -2827,7 +2827,7 @@ def showRange(deviceList, rangeType): return printLogSpacer(' Show Valid %s Range ' % (rangeType)) odvf = rsmi_od_volt_freq_data_t() - uint64_max = 2**64 - 1 + uint64_max = UIntegerTypes.UINT64_T for device in deviceList: ret = rocmsmi.rsmi_dev_od_volt_info_get(device, byref(odvf)) if rsmi_ret_ok(ret, device, 'get_od_volt', silent=False): diff --git a/projects/rocm-smi-lib/src/rocm_smi.cc b/projects/rocm-smi-lib/src/rocm_smi.cc index 7d062cf8ff..20b6bb72a0 100755 --- a/projects/rocm-smi-lib/src/rocm_smi.cc +++ b/projects/rocm-smi-lib/src/rocm_smi.cc @@ -1446,7 +1446,8 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind, }; // track the number of keys found, if this goes down to 0 then that means that there is no valid data - uint8_t structured_key_counter = 6; + const uint8_t kNumStructuredKeysToCheck = 6; + uint8_t structured_key_counter = kNumStructuredKeysToCheck; // Validates 'OD_SCLK' is in the structure if (txt_power_dev_od_voltage.contains_structured_key(kTAG_OD_SCLK, KTAG_FIRST_FREQ_IDX)) { @@ -1497,7 +1498,7 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind, } else structured_key_counter--; - if (structured_key_counter <= 0) { + if (structured_key_counter == 0) { return RSMI_STATUS_NOT_YET_IMPLEMENTED; }