aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_core.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index 50a3dd047cfe..93e4e40944b6 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -68,7 +68,7 @@ char *ahc_chip_names[] =
68 "aic7892", 68 "aic7892",
69 "aic7899" 69 "aic7899"
70}; 70};
71static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); 71static const u_int num_chip_names = ARRAY_SIZE(ahc_chip_names);
72 72
73/* 73/*
74 * Hardware error codes. 74 * Hardware error codes.
@@ -88,7 +88,7 @@ static struct ahc_hard_error_entry ahc_hard_errors[] = {
88 { PCIERRSTAT, "PCI Error detected" }, 88 { PCIERRSTAT, "PCI Error detected" },
89 { CIOPARERR, "CIOBUS Parity Error" }, 89 { CIOPARERR, "CIOBUS Parity Error" },
90}; 90};
91static const u_int num_errors = NUM_ELEMENTS(ahc_hard_errors); 91static const u_int num_errors = ARRAY_SIZE(ahc_hard_errors);
92 92
93static struct ahc_phase_table_entry ahc_phase_table[] = 93static struct ahc_phase_table_entry ahc_phase_table[] =
94{ 94{
@@ -108,7 +108,7 @@ static struct ahc_phase_table_entry ahc_phase_table[] =
108 * In most cases we only wish to itterate over real phases, so 108 * In most cases we only wish to itterate over real phases, so
109 * exclude the last element from the count. 109 * exclude the last element from the count.
110 */ 110 */
111static const u_int num_phases = NUM_ELEMENTS(ahc_phase_table) - 1; 111static const u_int num_phases = ARRAY_SIZE(ahc_phase_table) - 1;
112 112
113/* 113/*
114 * Valid SCSIRATE values. (p. 3-17) 114 * Valid SCSIRATE values. (p. 3-17)
@@ -6367,7 +6367,7 @@ ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch,
6367 struct patch *last_patch; 6367 struct patch *last_patch;
6368 u_int num_patches; 6368 u_int num_patches;
6369 6369
6370 num_patches = sizeof(patches)/sizeof(struct patch); 6370 num_patches = ARRAY_SIZE(patches);
6371 last_patch = &patches[num_patches]; 6371 last_patch = &patches[num_patches];
6372 cur_patch = *start_patch; 6372 cur_patch = *start_patch;
6373 6373