Re: [patch] [media] tw686x: off by one bugs in tw686x_fields_map()

2016-04-27 Thread Mauro Carvalho Chehab
Em Wed, 27 Apr 2016 07:31:59 -0300 Mauro Carvalho Chehab escreveu: > Hi Dan, > > Em Wed, 27 Apr 2016 11:09:28 +0300 > Dan Carpenter escreveu: > > > The > ARRAY_SIZE() should be >= ARRAY_SIZE(). > > I actually did this fix when I produced

Re: [patch] [media] tw686x: off by one bugs in tw686x_fields_map()

2016-04-27 Thread Dan Carpenter
On Wed, Apr 27, 2016 at 07:31:59AM -0300, Mauro Carvalho Chehab wrote: > I don't like magic numbers, but, in this very specific case, setting > frames per second (fps) var to 25 or 30 makes much more sense. Fine fine. I buy that rationale. regards, dan carpenter -- To unsubscribe from this

Re: [patch] [media] tw686x: off by one bugs in tw686x_fields_map()

2016-04-27 Thread Mauro Carvalho Chehab
Hi Dan, Em Wed, 27 Apr 2016 11:09:28 +0300 Dan Carpenter escreveu: > The > ARRAY_SIZE() should be >= ARRAY_SIZE(). I actually did this fix when I produced the patch, just I forgot to fold it when merging. Anyway, this was fixed upstream by this patch:

[patch] [media] tw686x: off by one bugs in tw686x_fields_map()

2016-04-27 Thread Dan Carpenter
The > ARRAY_SIZE() should be >= ARRAY_SIZE(). Also this is a slightly unrelated cleanup but I replaced the magic numbers 30 and 25 with ARRAY_SIZE() - 1. Fixes: 363d79f1d5bd ('[media] tw686x: Don't go past array') Signed-off-by: Dan Carpenter diff --git