aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-25 06:08:30 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:23:02 -0500
commita9312fb839e90668d05a90024f3a7e7ff646a4a3 (patch)
tree733a609f9ac45482628dc60cbf17910c65a67520 /drivers/scsi/sd.c
parenta9e102b60c51faa62506132e8780d8003888c98f (diff)
[PATCH] git-scsi-misc: min() warning fix
drivers/scsi/sd.c: In function `sd_store_cache_type': drivers/scsi/sd.c:193: warning: comparison of distinct pointer types lacks a cast Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 024ef86c5242..c647d85d97d1 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -190,7 +190,7 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf,
190 if (scsi_mode_sense(sdp, 0x08, 8, buffer, sizeof(buffer), SD_TIMEOUT, 190 if (scsi_mode_sense(sdp, 0x08, 8, buffer, sizeof(buffer), SD_TIMEOUT,
191 SD_MAX_RETRIES, &data, NULL)) 191 SD_MAX_RETRIES, &data, NULL))
192 return -EINVAL; 192 return -EINVAL;
193 len = min(sizeof(buffer), data.length - data.header_length - 193 len = min_t(size_t, sizeof(buffer), data.length - data.header_length -
194 data.block_descriptor_length); 194 data.block_descriptor_length);
195 buffer_data = buffer + data.header_length + 195 buffer_data = buffer + data.header_length +
196 data.block_descriptor_length; 196 data.block_descriptor_length;