ALSA: hda/ca0132 - use ARRAY_SIZE
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Fri, 13 Oct 2017 02:36:31 +0000 (22:36 -0400)
committerTakashi Iwai <tiwai@suse.de>
Fri, 13 Oct 2017 13:14:08 +0000 (15:14 +0200)
commita9291f461d2e727ac0812d7021653379fea4b782
treec23373d95c1eb240c8d18e856b0b01b4f44090b3
parent8ed5d192c0beb34c9a679b390c2e4077ae977dc2
ALSA: hda/ca0132 - use ARRAY_SIZE

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@lse.epita.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c