Re: [PATCH v2 07/11] drm/xe/xe_ras: Add structures and commands for Uncorrectable Core Compute Errors

Tauro, Riana
2026-03-31T16:14:25Z

On 3/4/2026 10:02 PM, Raag Jadav wrote:
> On Mon, Mar 02, 2026 at 03:52:02PM +0530, Riana Tauro wrote:
>> Add the sysctrl commands and response structures for Uncorrectable
>> Core Compute errors.
> ...
>
>> +static inline const char *severity_to_str(struct xe_device *xe, u32 severity)
>> +{
>> + if (severity >= XE_RAS_SEVERITY_MAX)
>> + return "Unknown Severity";
>> +
>> + return xe_ras_severities[severity];
> Rather,
>
> return sev < XE_RAS_SEV_MAX ? xe_ras_severities[sev] : "Unknown";
I can make this change
>
> and since this should ideally never happen, I'd also add a
>
> xe_assert(xe, sev < XE_RAS_SEV_MAX);
This is only used in debug builds.  Won't be useful anyway..

Thanks
Riana
>> +}
>> +
>> +static inline const char *comp_to_str(struct xe_device *xe, u32 comp)
>> +{
>> + if (comp >= XE_RAS_COMPONENT_MAX)
>> + return "Unknown Component";
>> +
>> + return xe_ras_components[comp];
> Ditto.
>
> Raag
>
>> +}