diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-01-08 04:05:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:08 -0500 |
commit | 945f390f02ce44a13aefc6d9449c99f33c9286a5 (patch) | |
tree | be5685ed17677b4c076b69e7d4d77eae4cbe718c /drivers/block/cciss.c | |
parent | ef9ceab28203690a42d7d3915ccf6e208f0762bc (diff) |
[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 46e8356a962a..74818cc6509b 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[] = { | |||
103 | }; | 103 | }; |
104 | MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); | 104 | MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); |
105 | 105 | ||
106 | #define NR_PRODUCTS (sizeof(products)/sizeof(struct board_type)) | 106 | #define NR_PRODUCTS ARRAY_SIZE(products) |
107 | 107 | ||
108 | /* board_id = Subsystem Device ID & Vendor ID | 108 | /* board_id = Subsystem Device ID & Vendor ID |
109 | * product = Marketing Name for the board | 109 | * product = Marketing Name for the board |
@@ -2833,7 +2833,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) | |||
2833 | c->board_id = board_id; | 2833 | c->board_id = board_id; |
2834 | 2834 | ||
2835 | #ifdef CCISS_DEBUG | 2835 | #ifdef CCISS_DEBUG |
2836 | print_cfg_table(c->cfgtable); | 2836 | print_cfg_table(c->cfgtable); |
2837 | #endif /* CCISS_DEBUG */ | 2837 | #endif /* CCISS_DEBUG */ |
2838 | 2838 | ||
2839 | for(i=0; i<NR_PRODUCTS; i++) { | 2839 | for(i=0; i<NR_PRODUCTS; i++) { |