From: Tobias Klauser Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton --- sound/pci/fm801.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN sound/pci/fm801.c~sound-pci-fm801-use-array_size-macro sound/pci/fm801.c --- a/sound/pci/fm801.c~sound-pci-fm801-use-array_size-macro +++ a/sound/pci/fm801.c @@ -321,10 +321,8 @@ static unsigned int channels[] = { 2, 4, 6 }; -#define CHANNELS sizeof(channels) / sizeof(channels[0]) - static struct snd_pcm_hw_constraint_list hw_constraints_channels = { - .count = CHANNELS, + .count = ARRAY_SIZE(channels), .list = channels, .mask = 0, }; _