libata: kill type mismatch compile warning
authorTejun Heo <htejun@gmail.com>
Thu, 12 Apr 2007 04:38:11 +0000 (13:38 +0900)
committerJeff Garzik <jeff@garzik.org>
Sat, 28 Apr 2007 18:16:02 +0000 (14:16 -0400)
kill the following compile warning.

drivers/ata/libata-core.c:1786: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index 2f2884b..f368387 100644 (file)
@@ -1787,7 +1787,8 @@ int ata_dev_configure(struct ata_device *dev)
        }
 
        if (ata_device_blacklisted(dev) & ATA_HORKAGE_MAX_SEC_128)
-               dev->max_sectors = min(ATA_MAX_SECTORS_128, dev->max_sectors);
+               dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
+                                        dev->max_sectors);
 
        /* limit ATAPI DMA to R/W commands only */
        if (ata_device_blacklisted(dev) & ATA_HORKAGE_DMA_RW_ONLY)