Re: [PATCH 3/6] IDE: ide-cd: fix test unsigned var < 0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Sunday, April 27, 2008 - 11:32 am

On Thursday 17 April 2008, Boris Petkov wrote:

drivers/ide/ide-cd.c: In function ‘cdrom_analyze_sense_data’:
drivers/ide/ide-cd.c:180: warning: comparison of distinct pointer types lacks a cast

[ which actually hints us into real issue -> please think what would
  happen if bio_sectors() returns _zero_ before and after the patch ]

I applied the patch replacing the above code with:

	bio_sectors = max(bio_sectors(failed_command->bio), 4U);
	sector &= ~(bio_sectors - 1);

Thanks,
Bart
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/6] IDE: ide-cd: fix test unsigned var &lt; 0, Bartlomiej Zolnierki ..., (Wed Apr 16, 3:40 pm)
Re: [PATCH 3/6] IDE: ide-cd: fix test unsigned var &lt; 0, Bartlomiej Zolnierki ..., (Sun Apr 27, 11:32 am)
Re: [PATCH 3/6] IDE: ide-cd: fix test unsigned var < 0, Bartlomiej Zolnierki ..., (Sun Apr 27, 11:32 am)