diff options
Diffstat (limited to 'sys/cam/ata')
-rw-r--r-- | sys/cam/ata/ata_xpt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index 3429bb29a6..3dab055 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -160,9 +160,6 @@ static struct ata_quirk_entry ata_quirk_table[] = }, }; -static const int ata_quirk_table_size = - sizeof(ata_quirk_table) / sizeof(*ata_quirk_table); - static cam_status proberegister(struct cam_periph *periph, void *arg); static void probeschedule(struct cam_periph *probe_periph); @@ -1284,7 +1281,7 @@ ata_find_quirk(struct cam_ed *device) match = cam_quirkmatch((caddr_t)&device->ident_data, (caddr_t)ata_quirk_table, - ata_quirk_table_size, + nitems(ata_quirk_table), sizeof(*ata_quirk_table), ata_identify_match); if (match == NULL) @@ -1579,7 +1576,7 @@ ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) * Take the default quirk entry until we have inquiry * data and can determine a better quirk to use. */ - quirk = &ata_quirk_table[ata_quirk_table_size - 1]; + quirk = &ata_quirk_table[nitems(ata_quirk_table) - 1]; device->quirk = (void *)quirk; device->mintags = 0; device->maxtags = 0; |