summaryrefslogtreecommitdiffstats
path: root/drivers/block/skd_main.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-17 13:13:11 -0700
committerJens Axboe <axboe@kernel.dk>2017-08-18 08:45:29 -0600
commit0b2e0c0772fa39fbd8dc4b959a5f3ede48ec643c (patch)
treec726869328860936716ac90010d8f72d5eb766a9 /drivers/block/skd_main.c
parent1cd3c1aba3376b0283ddf19b253f510055d551fe (diff)
downloadop-kernel-dev-0b2e0c0772fa39fbd8dc4b959a5f3ede48ec643c.zip
op-kernel-dev-0b2e0c0772fa39fbd8dc4b959a5f3ede48ec643c.tar.gz
skd: Use ARRAY_SIZE() where appropriate
Use ARRAY_SIZE() instead of open-coding it. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r--drivers/block/skd_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 7d5048d..96d7b43 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2160,7 +2160,7 @@ static enum skd_check_status_action
skd_check_status(struct skd_device *skdev,
u8 cmp_status, volatile struct fit_comp_error_info *skerr)
{
- int i, n;
+ int i;
dev_err(&skdev->pdev->dev, "key/asc/ascq/fruc %02x/%02x/%02x/%02x\n",
skerr->key, skerr->code, skerr->qual, skerr->fruc);
@@ -2171,8 +2171,7 @@ skd_check_status(struct skd_device *skdev,
skerr->fruc);
/* Does the info match an entry in the good category? */
- n = sizeof(skd_chkstat_table) / sizeof(skd_chkstat_table[0]);
- for (i = 0; i < n; i++) {
+ for (i = 0; i < ARRAY_SIZE(skd_chkstat_table); i++) {
struct sns_info *sns = &skd_chkstat_table[i];
if (sns->mask & 0x10)
OpenPOWER on IntegriCloud