drivers/net/wireless/ath9k/rc.c: use ARRAY_SIZE
authorJulia Lawall <julia@diku.dk>
Sun, 9 Nov 2008 16:56:10 +0000 (17:56 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 21 Nov 2008 16:08:16 +0000 (11:08 -0500)
commit87c1687d1a7bf0d4975d613cb699ba95b329359e
treee643bba6f090292d7395ec5b9e9ac93a78ceab9f
parentf9f88fed3433139b58962011c81597b44fd48458
drivers/net/wireless/ath9k/rc.c: use ARRAY_SIZE

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.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@i@
@@

#include <linux/kernel.h>

@depends on i using "paren.iso"@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/rc.c