Skip to content

Commit 0b9696a

Browse files
Bob Zhougregkh
authored andcommitted
drm/amdgpu: fix overflowed constant warning in mmhub_set_clockgating()
[ Upstream commit be6a69b ] To fix potential overflowed constant warning, modify the variables to u32 for getting the return value of RREG32_SOC15(). Signed-off-by: Bob Zhou <bob.zhou@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2fd24d2 commit 0b9696a

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static int mmhub_v1_7_set_clockgating(struct amdgpu_device *adev,
544544

545545
static void mmhub_v1_7_get_clockgating(struct amdgpu_device *adev, u64 *flags)
546546
{
547-
int data, data1;
547+
u32 data, data1;
548548

549549
if (amdgpu_sriov_vf(adev))
550550
*flags = 0;

drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ static int mmhub_v2_0_set_clockgating(struct amdgpu_device *adev,
671671

672672
static void mmhub_v2_0_get_clockgating(struct amdgpu_device *adev, u64 *flags)
673673
{
674-
int data, data1;
674+
u32 data, data1;
675675

676676
if (amdgpu_sriov_vf(adev))
677677
*flags = 0;

drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static int mmhub_v3_3_set_clockgating(struct amdgpu_device *adev,
560560

561561
static void mmhub_v3_3_get_clockgating(struct amdgpu_device *adev, u64 *flags)
562562
{
563-
int data;
563+
u32 data;
564564

565565
if (amdgpu_sriov_vf(adev))
566566
*flags = 0;

drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static int mmhub_v9_4_set_clockgating(struct amdgpu_device *adev,
657657

658658
static void mmhub_v9_4_get_clockgating(struct amdgpu_device *adev, u64 *flags)
659659
{
660-
int data, data1;
660+
u32 data, data1;
661661

662662
if (amdgpu_sriov_vf(adev))
663663
*flags = 0;

0 commit comments

Comments
 (0)