From: Sakari Ailus <sakari.ailus@nokia.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "Aguirre Rodriguez, Sergio Alberto" <saaguirre@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"video4linux-list@redhat.com" <video4linux-list@redhat.com>,
"Tuukka.O Toivonen" <tuukka.o.toivonen@nokia.com>,
"Nagalla, Hari" <hnagalla@ti.com>
Subject: Re: [REVIEW PATCH 01/14] V4L: Int if: Dummy slave
Date: Thu, 22 Jan 2009 11:37:59 +0200 [thread overview]
Message-ID: <49783E77.7070303@nokia.com> (raw)
In-Reply-To: <20090113183330.066d75e4@pedra.chehab.org>
Mauro Carvalho Chehab wrote:
> On Mon, 12 Jan 2009 20:03:08 -0600
> "Aguirre Rodriguez, Sergio Alberto" <saaguirre@ti.com> wrote:
>
>> +static struct v4l2_int_slave dummy_slave = {
>> + /* Dummy pointer to avoid underflow in find_ioctl. */
>> + .ioctls = (void *)0x80000000,
>
> Why are you using here a magic number?
Not really a reason. It could be or actually perhaps anything equal to
or bigger than sizeof(struct v4l2_int_ioctl_desc) so that last doesn't
underflow:
const struct v4l2_int_ioctl_desc *first = slave->ioctls;
const struct v4l2_int_ioctl_desc *last =
first + slave->num_ioctls - 1;
num_ioctls is zero. See find_ioctl in drivers/media/video/v4l2-int-device.c.
I guess that should be changed to sizeof(struct v4l2_int_ioctl_desc).
--
Sakari Ailus
sakari.ailus@nokia.com
next prev parent reply other threads:[~2009-01-22 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 2:03 [REVIEW PATCH 01/14] V4L: Int if: Dummy slave Aguirre Rodriguez, Sergio Alberto
2009-01-13 20:33 ` Mauro Carvalho Chehab
2009-01-22 9:37 ` Sakari Ailus [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-11 20:37 Aguirre Rodriguez, Sergio Alberto
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=49783E77.7070303@nokia.com \
--to=sakari.ailus@nokia.com \
--cc=hnagalla@ti.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=saaguirre@ti.com \
--cc=tuukka.o.toivonen@nokia.com \
--cc=video4linux-list@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