Skip to contentSkip to conversation

drm/amdgpu: fix compiler warnings for df perfmons

PATCH In review Kim, Jonathan 2 participants 2 messages Oct 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix compiler warnings for df perfmons

fixing compiler warnings in df v3.6 for c-state toggle and pmc count.

Change-Id I74f8f1eafccf523a89d60d005e3549235f75c6b8
---
 drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +2 -2
index f403c62c944e..e1cf7e9c616a 100644
@@ -93,7 +93,7 @@ const struct attribute_group *df_v3_6_attr_groups[] = {
 		NULL
 };
 
-static df_v3_6_set_df_cstate(struct amdgpu_device *adev, int allow)
+static int df_v3_6_set_df_cstate(struct amdgpu_device *adev, int allow)
 {
 	int r = 0;
 
@@ -546,7 +546,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,
 				  uint64_t config,
 				  uint64_t *count)
 {
-	uint32_t lo_base_addr, hi_base_addr, lo_val, hi_val;
+	uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;
 	*count = 0;
 
 	switch (adev->asic_type) {
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Philip Yang
#2 lore raw
Quoted 23 lines · Jonathan

fixing compiler warnings in df v3.6 for c-state toggle and pmc count.

Change-Id I74f8f1eafccf523a89d60d005e3549235f75c6b8
---
  drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1 -1
index f403c62c944e..e1cf7e9c616a 100644
@@ -93,7 +93,7 @@ const struct attribute_group *df_v3_6_attr_groups[] = {
  		NULL
  };
 
-static df_v3_6_set_df_cstate(struct amdgpu_device *adev, int allow)
+static int df_v3_6_set_df_cstate(struct amdgpu_device *adev, int allow)
  {
  	int r = 0;
 

drivers/gpu/drm/amd/amdgpu/df_v3_6.c static void df_v3_6_pmc_get_count(struct amdgpu_device *adev, · line 552

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1 -1
@@ -546,7 +546,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,
  				  uint64_t config,
  				  uint64_t *count)
  {
-	uint32_t lo_base_addr, hi_base_addr, lo_val, hi_val;
+	uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;
  	*count = 0;
 
  	switch (adev->asic_type) {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx