Commit f60c2651 authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

Staging: speakup: Use ARRAY_SIZE macro

ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its type or the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
Signed-off-by: default avatarShraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f34b77ec
......@@ -389,7 +389,7 @@ static struct msg_group_t all_groups[] = {
},
};
static const int num_groups = sizeof(all_groups) / sizeof(struct msg_group_t);
static const int num_groups = ARRAY_SIZE(all_groups);
char *spk_msg_get(enum msg_index_t index)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment