From: Ivan Lipski Date: Wed, 27 May 2026 18:57:17 +0000 (-0400) Subject: drm/amd/display: Add a default case for dc_status_to_str X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=470d1ae31d29f90b8998c5c08ee0b267a05fe378;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Add a default case for dc_status_to_str [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 Reviewed-by: Alex Deucher Reviewed-by: Alex Hung Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c index bbce751b485fd..44028ba88f809 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c @@ -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)