[PATCH] git-scsi-misc: min() warning fix
authorAndrew Morton <akpm@osdl.org>
Sat, 25 Mar 2006 11:08:30 +0000 (03:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:23:02 +0000 (08:23 -0800)
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>
drivers/scsi/sd.c

index 024ef86c52425cd9b3f5ed05b380dad3b0eff2c0..c647d85d97d14555fc93f02d28ed98d580ff3be3 100644 (file)
@@ -190,7 +190,7 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf,
        if (scsi_mode_sense(sdp, 0x08, 8, buffer, sizeof(buffer), SD_TIMEOUT,
                            SD_MAX_RETRIES, &data, NULL))
                return -EINVAL;
-       len = min(sizeof(buffer), data.length - data.header_length -
+       len = min_t(size_t, sizeof(buffer), data.length - data.header_length -
                  data.block_descriptor_length);
        buffer_data = buffer + data.header_length +
                data.block_descriptor_length;