Re: [PATCH v2] ALSA: hda/ca0132 - use ARRAY_SIZE

From: Takashi Iwai
Date: Fri Oct 13 2017 - 09:14:30 EST


On Fri, 13 Oct 2017 04:36:31 +0200,
JÃrÃmy Lefaure wrote:
>
> 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))
> )
>
> Signed-off-by: JÃrÃmy Lefaure <jeremy.lefaure@xxxxxxxxxxxx>
> ---
> Changes since v1:
> - keep sound/oss untouched

Applied, thanks.


Takashi