linux_dsm_epyc7002/drivers/gpu/drm/amd/display
Gustavo A. R. Silva 6f3472a993 drm/amd/display/dc/dce: Fix multiple potential integer overflows
Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and
feedback_divider to uint64_t in order to avoid multiple potential integer
overflows and give the compiler complete information about the proper
arithmetic to use.

Notice that such constant and variables are used in contexts that
expect expressions of type uint64_t (64 bits, unsigned). The current
casts to uint64_t effectively apply to each expression as a whole,
but they do not prevent them from being evaluated using 32-bit
arithmetic instead of 64-bit arithmetic.

Also, once the expressions are properly evaluated using 64-bit
arithmentic, there is no need for the parentheses that enclose
them.

Addresses-Coverity-ID: 1460245 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1460286 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1460401 ("Unintentional integer overflow")
Fixes: 4562236b3b ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-07-05 16:40:03 -05:00
..
amdgpu_dm drm/amd/display: Fix copy error when set memory clocks 2018-07-05 16:40:01 -05:00
dc drm/amd/display/dc/dce: Fix multiple potential integer overflows 2018-07-05 16:40:03 -05:00
include drm/amd/display: get board layout for edid emulation 2018-07-05 16:38:45 -05:00
modules drm/amd/display: Use 2-factor allocator calls 2018-07-05 16:40:03 -05:00
Kconfig drm/amdgpu/display: enable CONFIG_DRM_AMD_DC_DCN1_0 by default 2018-06-15 12:20:30 -05:00
Makefile drm/amd: Remove inclusion of non-existing include directories 2018-02-26 23:09:38 -05:00
TODO drm/amd/display: Add TODO item to remove vector.c 2017-12-14 11:01:13 -05:00