On Sat, 24 Jan 2009 17:27:09 -0800 (PST) Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote: > On Mon, 19 Jan 2009, Trent Piepho wrote: > > On Sat, 17 Jan 2009, Roel Kluin wrote: > > > Please review, this patch was not tested. > > > > > > The static function set_tvnorm is called in > > > drivers/media/video/bt8xx/bttv-driver.c: > > > > > > 1355: set_tvnorm(btv, norm); > > > 1868: set_tvnorm(btv, i); > > > 3273: set_tvnorm(btv,btv->tvnorm); > > > > > > in the first two with an unsigned, but bttv->tvnorm is signed. > > > > Probably better to just change bttv->tvnorm is unsigned if we can. > > Here is an improved patch that does a full tvnorm fix for the driver. The > tvnorm value is an index into an array and is never allowed to be negative > or otherwise invalid. Most places it was passed around were unsigned, but > a few structs and functions had signed values. > > I got rid of the "< 0" checks and changed some ">= BTTV_TVNORMS" checks > to BUG_ON(). > > Any problems with this patch Roel? > > Mauro, don't apply as is, I'll send a pull request for a real patch later. Ok. Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html