diff --git a/projects/amdsmi/include/rocm_smi/rocm_smi.h b/projects/amdsmi/include/rocm_smi/rocm_smi.h
index b8a9ce3007..1d46dd99fe 100755
--- a/projects/amdsmi/include/rocm_smi/rocm_smi.h
+++ b/projects/amdsmi/include/rocm_smi/rocm_smi.h
@@ -237,7 +237,7 @@ typedef enum {
*
* Throughput = BEATS/time_running * 109 (bytes/second)
*/
- // ie, Throughput = BEATS/time_running 10^9 bytes/sec
+ // ie, Throughput = BEATS/time_running 10^9 bytes/sec
RSMI_EVNT_XGMI_0_BEATS_TX,
RSMI_EVNT_XGMI_1_NOP_TX, //!< NOPs sent to neighbor 1
RSMI_EVNT_XGMI_1_REQUEST_TX, //!< Outgoing requests to
diff --git a/projects/amdsmi/include/rocm_smi/rocm_smi_common.h b/projects/amdsmi/include/rocm_smi/rocm_smi_common.h
index 11de51ff52..4106739057 100755
--- a/projects/amdsmi/include/rocm_smi/rocm_smi_common.h
+++ b/projects/amdsmi/include/rocm_smi/rocm_smi_common.h
@@ -79,7 +79,7 @@
#define DEVICE_MUTEX \
amd::smi::pthread_wrap _pw(*amd::smi::GetMutex(dv_ind)); \
amd::smi::RocmSMI& smi_ = amd::smi::RocmSMI::getInstance(); \
- bool blocking_ = !(smi_.init_options() && \
+ bool blocking_ = !(smi_.init_options() & \
static_cast(RSMI_INIT_FLAG_RESRV_TEST1)); \
amd::smi::ScopedPthread _lock(_pw, blocking_); \
if (!blocking_ && _lock.mutex_not_acquired()) { \
diff --git a/projects/amdsmi/src/rocm_smi.cc b/projects/amdsmi/src/rocm_smi.cc
index 0a1ebf12fe..b0361f9640 100755
--- a/projects/amdsmi/src/rocm_smi.cc
+++ b/projects/amdsmi/src/rocm_smi.cc
@@ -3575,7 +3575,7 @@ rsmi_test_sleep(uint32_t dv_ind, uint32_t seconds) {
// DEVICE_MUTEX
amd::smi::pthread_wrap _pw(*amd::smi::GetMutex(dv_ind));
amd::smi::RocmSMI& smi_ = amd::smi::RocmSMI::getInstance();
- bool blocking_ = !(smi_.init_options() &&
+ bool blocking_ = !(smi_.init_options() &
static_cast(RSMI_INIT_FLAG_RESRV_TEST1));
amd::smi::ScopedPthread _lock(_pw, blocking_);
if (!blocking_ && _lock.mutex_not_acquired()) {
diff --git a/projects/amdsmi/src/rocm_smi_monitor.cc b/projects/amdsmi/src/rocm_smi_monitor.cc
index c0fb3ac46b..d4d288cc76 100755
--- a/projects/amdsmi/src/rocm_smi_monitor.cc
+++ b/projects/amdsmi/src/rocm_smi_monitor.cc
@@ -428,7 +428,7 @@ static int get_supported_sensors(std::string dir_path, std::string fn_reg_ex,
if (closedir(hwmon_dir)) {
return errno;
}
- } catch (std::regex_error e) {
+ } catch (std::regex_error& e) {
std::cout << "Regular expression error:" << std::endl;
std::cout << e.what() << std::endl;
std::cout << "Regex error code: " << e.code() << std::endl;