Re: [PATCH] drm/amdgpu: Rename to amdgpu_vm_tlb_seq_struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/12/23 01:34, Christian König wrote:
> Am 12.07.23 um 10:03 schrieb Luben Tuikov:
>> On 2023-07-12 03:57, Christian König wrote:
>>> Am 12.07.23 um 08:58 schrieb Luben Tuikov:
>>>> 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 <christian.koenig@xxxxxxx>


Reviewed-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Thanks.

> 
> Thanks,
> Christian.
> 
>>
>> 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
>>
>>> Christian.
>>>
>>>> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>>>> Cc: Alex Deucher <Alexander.Deucher@xxxxxxx>
>>>> Cc: Christian König <christian.koenig@xxxxxxx>
>>>> Link: https://lore.kernel.org/r/b5ebc891-ee63-1638-0377-7b512d34b823@xxxxxxxxxxxxx
>>>> Signed-off-by: Luben Tuikov <luben.tuikov@xxxxxxx>
>>>> ---
>>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
>>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> index 92a84e7b0db85b..32adc31c093d84 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> @@ -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
> 

-- 
~Randy



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux