Skip to contentSkip to conversation

drm/amdgpu: fix the variable name in comments

PATCH In review Sunil Khatri 2 participants 4 messages Nov 21, 2024 – Nov 22, 2024

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

PATCH 1/2 drm/amdgpu: fix the variable name in comments

Fix the variable name in comments to clean up the
warning in amdgpu_bo_create_isp_user.

warning: Function parameter or struct member 'dbuf' not described in 'amdgpu_bo_create_isp_user'
warning: Excess function parameter 'dma_buf' description in 'amdgpu_bo_create_isp_user'

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
index 4e6d218839f9..89d84820e4b0 100644
@@ -357,7 +357,7 @@ EXPORT_SYMBOL(amdgpu_bo_create_kernel);
  * amdgpu_bo_create_isp_user - create user BO for isp
  *
  * @adev: amdgpu device object
- * @dma_buf: DMABUF handle for isp buffer
+ * @dbuf: DMABUF handle for isp buffer
  * @domain: where to place it
  * @bo:  used to initialize BOs in structures
  * @gpu_addr: GPU addr of the pinned BO
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 drm/amdgpu: add "restore" missing variable comment

add "restore" missing variable in the fucntions sdma_v4_4_2_page_resume and sdma_v4_4_2_inst_start.

This fixes the warning:
warning: Function parameter or struct member 'restore' not described in 'sdma_v4_4_2_page_resume'
warning: Function parameter or struct member 'restore' not described in 'sdma_v4_4_2_inst_start'

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +2 -0
index e70460693ef2..e1674da07c23 100644
@@ -764,6 +764,7 @@ static void sdma_v4_4_2_gfx_resume(struct amdgpu_device *adev, unsigned int i, b
  *
  * @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.
@@ -928,6 +929,7 @@ static int sdma_v4_4_2_inst_load_microcode(struct amdgpu_device *adev,
  *
  * @adev: amdgpu_device pointer
  * @inst_mask: mask of dma engine instances to be enabled
+ * @restore: boolean to say restore needed or not
  *
  * Set up the DMA engines and enable them.
  * Returns 0 for success, error for failure.
Signature · 1 line
2.34.1
maintainer
#2 lore raw
In reply to Sunil Khatri

Am 21.11.24 um 18:37 schrieb Sunil Khatri:

Quoted 5 lines

Fix the variable name in comments to clean up the
warning in amdgpu_bo_create_isp_user.

warning: Function parameter or struct member 'dbuf' not described in 'amdgpu_bo_create_isp_user'
warning: Excess function parameter 'dma_buf' description in 'amdgpu_bo_create_isp_user'

Mhm, I think I would rather prefer changing the variable name.

We used dma_buf basically everywhere else.

Christian.

Quoted 19 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
index 4e6d218839f9..89d84820e4b0 100644
@@ -357,7 +357,7 @@ EXPORT_SYMBOL(amdgpu_bo_create_kernel);
   * amdgpu_bo_create_isp_user - create user BO for isp
   *
   * @adev: amdgpu device object
- * @dma_buf: DMABUF handle for isp buffer
+ * @dbuf: DMABUF handle for isp buffer
   * @domain: where to place it
   * @bo:  used to initialize BOs in structures
   * @gpu_addr: GPU addr of the pinned BO
#3 lore raw
Quoted 10 lines · Christian König

Am 21.11.24 um 18:37 schrieb Sunil Khatri:

Quoted 5 lines

Fix the variable name in comments to clean up the
warning in amdgpu_bo_create_isp_user.

warning: Function parameter or struct member 'dbuf' not described in 'amdgpu_bo_create_isp_user'
warning: Excess function parameter 'dma_buf' description in 'amdgpu_bo_create_isp_user'

Mhm, I think I would rather prefer changing the variable name.

We used dma_buf basically everywhere else.

make Sense. i will update the variable name rather than the comment.

Thanks Sunil

Quoted 23 lines

Christian.

Quoted 19 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
index 4e6d218839f9..89d84820e4b0 100644
@@ -357,7 +357,7 @@ EXPORT_SYMBOL(amdgpu_bo_create_kernel);
    * amdgpu_bo_create_isp_user - create user BO for isp
    *
    * @adev: amdgpu device object
- * @dma_buf: DMABUF handle for isp buffer
+ * @dbuf: DMABUF handle for isp buffer
    * @domain: where to place it
    * @bo:  used to initialize BOs in structures
    * @gpu_addr: GPU addr of the pinned BO