fix(sysman): Minor fixes to RAS module
- check for empty set Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
This commit is contained in:
parent
546318d258
commit
7b27d7cf41
|
@ -33,8 +33,12 @@ void RasHandleContext::init(uint32_t subDeviceCount) {
|
|||
const auto isSubDevice = (subDeviceCount > 0);
|
||||
uint32_t subDeviceCountLimit = (isSubDevice) ? subDeviceCount - 1 : 0;
|
||||
for (uint32_t subDeviceId = 0; subDeviceId <= subDeviceCountLimit; subDeviceId++) {
|
||||
std::set<zes_ras_error_type_t> errorTypeSubDev = {};
|
||||
std::set<zes_ras_error_type_t> errorTypeSubDev;
|
||||
OsRas::getSupportedRasErrorTypes(errorTypeSubDev, pOsSysman, isSubDevice, subDeviceId);
|
||||
if (errorTypeSubDev.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t typeId = 0;
|
||||
for (const auto &type : errorTypeSubDev) {
|
||||
createHandle(type, isSubDevice, subDeviceId);
|
||||
|
|
|
@ -28,6 +28,7 @@ class Ras : _zes_ras_handle_t {
|
|||
static Ras *fromHandle(zes_ras_handle_t handle) {
|
||||
return static_cast<Ras *>(handle);
|
||||
}
|
||||
|
||||
inline zes_ras_handle_t toHandle() { return this; }
|
||||
bool isRasErrorSupported = false;
|
||||
zes_ras_error_type_t rasErrorType{};
|
||||
|
|
Loading…
Reference in New Issue