diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 2c801672d8bb..eadfefdd8d7a 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -886,7 +886,7 @@ ahc_linux_setup_tag_info_global(char *p) | |||
886 | tags = simple_strtoul(p + 1, NULL, 0) & 0xff; | 886 | tags = simple_strtoul(p + 1, NULL, 0) & 0xff; |
887 | printf("Setting Global Tags= %d\n", tags); | 887 | printf("Setting Global Tags= %d\n", tags); |
888 | 888 | ||
889 | for (i = 0; i < NUM_ELEMENTS(aic7xxx_tag_info); i++) { | 889 | for (i = 0; i < ARRAY_SIZE(aic7xxx_tag_info); i++) { |
890 | for (j = 0; j < AHC_NUM_TARGETS; j++) { | 890 | for (j = 0; j < AHC_NUM_TARGETS; j++) { |
891 | aic7xxx_tag_info[i].tag_commands[j] = tags; | 891 | aic7xxx_tag_info[i].tag_commands[j] = tags; |
892 | } | 892 | } |
@@ -898,7 +898,7 @@ ahc_linux_setup_tag_info(u_long arg, int instance, int targ, int32_t value) | |||
898 | { | 898 | { |
899 | 899 | ||
900 | if ((instance >= 0) && (targ >= 0) | 900 | if ((instance >= 0) && (targ >= 0) |
901 | && (instance < NUM_ELEMENTS(aic7xxx_tag_info)) | 901 | && (instance < ARRAY_SIZE(aic7xxx_tag_info)) |
902 | && (targ < AHC_NUM_TARGETS)) { | 902 | && (targ < AHC_NUM_TARGETS)) { |
903 | aic7xxx_tag_info[instance].tag_commands[targ] = value & 0xff; | 903 | aic7xxx_tag_info[instance].tag_commands[targ] = value & 0xff; |
904 | if (bootverbose) | 904 | if (bootverbose) |
@@ -1020,7 +1020,7 @@ aic7xxx_setup(char *s) | |||
1020 | end = strchr(s, '\0'); | 1020 | end = strchr(s, '\0'); |
1021 | 1021 | ||
1022 | /* | 1022 | /* |
1023 | * XXX ia64 gcc isn't smart enough to know that NUM_ELEMENTS | 1023 | * XXX ia64 gcc isn't smart enough to know that ARRAY_SIZE |
1024 | * will never be 0 in this case. | 1024 | * will never be 0 in this case. |
1025 | */ | 1025 | */ |
1026 | n = 0; | 1026 | n = 0; |
@@ -1028,13 +1028,13 @@ aic7xxx_setup(char *s) | |||
1028 | while ((p = strsep(&s, ",.")) != NULL) { | 1028 | while ((p = strsep(&s, ",.")) != NULL) { |
1029 | if (*p == '\0') | 1029 | if (*p == '\0') |
1030 | continue; | 1030 | continue; |
1031 | for (i = 0; i < NUM_ELEMENTS(options); i++) { | 1031 | for (i = 0; i < ARRAY_SIZE(options); i++) { |
1032 | 1032 | ||
1033 | n = strlen(options[i].name); | 1033 | n = strlen(options[i].name); |
1034 | if (strncmp(options[i].name, p, n) == 0) | 1034 | if (strncmp(options[i].name, p, n) == 0) |
1035 | break; | 1035 | break; |
1036 | } | 1036 | } |
1037 | if (i == NUM_ELEMENTS(options)) | 1037 | if (i == ARRAY_SIZE(options)) |
1038 | continue; | 1038 | continue; |
1039 | 1039 | ||
1040 | if (strncmp(p, "global_tag_depth", n) == 0) { | 1040 | if (strncmp(p, "global_tag_depth", n) == 0) { |
@@ -1360,7 +1360,7 @@ ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) | |||
1360 | 1360 | ||
1361 | tags = 0; | 1361 | tags = 0; |
1362 | if ((ahc->user_discenable & devinfo->target_mask) != 0) { | 1362 | if ((ahc->user_discenable & devinfo->target_mask) != 0) { |
1363 | if (ahc->unit >= NUM_ELEMENTS(aic7xxx_tag_info)) { | 1363 | if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) { |
1364 | if (warned_user == 0) { | 1364 | if (warned_user == 0) { |
1365 | 1365 | ||
1366 | printf(KERN_WARNING | 1366 | printf(KERN_WARNING |