[PATCH] drivers/char: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
3c6bee1d40
commit
fe971071a8
@@ -813,7 +813,7 @@ static int mxser_init(void)
|
||||
|
||||
/* start finding PCI board here */
|
||||
#ifdef CONFIG_PCI
|
||||
n = (sizeof(mxser_pcibrds) / sizeof(mxser_pcibrds[0])) - 1;
|
||||
n = ARRAY_SIZE(mxser_pcibrds) - 1;
|
||||
index = 0;
|
||||
b = 0;
|
||||
while (b < n) {
|
||||
|
Reference in New Issue
Block a user