linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/6] IDE: ide-cd: fix test unsigned var < 0
@ 2008-04-16  2:06 Roel Kluin
  2008-04-16 22:40 ` Bartlomiej Zolnierkiewicz
  2008-04-27 18:32 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 8+ messages in thread
From: Roel Kluin @ 2008-04-16  2:06 UTC (permalink / raw)
  To: bzolnier; +Cc: linux-ide, lkml

Is this the right fix in this case?
---
valid is unsigned and cannot be below 0.,
    
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c8d0e87..a60f5df 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -182,8 +182,6 @@ void cdrom_analyze_sense_data(ide_drive_t *drive,
 			sector &= ~(bio_sectors -1);
 			valid = (sector - failed_command->sector) << 9;
 
-			if (valid < 0)
-				valid = 0;
 			if (sector < get_capacity(info->disk) &&
 				drive->probed_capacity - sector < 4 * 75) {
 				set_capacity(info->disk, sector);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-04-27 19:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16  2:06 [PATCH 3/6] IDE: ide-cd: fix test unsigned var < 0 Roel Kluin
2008-04-16 22:40 ` Bartlomiej Zolnierkiewicz
2008-04-17  3:51   ` Roel Kluin
2008-04-17  9:12     ` Boris Petkov
2008-04-17 11:04       ` Roel Kluin
2008-04-17 12:01         ` Boris Petkov
2008-04-27 18:32           ` Bartlomiej Zolnierkiewicz
2008-04-27 18:32 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).