aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index d8d6687e20ad..77ef4d9b0e5f 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -1814,9 +1814,9 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
u_int sense_offset;
if (scb->flags & SCB_SENSE) {
- sense_size = MIN(sizeof(struct scsi_sense_data)
+ sense_size = min(sizeof(struct scsi_sense_data)
- ahd_get_sense_residual(scb),
- sizeof(cmd->sense_buffer));
+ (u_long)sizeof(cmd->sense_buffer));
sense_offset = 0;
} else {
/*
@@ -1825,7 +1825,8 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd,
*/
siu = (struct scsi_status_iu_header *)
scb->sense_data;
- sense_size = MIN(scsi_4btoul(siu->sense_length),
+ sense_size = min_t(size_t,
+ scsi_4btoul(siu->sense_length),
sizeof(cmd->sense_buffer));
sense_offset = SIU_SENSE_OFFSET(siu);
}