Skip to contentSkip to conversation

drm/amdgpu: Rename to amdgpu_vm_tlb_seq_struct

PATCH In review Luben Tuikov 3 participants 5 messages Jul 12, 2023

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

PATCH 1/1 drm/amdgpu: Rename to amdgpu_vm_tlb_seq_struct

Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -4
index 92a84e7b0db85b..32adc31c093d84 100644
@@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
 };
 
 /**
- * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush sequence
+ * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush sequence
  */
-struct amdgpu_vm_tlb_seq_cb {
+struct amdgpu_vm_tlb_seq_struct {
 	/**
 	 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
 	 */
@@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
 static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
 				 struct dma_fence_cb *cb)
 {
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
 
 	tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
 	atomic64_inc(&tlb_cb->vm->tlb_seq);
@@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 			   struct dma_fence **fence)
 {
 	struct amdgpu_vm_update_params params;
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
 	struct amdgpu_res_cursor cursor;
 	enum amdgpu_sync_mode sync_mode;
 	int r, idx;

base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5

Signature · 1 line
2.41.0
maintainer
#1 lore raw

Am 12.07.23 um 08:58 schrieb Luben Tuikov:

Quoted 3 lines

Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this.

Hui? What exactly is duplicated here? Is the structure defined in different files with a different meaning?

Christian.

Quoted 46 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -4
index 92a84e7b0db85b..32adc31c093d84 100644
@@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
  };
 
  /**
- * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush sequence
+ * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush sequence
   */
-struct amdgpu_vm_tlb_seq_cb {
+struct amdgpu_vm_tlb_seq_struct {
  	/**
  	 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
  	 */
@@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
  static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
  				 struct dma_fence_cb *cb)
  {
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
 
  	tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
  	atomic64_inc(&tlb_cb->vm->tlb_seq);
@@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  			   struct dma_fence **fence)
  {
  	struct amdgpu_vm_update_params params;
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
  	struct amdgpu_res_cursor cursor;
  	enum amdgpu_sync_mode sync_mode;
  	int r, idx;

base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5

#2 lore raw
Quoted 7 lines · Christian König

Am 12.07.23 um 08:58 schrieb Luben Tuikov:

Quoted 3 lines

Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this.

Hui? What exactly is duplicated here? Is the structure defined in different files with a different meaning?

The same name is used for the function and for the structure.

struct amdgpu_vm_tlb_seq_cb {...}

and

static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
struct dma_fence_cb *cb)

C has no problem with this, but document processing tools do, and in general it doesn't seem like a good practice to have the same name for both.

Regards,
Luben

Quoted 50 lines

Christian.

Quoted 46 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -4
index 92a84e7b0db85b..32adc31c093d84 100644
@@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
  };
 
  /**
- * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush sequence
+ * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush sequence
   */
-struct amdgpu_vm_tlb_seq_cb {
+struct amdgpu_vm_tlb_seq_struct {
  	/**
  	 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
  	 */
@@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
  static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
  				 struct dma_fence_cb *cb)
  {
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
 
  	tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
  	atomic64_inc(&tlb_cb->vm->tlb_seq);
@@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  			   struct dma_fence **fence)
  {
  	struct amdgpu_vm_update_params params;
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
  	struct amdgpu_res_cursor cursor;
  	enum amdgpu_sync_mode sync_mode;
  	int r, idx;

base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5

maintainer
#3 lore raw

Am 12.07.23 um 10:03 schrieb Luben Tuikov:

Quoted 8 lines · Christian König
Quoted 6 lines

Am 12.07.23 um 08:58 schrieb Luben Tuikov:

Quoted 3 lines

Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this.

Hui? What exactly is duplicated here? Is the structure defined in different files with a different meaning?

The same name is used for the function and for the structure.

Ah, yeah that wasn't obvious.

In this case the patch is Reviewed-by: Christian König <[email protected]>

Thanks,
Christian.

Quoted 62 lines

struct amdgpu_vm_tlb_seq_cb {...}

and

static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
struct dma_fence_cb *cb)

C has no problem with this, but document processing tools do, and in general it doesn't seem like a good practice to have the same name for both.

Regards,
Luben

Quoted 47 lines

Christian.

Quoted 45 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
   1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -4
index 92a84e7b0db85b..32adc31c093d84 100644
@@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
   };
 
   /**
- * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush sequence
+ * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush sequence
    */
-struct amdgpu_vm_tlb_seq_cb {
+struct amdgpu_vm_tlb_seq_struct {
   	/**
   	 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
   	 */
@@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
   static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
   				 struct dma_fence_cb *cb)
   {
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
 
   	tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
   	atomic64_inc(&tlb_cb->vm->tlb_seq);
@@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
   			   struct dma_fence **fence)
   {
   	struct amdgpu_vm_update_params params;
-	struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+	struct amdgpu_vm_tlb_seq_struct *tlb_cb;
   	struct amdgpu_res_cursor cursor;
   	enum amdgpu_sync_mode sync_mode;
   	int r, idx;

base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5

Reviewed-by
#4 lore raw
Quoted 6 lines · Christian König

Am 12.07.23 um 10:03 schrieb Luben Tuikov:

Quoted 5 lines · Christian König
Quoted 4 lines

Am 12.07.23 um 08:58 schrieb Luben Tuikov:

Quoted 3 lines

Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

Hui? What exactly is duplicated here? Is the structure defined in different files with a different meaning?

The same name is used for the function and for the structure.

Ah, yeah that wasn't obvious.

In this case the patch is Reviewed-by: Christian König <[email protected]>

Thanks.

Quoted 65 lines

Thanks,
Christian.

Quoted 60 lines

struct amdgpu_vm_tlb_seq_cb {...}

and

static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
struct dma_fence_cb *cb)

C has no problem with this, but document processing tools do, and in general it doesn't seem like a good practice to have the same name for both.

Regards,
Luben

Quoted 45 lines

Christian.

Quoted 43 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
   1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -4
index 92a84e7b0db85b..32adc31c093d84 100644
@@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
   };
      /**
- * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush sequence
+ * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush sequence
    */
-struct amdgpu_vm_tlb_seq_cb {
+struct amdgpu_vm_tlb_seq_struct {
       /**
        * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
        */
@@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
   static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
                    struct dma_fence_cb *cb)
   {
-    struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+    struct amdgpu_vm_tlb_seq_struct *tlb_cb;
          tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
       atomic64_inc(&tlb_cb->vm->tlb_seq);
@@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
                  struct dma_fence **fence)
   {
       struct amdgpu_vm_update_params params;
-    struct amdgpu_vm_tlb_seq_cb *tlb_cb;
+    struct amdgpu_vm_tlb_seq_struct *tlb_cb;
       struct amdgpu_res_cursor cursor;
       enum amdgpu_sync_mode sync_mode;
       int r, idx;

base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5

Signature · 1 line
~Randy