]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: *: dev-data: Update to use ARRAY_SIZE
authorNishanth Menon <nm@ti.com>
Thu, 13 Jul 2023 19:36:34 +0000 (14:36 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jul 2023 19:32:12 +0000 (15:32 -0400)
Instead of hard-coding the count of entries manually, use ARRAY_SIZE
to keep the count updates appropriately.

Cc: Bryan Brattlof <bb@ti.com>
Suggested-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
arch/arm/mach-k3/am62ax/dev-data.c
arch/arm/mach-k3/am62x/dev-data.c
arch/arm/mach-k3/j7200/dev-data.c
arch/arm/mach-k3/j721e/dev-data.c
arch/arm/mach-k3/j721s2/dev-data.c

index 74739c63852463092198f7bfa4fc1d7ee7d567bb..abf5d8e91aa2d1a6a684cc81aba73e942b73bee7 100644 (file)
@@ -66,8 +66,8 @@ const struct ti_k3_pd_platdata am62ax_pd_platdata = {
        .pd = soc_pd_list,
        .lpsc = soc_lpsc_list,
        .devs = soc_dev_list,
-       .num_psc = 2,
-       .num_pd = 4,
-       .num_lpsc = 14,
-       .num_devs = 19,
+       .num_psc = ARRAY_SIZE(soc_psc_list),
+       .num_pd = ARRAY_SIZE(soc_pd_list),
+       .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+       .num_devs = ARRAY_SIZE(soc_dev_list),
 };
index 616d0650b9c09dee3a12d9315397738e8fab2ad4..1a6f9e2ca03e302d58764ee8bbe35637d7e2a301 100644 (file)
@@ -71,8 +71,8 @@ const struct ti_k3_pd_platdata am62x_pd_platdata = {
        .pd = soc_pd_list,
        .lpsc = soc_lpsc_list,
        .devs = soc_dev_list,
-       .num_psc = 2,
-       .num_pd = 5,
-       .num_lpsc = 16,
-       .num_devs = 21,
+       .num_psc = ARRAY_SIZE(soc_psc_list),
+       .num_pd = ARRAY_SIZE(soc_pd_list),
+       .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+       .num_devs = ARRAY_SIZE(soc_dev_list),
 };
index c1a4dab6941a1d5f1ccfd8b7df032bf749798a38..4ddc34210ebb9e3b041dfc336b79355076c48edc 100644 (file)
@@ -75,8 +75,8 @@ const struct ti_k3_pd_platdata j7200_pd_platdata = {
        .pd = soc_pd_list,
        .lpsc = soc_lpsc_list,
        .devs = soc_dev_list,
-       .num_psc = 2,
-       .num_pd = 6,
-       .num_lpsc = 17,
-       .num_devs = 23,
+       .num_psc = ARRAY_SIZE(soc_psc_list),
+       .num_pd = ARRAY_SIZE(soc_pd_list),
+       .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+       .num_devs = ARRAY_SIZE(soc_dev_list),
 };
index f0afa3552b7f86cf0f24717e185b1b08dcd62e81..97f017f8af50a218e624e03b0395a643d6ee92bd 100644 (file)
@@ -73,8 +73,8 @@ const struct ti_k3_pd_platdata j721e_pd_platdata = {
        .pd = soc_pd_list,
        .lpsc = soc_lpsc_list,
        .devs = soc_dev_list,
-       .num_psc = 2,
-       .num_pd = 5,
-       .num_lpsc = 16,
-       .num_devs = 23,
+       .num_psc = ARRAY_SIZE(soc_psc_list),
+       .num_pd = ARRAY_SIZE(soc_pd_list),
+       .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+       .num_devs = ARRAY_SIZE(soc_dev_list),
 };
index 35e8b17eb1e7f2c236a1aa9b6868fb51b670c9aa..8c999a3c5a8b0a6e2e19e3ae5180cae55b45dd61 100644 (file)
@@ -79,8 +79,8 @@ const struct ti_k3_pd_platdata j721s2_pd_platdata = {
        .pd = soc_pd_list,
        .lpsc = soc_lpsc_list,
        .devs = soc_dev_list,
-       .num_psc = 2,
-       .num_pd = 6,
-       .num_lpsc = 19,
-       .num_devs = 25,
+       .num_psc = ARRAY_SIZE(soc_psc_list),
+       .num_pd = ARRAY_SIZE(soc_pd_list),
+       .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+       .num_devs = ARRAY_SIZE(soc_dev_list),
 };