On Tue, Aug 10, 2021 at 1:59 AM Daniel Scally <djrscally@xxxxxxxxx> wrote: > > Add a V4L2_CID_HBLANK control to the ov8865 driver. This is read only > with timing control intended to be done via vblanking alone. ... > + hblank = mode->hts < mode->output_size_x ? 0 : mode->hts - mode->output_size_x; In both cases can be hblank = max(mode->output_size_x, mode->hts) - mode->output_size_x; or max_t() in case types are different (but in this case the code might be uglier). > + ctrls->hblank = v4l2_ctrl_new_std(handler, ops, V4L2_CID_HBLANK, hblank, > + hblank, 1, hblank); > + Redundant blank line (pun is not intended :). > + if (ctrls->hblank) > + ctrls->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; ... > + hblank = mode->hts < mode->output_size_x ? 0 : mode->hts - mode->output_size_x; See above. -- With Best Regards, Andy Shevchenko