Skip to content

Commit

Permalink
skd: Use ARRAY_SIZE() where appropriate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bart Van Assche authored and Jens Axboe committed Aug 18, 2017
1 parent 1cd3c1a commit 0b2e0c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/block/skd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 0b2e0c0

Please sign in to comment.