Skip to contentSkip to conversation

sparse warning cleanup

PATCH Applied Wambui Karuga 2 participants 4 messages Oct 28, 2019

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

cover sparse warning cleanup

This patchset addresses the sparse warning about the amdgpu_exp_hw_support variable and corrects the mispelling of the word "_LENTH".

Wambui Karuga (2):
drm/amd: declare amdgpu_exp_hw_support in amdgpu.h drm/amd: correct "_LENTH" mispelling in constant

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 5 +++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 drm/amd: declare amdgpu_exp_hw_support in amdgpu.h

Declare amdgpu_exp_hw_support as extern in amdgpu.h to address the
following sparse warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:118:5: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index f4d9041ef430..3610defdfae1 100644
@@ -140,6 +140,7 @@ extern int amdgpu_vm_fragment_size;
 extern int amdgpu_vm_fault_stop;
 extern int amdgpu_vm_debug;
 extern int amdgpu_vm_update_mode;
+extern int amdgpu_exp_hw_support;
 extern int amdgpu_dc;
 extern int amdgpu_sched_jobs;
 extern int amdgpu_sched_hw_submission;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 drm/amd: correct "_LENTH" mispelling in constant

In reply to Wambui Karuga

Correct the "_LENTH" mispelling in the AMDGPU_MAX_TIMEOUT_PARAM_LENGTH constant.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -2
index 3610defdfae1..7d1e528cc783 100644
@@ -108,7 +108,7 @@ struct amdgpu_mgpu_info
 	uint32_t			num_apu;
 };
 
-#define AMDGPU_MAX_TIMEOUT_PARAM_LENTH	256
+#define AMDGPU_MAX_TIMEOUT_PARAM_LENGTH	256
 
 /*
  * Modules parameters.
@@ -126,7 +126,7 @@ extern int amdgpu_disp_priority;
 extern int amdgpu_hw_i2c;
 extern int amdgpu_pcie_gen2;
 extern int amdgpu_msi;
-extern char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
+extern char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH];
 extern int amdgpu_dpm;
 extern int amdgpu_fw_load_type;
 extern int amdgpu_aspm;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index 676cad15239f..4eee40b9d0b0 100644
@@ -2631,9 +2631,9 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
 	else
 		adev->compute_timeout = MAX_SCHEDULE_TIMEOUT;
 
-	if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENTH)) {
+	if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
 		while ((timeout_setting = strsep(&input, ",")) &&
-				strnlen(timeout_setting, AMDGPU_MAX_TIMEOUT_PARAM_LENTH)) {
+				strnlen(timeout_setting, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
 			ret = kstrtol(timeout_setting, 0, &timeout);
 			if (ret)
 				return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index c685400febe2..16147ca9b851 100644
@@ -101,7 +101,7 @@ int amdgpu_disp_priority = 0;
 int amdgpu_hw_i2c = 0;
 int amdgpu_pcie_gen2 = -1;
 int amdgpu_msi = -1;
-char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
+char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH];
 int amdgpu_dpm = -1;
 int amdgpu_fw_load_type = -1;
 int amdgpu_aspm = -1;
Signature · 1 line
2.17.1
Applied
#3 lore raw
In reply to Wambui Karuga
Quoted 8 lines · Wambui Karuga

This patchset addresses the sparse warning about the amdgpu_exp_hw_support variable and corrects the mispelling of the word "_LENTH".

Wambui Karuga (2):
drm/amd: declare amdgpu_exp_hw_support in amdgpu.h drm/amd: correct "_LENTH" mispelling in constant

Applied the series. Thanks!

Alex

Quoted 6 lines
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 5 +++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
Quoted 7 lines

--
2.17.1

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

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