[PATCH 25/26] drm/amd/display: fix compilation warning in dml2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Qingqing Zhuo <qingqing.zhuo@xxxxxxx>

[Why]
dml2_dc_resource_mgmt.c:792:3: error:
enumeration value ‘dml_odm_mode_split_1to2’ not
handled in switch [-Werror=switch]
  792 |   switch (disp_cfg->hw.ODMMode[cfg_idx]) {
      |   ^~~~~~

[How]
Add default case for switch.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@xxxxxxx>
Reviewed-by: Jun Lei <jun.lei@xxxxxxx>
Acked-by: Roman Li <roman.li@xxxxxxx>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@xxxxxxx>
---
 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
index 71fce58da44d..fc266c6e1398 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
@@ -791,6 +791,8 @@ static unsigned int get_odm_factor(
 			return 2;
 		case dml_odm_mode_combine_4to1:
 			return 4;
+		default:
+			break;
 		}
 	ASSERT(false);
 	return 1;
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux