From 6391a11375de5e2bb1eb8481e54619761dc65d9f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 8 Jun 2006 22:23:48 -0700 Subject: [SCSI] drivers/scsi: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/aic7xxx/aic79xx_proc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/scsi/aic7xxx/aic79xx_proc.c') diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c index 39a27840fce6..24fd59a230bf 100644 --- a/drivers/scsi/aic7xxx/aic79xx_proc.c +++ b/drivers/scsi/aic7xxx/aic79xx_proc.c @@ -76,11 +76,9 @@ static u_int ahd_calc_syncsrate(u_int period_factor) { int i; - int num_syncrates; - num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]); /* See if the period is in the "exception" table */ - for (i = 0; i < num_syncrates; i++) { + for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) { if (period_factor == scsi_syncrates[i].period_factor) { /* Period in kHz */ -- cgit