Skip to contentSkip to conversation

drm/amdgpu: fix function parameter documentation warnings

PATCH In review Arnaud Bonnet 2 participants 2 messages Nov 26

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

PATCH 1/1 drm/amdgpu: fix function parameter documentation warnings

Fixes several kernel doc warnings not deserving of their own patches.

In file sdma_v4_4_2.c:
Commit 0518c66cf841 ("drm/amdgpu/sdma: Fix executing duplicate commands after recovery on SDMA v4.4.2") removes the restore boolean parameter from sdma_v4_4_2_page_resume() without removing it from the documentation, leading to the following warning:

	Warning: drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c:758 Excess
	function parameter 'restore' description in
	'sdma_v4_4_2_page_resume'

Remove the restore parameter from the parameter list.

In files jpeg_v5_0_2.c and vcn_v5_0_2.c:
Functions jpeg_v5_0_2_start_sriov and vcn_v5_0_2_start_sriov take the struct amdgpu_device but do not add it to the documentation block, leading to the following warnings:

	Warning: drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c:433 function
	parameter 'adev' not described in 'jpeg_v5_0_2_start_sriov'
	Warning: drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c:724 function
	parameter 'adev' not described in 'vcn_v5_0_2_start_sriov'

Add the standard amdgpu_device pointer parameter description to both functions.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 1 -
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c  | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c +2 -0
index af1feba68dc3..a1a319a00b1a 100644
@@ -429,6 +429,8 @@ static void jpeg_v5_0_2_init_jrbc(struct amdgpu_ring *ring)
 
 /**
  * jpeg_v5_0_2_start_sriov - start JPEG block under SRIOV env
+ *
+ * @adev: amdgpu_device pointer
  */
 static int jpeg_v5_0_2_start_sriov(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +0 -1
index b99fbad2ea01..6135c6bf54ec 100644
@@ -750,7 +750,6 @@ static void sdma_v4_4_2_gfx_resume(struct amdgpu_device *adev, unsigned int i)
  *
  * @adev: amdgpu_device pointer
  * @i: instance to resume
- * @restore: boolean to say restore needed or not
  *
  * Set up the page DMA ring buffers and enable them.
  * Returns 0 for success, error for failure.
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c +2 -0
index 2f4aed8cd1ea..c8bb6ecd5bff 100644
@@ -719,6 +719,8 @@ static int vcn_v5_0_2_start_dpg_mode(struct amdgpu_vcn_inst *vinst,
 
 /**
  * vcn_v5_0_2_start_sriov - VCN start under SRIOV env
+ *
+ * @adev: amdgpu_device pointer
  */
 
 static int vcn_v5_0_2_start_sriov(struct amdgpu_device *adev)
Signature · 1 line
2.53.0
#1 lore raw

Reviewed and applied. Thanks!

Alex

Quoted 76 lines · Arnaud Bonnet

Fixes several kernel doc warnings not deserving of their own patches.

In file sdma_v4_4_2.c:
Commit 0518c66cf841 ("drm/amdgpu/sdma: Fix executing duplicate commands after recovery on SDMA v4.4.2") removes the restore boolean parameter from sdma_v4_4_2_page_resume() without removing it from the documentation, leading to the following warning:

        Warning: drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c:758 Excess
        function parameter 'restore' description in
        'sdma_v4_4_2_page_resume'

Remove the restore parameter from the parameter list.

In files jpeg_v5_0_2.c and vcn_v5_0_2.c:
Functions jpeg_v5_0_2_start_sriov and vcn_v5_0_2_start_sriov take the struct amdgpu_device but do not add it to the documentation block, leading to the following warnings:

Warning: drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c:433 function parameter 'adev' not described in 'jpeg_v5_0_2_start_sriov'
Warning: drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c:724 function parameter 'adev' not described in 'vcn_v5_0_2_start_sriov'

Add the standard amdgpu_device pointer parameter description to both functions.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 1 -
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c  | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c +2 -0
index af1feba68dc3..a1a319a00b1a 100644
@@ -429,6 +429,8 @@ static void jpeg_v5_0_2_init_jrbc(struct amdgpu_ring *ring)
 
 /**
  * jpeg_v5_0_2_start_sriov - start JPEG block under SRIOV env
+ *
+ * @adev: amdgpu_device pointer
  */
 static int jpeg_v5_0_2_start_sriov(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +0 -1
index b99fbad2ea01..6135c6bf54ec 100644
@@ -750,7 +750,6 @@ static void sdma_v4_4_2_gfx_resume(struct amdgpu_device *adev, unsigned int i)
  *
  * @adev: amdgpu_device pointer
  * @i: instance to resume
- * @restore: boolean to say restore needed or not
  *
  * Set up the page DMA ring buffers and enable them.
  * Returns 0 for success, error for failure.
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c +2 -1
index 2f4aed8cd1ea..c8bb6ecd5bff 100644
@@ -719,6 +719,8 @@ static int vcn_v5_0_2_start_dpg_mode(struct amdgpu_vcn_inst *vinst,
 
 /**
  * vcn_v5_0_2_start_sriov - VCN start under SRIOV env
+ *
+ * @adev: amdgpu_device pointer
  */
 
 static int vcn_v5_0_2_start_sriov(struct amdgpu_device *adev)
--

2.53.0