Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725354
| From | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] skd: Use ARRAY_SIZE macro |
| Date | 2017-09-01 23:40 +0200 |
| Message-ID | <ul1Pr-2fo-13@gated-at.bofh.it> (permalink) |
| References | <ul1Pr-2fo-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Found by a coccinelle run with:
make coccicheck MODE=patch COCCI=scripts/coccinelle/misc/array_size.cocci
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
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 d0368682bd43..623bc92bde5c 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2275,7 +2275,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.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 4/6] skd: Use ARRAY_SIZE macro Thomas Meyer <thomas@m3y3r.de> - 2017-09-01 23:40 +0200
csiph-web