* [PATCH] skd: use ARRAY_SIZE() to calculate size of an array.
@ 2016-05-11 16:31 Muhammad Falak R Wani
0 siblings, 0 replies; only message in thread
From: Muhammad Falak R Wani @ 2016-05-11 16:31 UTC (permalink / raw)
To: Jens Axboe; +Cc: Jeff Moyer, Ming Lin, linux-kernel
Use the macro ARRAY_SIZE() to calculate the size of an array, enhancing
readability and compactnes.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/block/skd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 910e065..6bd8f29 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2282,7 +2282,7 @@ skd_check_status(struct skd_device *skdev,
skerr->key, skerr->code, skerr->qual, skerr->fruc);
/* Does the info match an entry in the good category? */
- n = sizeof(skd_chkstat_table) / sizeof(skd_chkstat_table[0]);
+ n = ARRAY_SIZE(skd_chkstat_table);
for (i = 0; i < n; i++) {
struct sns_info *sns = &skd_chkstat_table[i];
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-11 16:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 16:31 [PATCH] skd: use ARRAY_SIZE() to calculate size of an array Muhammad Falak R Wani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox