Re: [patch] Staging: cx25821: off by on in cx25821_vidioc_s_input()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 11, 2011 at 05:59:25PM -0300, Mauro Carvalho Chehab wrote:
> > -	if (i > 2) {
> > +	if (i >= 2) {
> 
> It would be better to add a NUM_INPUT macro (or something like that, defined together
> with the INPUT macro) that would do an ARRAY_SIZE(cx25821_boards) and use it here, 
> instead of a "2" magic number.

You're right.  The hard coded 2 is not helpful...  Why not just an:

	if (i >= ARRAY_SIZE(cx25821_boards)) {...

I'll send a patch to do that.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux