[PATCH 4/7] drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion

Nirmoy Das nirmoy.das at linux.intel.com
Tue Apr 16 09:37:17 UTC 2024


On 4/16/2024 5:04 AM, Lucas De Marchi wrote:
> XE_ENGINE_CLASS_OTHER was missing from the str conversion. Add it and
> remove the default handling so it's protected by -Wswitch-enum.
> Currently the only user is xe_hw_engine_class_sysfs_init(), which
> already skips XE_ENGINE_CLASS_OTHER, so there's no change in behavior.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_hw_engine.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
> index 8f72f324eee7..ab227fa8984a 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.c
> @@ -971,9 +971,13 @@ const char *xe_hw_engine_class_to_str(enum xe_engine_class class)
>   		return "vecs";
>   	case XE_ENGINE_CLASS_COPY:
>   		return "bcs";
> +	case XE_ENGINE_CLASS_OTHER:
> +		return "other";
>   	case XE_ENGINE_CLASS_COMPUTE:
>   		return "ccs";
> -	default:
> -		return NULL;
> +	case XE_ENGINE_CLASS_MAX:
> +		break;
>   	}
> +
> +	return NULL;
>   }


More information about the Intel-xe mailing list