ahci: fix integer sign extension bug

Reported by Coverity.

Change-Id: Ie7eef9570c89c69a05ba45169a0ea838f0d8e320
This commit is contained in:
David van Moolenbroek 2013-10-22 13:58:59 +00:00
parent dbbd766d59
commit 36041198ad

View file

@ -559,7 +559,8 @@ static int ata_id_check(struct port_state *ps, u16_t *buf)
/* Get number of LBA blocks, and sector size. */
ps->lba_count = ((u64_t) buf[ATA_ID_LBA3] << 48) |
((u64_t) buf[ATA_ID_LBA2] << 32) |
(buf[ATA_ID_LBA1] << 16) | buf[ATA_ID_LBA0];
((u64_t) buf[ATA_ID_LBA1] << 16) |
(u64_t) buf[ATA_ID_LBA0];
/* Determine the queue depth of the device. */
if (hba_state.has_ncq &&