lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLgCZi6ET0PvC95q@kekkonen.localdomain>
Date: Wed, 3 Sep 2025 11:55:02 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Richard Leitner <richard.leitner@...ux.dev>
Cc: Dave Stevenson <dave.stevenson@...pberrypi.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-leds@...r.kernel.org, Hans Verkuil <hverkuil@...nel.org>
Subject: Re: [PATCH v7 10/10] media: i2c: ov9282: dynamic flash_duration
 maximum

Hi Richard,

On Wed, Sep 03, 2025 at 10:24:46AM +0200, Richard Leitner wrote:
> Hi Sakari,
> 
> On Wed, Sep 03, 2025 at 10:48:48AM +0300, Sakari Ailus wrote:
> > Hi Richard,
> > 
> > On Wed, Sep 03, 2025 at 09:13:35AM +0200, Richard Leitner wrote:
> > > > > @@ -1491,8 +1510,11 @@ static int ov9282_init_controls(struct ov9282 *ov9282)
> > > > >  	/* Flash/Strobe controls */
> > > > >  	v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops, V4L2_CID_FLASH_HW_STROBE_SIGNAL, 0, 1, 1, 0);
> > > > >  
> > > > > -	v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > > > > -			  0, 13900, 1, 8);
> > > > > +	exposure_us = ov9282_exposure_to_us(ov9282, OV9282_EXPOSURE_DEFAULT);
> > > > > +	ov9282->flash_duration = v4l2_ctrl_new_std(ctrl_hdlr,
> > > > > +						   &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > > > > +						   0, exposure_us,
> > > > > +						   1, OV9282_FLASH_DURATION_DEFAULT);
> > > > 
> > > > Wrap this differently, please, e.g. after '='.
> > > 
> > > This is wrapped the same way as all other v4l2_ctrl_new_X() calls in
> > > ov9282_init_controls(). Therefore I've chosen to do it this way here
> > > too.
> > > 
> > > So if I'm going to change this one, IMHO all others should be changed
> > > too (exp_ctrl, again_ctrl, vblank_ctrl, pixel_rate, link_freq_ctrl,
> > > hblank_ctrl). Is this intended?
> > > 
> > > If so I'm wondering if this would be a suiteable approach?
> > > 
> > > ov9282->flash_duration =
> > > 	v4l2_ctrl_new_std(ctrl_hdlr,
> > > 			   &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > > 			   0, exposure_us,
> > > 			   1, OV9282_FLASH_DURATION_DEFAULT);
> > > 
> > > It is fine for checkpatch, but introduces a newline for every ctrl and
> > > tbh I'm not sure if it improves readability?
> > 
> > I don't think it's worse at least. You can also rewrap the rest of the
> > lines:
> > 
> > 	ov9282->flash_duration =
> > 		v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops,
> > 				  V4L2_CID_FLASH_DURATION, 0, exposure_us, 1,
> > 				  OV9282_FLASH_DURATION_DEFAULT);
> > 
> 
> Ok. Fine with me ;)
> 
> So I will adapt this patch and add a new patch which changes the wrapping
> for all remaining v4l2_ctrl_new_X() calls in ov9282_init_controls() to the
> series and send a v8? Or should I wait for feedback from Laurent for v8?

Let's wait for Laurent to review this first. The changes I asked for are
minor.

-- 
Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ