[PATCH] libata: fix ata_xfer_tbl termination
authorTejun Heo <htejun@gmail.com>
Fri, 31 Mar 2006 13:48:52 +0000 (22:48 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 31 Mar 2006 15:14:42 +0000 (10:14 -0500)
ata_xfer_tbl is terminated by entry with -1 as ->shift.  However,
->shift was unsigned int making the termination condition bogus.  This
patch converts ->shift and ->bits to int.

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

index 63ae23b5c0787aa90d710652474ecc750f3776cc..e63c1ff1e10256ed2b023341c098978a690ad0b8 100644 (file)
@@ -278,7 +278,7 @@ static void ata_unpack_xfermask(unsigned int xfer_mask,
 }
 
 static const struct ata_xfer_ent {
-       unsigned int shift, bits;
+       int shift, bits;
        u8 base;
 } ata_xfer_tbl[] = {
        { ATA_SHIFT_PIO, ATA_BITS_PIO, XFER_PIO_0 },