• Arnd Bergmann's avatar
    drm/amdgpu/display: fix integer arithmetic problem · 1f3493fa
    Arnd Bergmann authored
    gcc warns about an ambiguous integer calculation:
    
    drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function 'calculate_bandwidth':
    drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:534:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]
         data->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(2401171875, 100000000), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48));
         ^~~~
    
    Marking the constant as explicitly unsigned makes it work fine everywhere
    without warnings.
    Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    1f3493fa
dce_calcs.c 190 KB