From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
"Leonid V. Fedorenchik" <leonidsbox@gmail.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
devel@driverdev.osuosl.org, linux-media@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] Staging: cx25821: off by on in cx25821_vidioc_s_input()
Date: Wed, 12 Oct 2011 11:14:12 +0300 [thread overview]
Message-ID: <20111012081412.GE18470@longonot.mountain> (raw)
In-Reply-To: <4E94AE2D.4050408@redhat.com>
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
next prev parent reply other threads:[~2011-10-12 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 13:26 [patch] Staging: cx25821: off by on in cx25821_vidioc_s_input() Dan Carpenter
2011-10-11 20:59 ` Mauro Carvalho Chehab
2011-10-12 8:14 ` Dan Carpenter [this message]
2011-10-12 8:29 ` Dan Carpenter
2011-10-13 6:41 ` [patch v2] Staging: cx25821: off by one " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111012081412.GE18470@longonot.mountain \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=leonidsbox@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox