[PATCH] drivers/block: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
duplicate of ARRAY_SIZE. Some trailing whitespaces are also removed.

drivers/block/acsi* has been left out as it's marked BROKEN.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Tobias Klauser
2006-01-08 01:05:11 -08:00
committed by Linus Torvalds
parent ef9ceab282
commit 945f390f02
7 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ static struct {
{ 6, TYPE_HD }, /* 31: H1640 <- was H1600 == h1600 for PC */
};
#define NUM_DISK_MINORS (sizeof(minor2disktype)/sizeof(*minor2disktype))
#define NUM_DISK_MINORS ARRAY_SIZE(minor2disktype)
/*
* Maximum disk size (in kilobytes). This default is used whenever the