Re: [PATCH v3] gpio: gpio-imx-scu: Use ARRAY_SIZE for array length

From: Andy Shevchenko
Date: Thu Aug 10 2023 - 10:35:11 EST


On Thu, Aug 10, 2023 at 4:06 PM <coolrrsh@xxxxxxxxx> wrote:
>
> From: Rajeshwar R Shinde <coolrrsh@xxxxxxxxx>
>
> Use of macro ARRAY_SIZE to calculate array size minimizes
> the redundant code and improves code reusability.
> This fixes warnings reported by Coccinelle:
> drivers/gpio/gpio-imx-scu.c:106:32-33: WARNING: Use ARRAY_SIZE

Yes and this makes code more robust against type changes.
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko