Skip to contentSkip to conversation

libata: kill type mismatch compile warning

PATCH Applied Tejun Heo 2 participants 2 messages Apr 12, 2007 – Apr 17, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: kill type mismatch compile warning

kill the following compile warning.

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

drivers/ata/libata-core.c +2 -1
index 735f0b0..3556281 100644
@@ -1783,7 +1783,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)
Applied
#1 lore raw
Quoted 5 lines · Tejun Heo

kill the following compile warning.

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

applied