Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Fix Signed/Unsigned Int Usage Compiler Warning

[Why] Compiler generates compiler warnings when signed enum
constants or literal -1 are implicitly converted to unsigned
integer types, cluttering build output and masking genuine issues.

[How] Use UINT_MAX as the invalid sentinel for unsigned IDs and align
loop/index types to unsigned where appropriate to remove implicit
signed-to-unsigned conversions, with no functional behavior change.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Gaghik Khachatrian and committed by
Alex Deucher
370b132a 64fd3f93

+1 -1
+1 -1
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
··· 143 143 { 144 144 int i; 145 145 unsigned int num_found = 0; 146 - unsigned int plane_id_assigned_to_pipe = -1; 146 + unsigned int plane_id_assigned_to_pipe = UINT_MAX; 147 147 148 148 for (i = 0; i < ctx->config.dcn_pipe_count; i++) { 149 149 struct pipe_ctx *pipe = &state->res_ctx.pipe_ctx[i];