From: Hans Verkuil <hansverk@cisco.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Prabhakar Lad <prabhakar.csengg@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH 1/2] v4l2 subdevs: replace get/set_crop by get/set_selection
Date: Wed, 03 Dec 2014 12:17:57 +0100 [thread overview]
Message-ID: <547EF165.9030409@cisco.com> (raw)
In-Reply-To: <547EF0A9.2070004@samsung.com>
Hi Sylwester,
On 12/03/14 12:14, Sylwester Nawrocki wrote:
> Hi Hans,
>
> On 02/12/14 13:21, Hans Verkuil wrote:
>> -static int s5k6aa_set_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>> - struct v4l2_subdev_crop *crop)
>> +static int s5k6aa_set_selection(struct v4l2_subdev *sd,
>> + struct v4l2_subdev_fh *fh,
>> + struct v4l2_subdev_selection *sel)
>> {
>> struct s5k6aa *s5k6aa = to_s5k6aa(sd);
>> struct v4l2_mbus_framefmt *mf;
>> unsigned int max_x, max_y;
>> struct v4l2_rect *crop_r;
>>
>> + if (sel->pad || sel->target != V4L2_SEL_TGT_CROP)
>> + return -EINVAL;
>> +
>
> Isn't checking sel->pad redundant here ? There is already the pad index
> validation in check_selection() in v4l2-subdev.c and this driver has only
> one pad.
If it is called from a bridge driver, then it hasn't gone through
check_selection().
That said, if it is called from a bridge driver, then one might expect
correct usage of pad.
Laurent, do you have an opinion on this?
Regards,
Hans
next prev parent reply other threads:[~2014-12-03 11:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 12:21 [PATCH 1/2] v4l2 subdevs: replace get/set_crop by get/set_selection Hans Verkuil
2014-12-02 12:21 ` [PATCH 2/2] v4l2-subdev: drop get/set_crop pad ops Hans Verkuil
2014-12-02 12:33 ` Laurent Pinchart
2014-12-02 12:44 ` [PATCH 1/2] v4l2 subdevs: replace get/set_crop by get/set_selection Laurent Pinchart
2014-12-03 0:50 ` Prabhakar Lad
2014-12-03 11:06 ` Sakari Ailus
2014-12-03 14:04 ` Hans Verkuil
2014-12-08 0:17 ` Laurent Pinchart
2014-12-08 1:27 ` Sakari Ailus
2014-12-03 11:14 ` Sylwester Nawrocki
2014-12-03 11:17 ` Hans Verkuil [this message]
2014-12-03 11:49 ` Sylwester Nawrocki
2014-12-03 12:37 ` Hans Verkuil
2014-12-03 13:07 ` Laurent Pinchart
2014-12-03 11:19 ` Sakari Ailus
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=547EF165.9030409@cisco.com \
--to=hansverk@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=prabhakar.csengg@gmail.com \
--cc=s.nawrocki@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.