]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Add a default case for dc_status_to_str
authorIvan Lipski <ivan.lipski@amd.com>
Wed, 27 May 2026 18:57:17 +0000 (14:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2026 20:21:42 +0000 (16:21 -0400)
[Why&How]
If a parsed dc_status case is not covered by the dc_status_to_str, the
switch case is skipped, and the function returns
"Unexpected status error".

This causes build failures when new dc_status enums are introduced.
Changing the 'return "Unexpected status error"' into default resolves it.

Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_debug.c

index bbce751b485fdcfd2df0aeb03165ce9b7e818af1..44028ba88f80999c6559e3c47580a254b520f7ab 100644 (file)
@@ -272,9 +272,9 @@ char *dc_status_to_str(enum dc_status status)
                return "Fail DP Tunnel BW validation";
        case DC_ERROR_UNEXPECTED:
                return "Unexpected error";
+       default:
+               return "Unexpected status error";
        }
-
-       return "Unexpected status error";
 }
 
 char *dc_pixel_encoding_to_str(enum dc_pixel_encoding pixel_encoding)