summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/include
diff options
context:
space:
mode:
authorGONG, Ruiqi <gongruiqi@huaweicloud.com>2023-06-02 13:12:33 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 19:38:19 +0300
commit2890662822def3dcc1b2e690d6fcea694c666083 (patch)
tree3d9989066baf462d85c4aa8ef5d0e4bdbb875c39 /drivers/gpu/drm/amd/display/include
parent5be7d4e3cf9ef9853934daa03cf573723bae1650 (diff)
downloadlinux-2890662822def3dcc1b2e690d6fcea694c666083.tar.xz
drm/amd/display: fix compilation error due to shifting negative value
Currently compiling linux-next with allmodconfig triggers the following error: ./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function ‘dc_fixpt_truncate’: ./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:528:22: error: left shift of negative value [-Werror=shift-negative-value] 528 | arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits); | ^~ Use `unsigned long long` instead. Signed-off-by: GONG, Ruiqi <gongruiqi@huaweicloud.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/include')
-rw-r--r--drivers/gpu/drm/amd/display/include/fixed31_32.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h b/drivers/gpu/drm/amd/display/include/fixed31_32.h
index ece97ae0e826..d4cf7ead1d87 100644
--- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
+++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
@@ -525,7 +525,7 @@ static inline struct fixed31_32 dc_fixpt_truncate(struct fixed31_32 arg, unsigne
if (negative)
arg.value = -arg.value;
- arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits);
+ arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits);
if (negative)
arg.value = -arg.value;
return arg;