* [PATCH] drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array.
@ 2017-09-13 8:01 Allen Pais
2017-09-13 18:54 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Allen Pais @ 2017-09-13 8:01 UTC (permalink / raw)
To: linux-kernel; +Cc: airlied, dri-devel, amd-gfx, Allen Pais
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
index 4395a4f..0487936 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
@@ -274,7 +274,7 @@ static const struct pctl_data pctl0_data[] = {
{0x135, 0x12a810},
{0x149, 0x7a82c}
};
-#define PCTL0_DATA_LEN (sizeof(pctl0_data)/sizeof(pctl0_data[0]))
+#define PCTL0_DATA_LEN (ARRAY_SIZE(pctl0_data))
#define PCTL0_RENG_EXEC_END_PTR 0x151
#define PCTL0_STCTRL_REG_SAVE_RANGE0_BASE 0xa640
@@ -310,7 +310,7 @@ static const struct pctl_data pctl1_data[] = {
{0x1f0, 0x5000a7f6},
{0x1f1, 0x5000a7e4}
};
-#define PCTL1_DATA_LEN (sizeof(pctl1_data)/sizeof(pctl1_data[0]))
+#define PCTL1_DATA_LEN (ARRAY_SIZE(pctl1_data))
#define PCTL1_RENG_EXEC_END_PTR 0x1f1
#define PCTL1_STCTRL_REG_SAVE_RANGE0_BASE 0xa000
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array.
2017-09-13 8:01 [PATCH] drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array Allen Pais
@ 2017-09-13 18:54 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2017-09-13 18:54 UTC (permalink / raw)
To: Allen Pais; +Cc: LKML, Dave Airlie, amd-gfx list, Maling list - DRI developers
On Wed, Sep 13, 2017 at 4:01 AM, Allen Pais <allen.lkml@gmail.com> wrote:
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> index 4395a4f..0487936 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> @@ -274,7 +274,7 @@ static const struct pctl_data pctl0_data[] = {
> {0x135, 0x12a810},
> {0x149, 0x7a82c}
> };
> -#define PCTL0_DATA_LEN (sizeof(pctl0_data)/sizeof(pctl0_data[0]))
> +#define PCTL0_DATA_LEN (ARRAY_SIZE(pctl0_data))
>
> #define PCTL0_RENG_EXEC_END_PTR 0x151
> #define PCTL0_STCTRL_REG_SAVE_RANGE0_BASE 0xa640
> @@ -310,7 +310,7 @@ static const struct pctl_data pctl1_data[] = {
> {0x1f0, 0x5000a7f6},
> {0x1f1, 0x5000a7e4}
> };
> -#define PCTL1_DATA_LEN (sizeof(pctl1_data)/sizeof(pctl1_data[0]))
> +#define PCTL1_DATA_LEN (ARRAY_SIZE(pctl1_data))
>
> #define PCTL1_RENG_EXEC_END_PTR 0x1f1
> #define PCTL1_STCTRL_REG_SAVE_RANGE0_BASE 0xa000
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-13 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-13 8:01 [PATCH] drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array Allen Pais
2017-09-13 18:54 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®