From: Lucas De Marchi Date: Fri, 17 May 2024 20:43:04 +0000 (-0700) Subject: drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion X-Git-Tag: io_uring-6.11-20240722~49^2~26^2~108 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bd49e50d81b543e678965118a86958d87c045c73;p=linux-block.git drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion XE_ENGINE_CLASS_OTHER was missing from the str conversion. Add it and remove the default handling so it's protected by -Wswitch. 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. Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi --- diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c index b71e90c555fa..942fca8f1eb9 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -1111,9 +1111,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; }