diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-01-08 01:05:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:14:08 -0800 |
commit | 945f390f02ce44a13aefc6d9449c99f33c9286a5 (patch) | |
tree | be5685ed17677b4c076b69e7d4d77eae4cbe718c /drivers/block/cciss.c | |
parent | ef9ceab28203690a42d7d3915ccf6e208f0762bc (diff) | |
download | op-kernel-dev-945f390f02ce44a13aefc6d9449c99f33c9286a5.zip op-kernel-dev-945f390f02ce44a13aefc6d9449c99f33c9286a5.tar.gz |
[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>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | drivers/block/cciss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 46e8356..74818cc 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -103,7 +103,7 @@ static const struct pci_device_id cciss_pci_device_id[] = { }; MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); -#define NR_PRODUCTS (sizeof(products)/sizeof(struct board_type)) +#define NR_PRODUCTS ARRAY_SIZE(products) /* board_id = Subsystem Device ID & Vendor ID * product = Marketing Name for the board @@ -2833,7 +2833,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) c->board_id = board_id; #ifdef CCISS_DEBUG - print_cfg_table(c->cfgtable); + print_cfg_table(c->cfgtable); #endif /* CCISS_DEBUG */ for(i=0; i<NR_PRODUCTS; i++) { |