Correct usage of bitwise &
Also, fix warning related to catch() and cpplint error.
Change-Id: I4292170538d0f700fccb605814c5058543abe74a
[ROCm/amdsmi commit: c2439d28e8]
This commit is contained in:
1 parent
2e7d7b3238
commit
43fd9d8044
4 files changed
+4
-4
No files matched your search
@@ -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<uint64_t>(RSMI_INIT_FLAG_RESRV_TEST1));
|
||||
amd::smi::ScopedPthread _lock(_pw, blocking_);
|
||||
if (!blocking_ && _lock.mutex_not_acquired()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user