]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/block/ahci.c
linux/kernel.h: sync min, max, min3, max3 macros with Linux
[karo-tx-uboot.git] / drivers / block / ahci.c
index a93a8e1c04b797fe4d8cce58b3e232721c886519..c9a3beb79b2368d96905160052cbec38003ea2cb 100644 (file)
@@ -730,7 +730,7 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
                u16 now_blocks; /* number of blocks per iteration */
                u32 transfer_size; /* number of bytes per iteration */
 
-               now_blocks = min(MAX_SATA_BLOCKS_READ_WRITE, blocks);
+               now_blocks = min((u16)MAX_SATA_BLOCKS_READ_WRITE, blocks);
 
                transfer_size = ATA_SECT_SIZE * now_blocks;
                if (transfer_size > user_buffer_size) {