[PATCH 5/5] block-skd: Use ARRAY_SIZE() in skd_check_status()
From: SF Markus Elfring
Date: Mon Aug 07 2017 - 09:05:57 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Aug 2017 14:34:33 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Prefer ARRAY_SIZE(skd_chkstat_table)
Thus use this macro.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
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 e53b40341834..555cf4810409 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2272,7 +2272,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];
--
2.13.4