drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array.
Subsystems (2)
PATCH 1/1 drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array.
Signed-off-by Allen Pais <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +2 -2
@@ -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
Signature · 1 line
2.7.4
Alex Deucher
AppliedQuoted 1 line · Allen Pais
Signed-off-by Allen Pais <[email protected]>
Applied. thanks!
Alex
Quoted 29 lines
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +2
-3@@ -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
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel