]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 17 May 2024 20:43:04 +0000 (13:43 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 21 May 2024 13:33:39 +0000 (06:33 -0700)
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 <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-3-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_hw_engine.c

index b71e90c555fa5fb893fc191e18a35cfe88fae91a..942fca8f1eb91b9485b15514644d3dbaae7a3fd7 100644 (file)
@@ -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;
 }