Skip to content

Commit

Permalink
Remove extraneous mutexes
Browse files Browse the repository at this point in the history
We already grab the mutex before getting the device name, so we don't
need to grab it again

Change-Id: Ib627ba3a39c485f6069af052cfd3e6c522873d43
  • Loading branch information
kentrussell committed Oct 8, 2020
1 parent ae6d3fb commit e350278
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/rocm_smi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,37 +718,32 @@ get_id(uint32_t dv_ind, amd::smi::DevInfoTypes typ, uint16_t *id) {
rsmi_status_t
rsmi_dev_id_get(uint32_t dv_ind, uint16_t *id) {
CHK_SUPPORT_NAME_ONLY(id)
DEVICE_MUTEX
return get_id(dv_ind, amd::smi::kDevDevID, id);
}

rsmi_status_t
rsmi_dev_sku_get(uint32_t dv_ind, uint16_t *id) {
TRY
CHK_SUPPORT_NAME_ONLY(id)
DEVICE_MUTEX
return get_id(dv_ind, amd::smi::kDevDevProdNum, id);
CATCH
}

rsmi_status_t
rsmi_dev_subsystem_id_get(uint32_t dv_ind, uint16_t *id) {
CHK_SUPPORT_NAME_ONLY(id)
DEVICE_MUTEX
return get_id(dv_ind, amd::smi::kDevSubSysDevID, id);
}

rsmi_status_t
rsmi_dev_vendor_id_get(uint32_t dv_ind, uint16_t *id) {
CHK_SUPPORT_NAME_ONLY(id)
DEVICE_MUTEX
return get_id(dv_ind, amd::smi::kDevVendorID, id);
}

rsmi_status_t
rsmi_dev_subsystem_vendor_id_get(uint32_t dv_ind, uint16_t *id) {
CHK_SUPPORT_NAME_ONLY(id)
DEVICE_MUTEX
return get_id(dv_ind, amd::smi::kDevSubSysVendorID, id);
}

Expand Down

0 comments on commit e350278

Please sign in to comment.