From fe971071a89c5c5184fc9f3482c7a8e997cf0520 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 9 Jan 2006 20:54:02 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/synclinkmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/synclinkmp.c') diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index ee5a40be9f9..a9467e7d374 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -5104,7 +5104,7 @@ void tx_load_dma_buffer(SLMP_INFO *info, const char *buf, unsigned int count) int register_test(SLMP_INFO *info) { static unsigned char testval[] = {0x00, 0xff, 0xaa, 0x55, 0x69, 0x96}; - static unsigned int count = sizeof(testval)/sizeof(unsigned char); + static unsigned int count = ARRAY_SIZE(testval); unsigned int i; int rc = TRUE; unsigned long flags; @@ -5422,7 +5422,7 @@ int memory_test(SLMP_INFO *info) { static unsigned long testval[] = { 0x0, 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999, 0xffffffff, 0x12345678 }; - unsigned long count = sizeof(testval)/sizeof(unsigned long); + unsigned long count = ARRAY_SIZE(testval); unsigned long i; unsigned long limit = SCA_MEM_SIZE/sizeof(unsigned long); unsigned long * addr = (unsigned long *)info->memory_base; -- cgit v1.2.3-18-g5258