Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE

Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the
code's readability.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20250113001001.400669-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thorsten Blum and committed by
Mark Brown
8eb27b57 7299cc06

+1 -2
+1 -2
sound/soc/codecs/peb2466.c
··· 26 26 unsigned int count; 27 27 }; 28 28 29 - #define PEB2466_TLV_SIZE (sizeof((unsigned int []){TLV_DB_SCALE_ITEM(0, 0, 0)}) / \ 30 - sizeof(unsigned int)) 29 + #define PEB2466_TLV_SIZE ARRAY_SIZE(((unsigned int[]){TLV_DB_SCALE_ITEM(0, 0, 0)})) 31 30 32 31 struct peb2466_lkup_ctrl { 33 32 int reg;