Skip to contentSkip to conversation

drm/amdgpu: Fixed warning reported by kernel test robot

PATCH In review yipechai 3 participants 3 messages Feb 22, 2022

Subsystems (2)
lore
Share & tools
lore

yipechai

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fixed warning reported by kernel test robot

Fixed warning reported by kernel test robot:
1.warning: no previous prototype for function 'amdgpu_ras_block_late_init_default'. 2.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -2
index e5874df3c9ca..a73567ea03d5 100644
@@ -2400,7 +2400,7 @@ bool amdgpu_ras_is_poison_mode_supported(struct amdgpu_device *adev)
 int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
 			 struct ras_common_if *ras_block)
 {
-	struct amdgpu_ras_block_object *ras_obj;
+	struct amdgpu_ras_block_object *ras_obj = NULL;
 	struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
 	unsigned long ue_count, ce_count;
 	int r;
@@ -2456,7 +2456,7 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
 	return r;
 }
 
-int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev,
+static int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev,
 			 struct ras_common_if *ras_block)
 {
 	return amdgpu_ras_block_late_init(adev, ras_block);
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

With my inline concerns addressed, the patch is:

Quoted 8 lines

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Tuesday, February 22, 2022 3:07 PM
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: Fixed warning reported by kernel test robot

[Tao] "Fix warnings for RAS reported by robot" is recommended

Quoted 2 lines

Fixed warning reported by kernel test robot:

[Tao]: Fixed -> Fix

Quoted 5 lines

1.warning: no previous prototype for function 'amdgpu_ras_block_late_init_default'.
2.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true.

[Tao]: "Reported-by: kernel test robot <[email protected]>" can be added

Quoted 32 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index e5874df3c9ca..a73567ea03d5 100644
@@ -2400,7 +2400,7 @@ bool amdgpu_ras_is_poison_mode_supported(struct

amdgpu_device *adev) int amdgpu_ras_block_late_init(struct amdgpu_device *adev,

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -3
 			 struct ras_common_if *ras_block)
 {
-	struct amdgpu_ras_block_object *ras_obj;
+	struct amdgpu_ras_block_object *ras_obj = NULL;
 	struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
 	unsigned long ue_count, ce_count;
 	int r;
@@ -2456,7 +2456,7 @@ int amdgpu_ras_block_late_init(struct
 amdgpu_device *adev,
 	return r;
 }
 
-int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev,
+static int amdgpu_ras_block_late_init_default(struct amdgpu_device
+*adev,
 			 struct ras_common_if *ras_block)
 {
 	return amdgpu_ras_block_late_init(adev, ras_block);
--

2.25.1

#2 lore raw

Dear yipechai,

Am 22.02.22 um 09:39 schrieb Zhou1, Tao:

Quoted 8 lines

[AMD Official Use Only]

With my inline concerns addressed, the patch is:

Quoted 2 lines

-----Original Message-----
From: Chai, Thomas <[email protected]>

Can you please configure the full name too for the From: header field, and Signed-off-by line.

[…]

Kind regards,

Paul