All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH v2] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64()
Date: Mon, 23 Jul 2012 19:16:03 +0200	[thread overview]
Message-ID: <3976016.Ryl9sFuTOd@avalon> (raw)
In-Reply-To: <201207231705.35789.hverkuil@xs4all.nl>

Hi Hans,

On Monday 23 July 2012 17:05:35 Hans Verkuil wrote:
> On Mon July 23 2012 16:02:40 Laurent Pinchart wrote:
> > These helper functions get and set a 64-bit control's value from within
> > a driver. They are similar to v4l2_ctrl_[gs]_ctrl() but operate on
> > 64-bit integer controls instead of 32-bit controls.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[snip]

> > -static int get_ctrl(struct v4l2_ctrl *ctrl, s32 *val)
> > +static int get_ctrl(struct v4l2_ctrl *ctrl, struct v4l2_ext_control *c)
> > 
> >  {
> >  
> >  	struct v4l2_ctrl *master = ctrl->cluster[0];
> >  	int ret = 0;
> >  	int i;
> > 
> > +	/* String controls are not supported. The new_to_user() and
> > +	 * cur_to_user() calls below would need to be fixed not to access
> > +	 * userspace memory.
> 
> Just one small suggestion: change this comment to:
> 
> 	/* String controls are not supported. The new_to_user() and
> 	 * cur_to_user() calls below would need to be modified not to access
> 	 * userspace memory when called from get_ctrl().
> 	 */
> 
> And a similar change in the comment with set_ctrl.
> 
> The word 'fixed' suggested that new_to_user etc. were broken, which isn't
> the case. We are just using it in a special situation.

OK. Fixed.

> With the above change to get/set_ctrl you can add my
> 
> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Thank you. I'll resubmit the patch (along with a driver patch that uses it). 
Would you like to push it through your tree ?

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2012-07-23 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 14:02 [PATCH v2] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64() Laurent Pinchart
2012-07-23 15:05 ` Hans Verkuil
2012-07-23 17:16   ` Laurent Pinchart [this message]
2012-07-23 18:00     ` Hans Verkuil

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=3976016.Ryl9sFuTOd@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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.