:)
Regards,
Christian.
If so, we need a separate patch to cleanup them in a batch.
BR,
Xiaojie
From: Christian König
Sent: Monday, July 13, 2020 4:38 PM
To: Yuan, Xiaojie; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: use ARRAY_SIZE() to a
automatically
If so, we need a separate patch to cleanup them in a batch.
BR,
Xiaojie
From: Christian König
Sent: Monday, July 13, 2020 4:38 PM
To: Yuan, Xiaojie; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: use ARRAY_SIZE() to add amdgpu
Am 13.07.20 um 07:59 schrieb Xiaojie Yuan:
to easily add new debugfs file w/o changing the hardcoded list count.
In general a good idea, but I would rather like to see
amdgpu_debugfs_add_files() completely removed and debugfs_create_file()
used directly instead.
Christian.
Signed-off-by:
[AMD Public Use]
Reviewed-by: Hawking Zhang
Regards,
Hawking
-Original Message-
From: amd-gfx On Behalf Of Xiaojie Yuan
Sent: Monday, July 13, 2020 14:00
To: amd-gfx@lists.freedesktop.org
Cc: Yuan, Xiaojie
Subject: [PATCH] drm/amdgpu: use ARRAY_SIZE() to add amdgpu debugfs files
to
to easily add new debugfs file w/o changing the hardcoded list count.
Signed-off-by: Xiaojie Yuan
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 --
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c| 3 ++-
3 files changed, 8 insertions(+), 4 de
On Mon, Oct 16, 2017 at 3:48 AM, Christian König
wrote:
> Am 16.10.2017 um 04:29 schrieb Jérémy Lefaure:
>>
>> Using the ARRAY_SIZE macro improves the readability of the code.
>>
>> Found with Coccinelle with the following semantic patch:
>> @r depends on (org || report)@
>> type T;
>> T[] E;
>> p
Using the ARRAY_SIZE macro improves the readability of the code.
Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
(sizeof(E)@p /sizeof(*E))
|
(sizeof(E)@p /sizeof(E[...]))
|
(sizeof(E)@p /sizeof(T))
)
Reviewed-by: Thierry R
Am 16.10.2017 um 04:29 schrieb Jérémy Lefaure:
Using the ARRAY_SIZE macro improves the readability of the code.
Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
(sizeof(E)@p /sizeof(*E))
|
(sizeof(E)@p /sizeof(E[...]))
|