diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-20 17:48:40 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-25 18:14:17 -0400 |
commit | 6d07cb71fdacc710fd9816cddb5c2df0f7bd96b4 (patch) | |
tree | 4ed71340e00685e7556580be5b52f218702441d7 /drivers/scsi/aic7xxx/aic79xx_osm.c | |
parent | 5a09e39810ae0465016c380962e12dd115779b87 (diff) |
[SCSI] drivers/scsi: Handcrafted MIN/MAX macro removal
Cleanups done to use min/max macros from kernel.h. Handcrafted MIN/MAX
macros are changed to use macros in kernel.h
[akpm@osdl.org: fix warning]
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 7 |
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, | |||
1814 | u_int sense_offset; | 1814 | u_int sense_offset; |
1815 | 1815 | ||
1816 | if (scb->flags & SCB_SENSE) { | 1816 | if (scb->flags & SCB_SENSE) { |
1817 | sense_size = MIN(sizeof(struct scsi_sense_data) | 1817 | sense_size = min(sizeof(struct scsi_sense_data) |
1818 | - ahd_get_sense_residual(scb), | 1818 | - ahd_get_sense_residual(scb), |
1819 | sizeof(cmd->sense_buffer)); | 1819 | (u_long)sizeof(cmd->sense_buffer)); |
1820 | sense_offset = 0; | 1820 | sense_offset = 0; |
1821 | } else { | 1821 | } else { |
1822 | /* | 1822 | /* |
@@ -1825,7 +1825,8 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd, | |||
1825 | */ | 1825 | */ |
1826 | siu = (struct scsi_status_iu_header *) | 1826 | siu = (struct scsi_status_iu_header *) |
1827 | scb->sense_data; | 1827 | scb->sense_data; |
1828 | sense_size = MIN(scsi_4btoul(siu->sense_length), | 1828 | sense_size = min_t(size_t, |
1829 | scsi_4btoul(siu->sense_length), | ||
1829 | sizeof(cmd->sense_buffer)); | 1830 | sizeof(cmd->sense_buffer)); |
1830 | sense_offset = SIU_SENSE_OFFSET(siu); | 1831 | sense_offset = SIU_SENSE_OFFSET(siu); |
1831 | } | 1832 | } |