Skip to contentSkip to conversation

libata: fix ata_xfer_tbl termination

PATCH Applied Tejun Heo 2 participants 2 messages Mar 31, 2006

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: fix ata_xfer_tbl termination

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.

drivers/scsi/libata-core.c +1 -1
Index: work/drivers/scsi/libata-core.c
===================================================================
@@ -278,7 +278,7 @@ static void ata_unpack_xfermask(unsigned
 }
 
 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 },
Applied
#1 lore raw
Quoted 5 lines · Tejun Heo

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.

applied