Re: [PATCH v7 3/3] media: i2c: ov772x: Add test pattern control
From: Sakari Ailus
Date: Fri Oct 02 2020 - 17:58:29 EST
On Fri, Oct 02, 2020 at 10:32:05PM +0100, Lad, Prabhakar wrote:
> Hi Sakari,
>
> Thank you for the review.
>
> On Fri, Oct 2, 2020 at 10:13 PM Sakari Ailus
> <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> >
> > On Fri, Oct 02, 2020 at 05:56:56PM +0100, Lad Prabhakar wrote:
> > > Add support for test pattern control supported by the sensor.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> > > Reviewed-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > > Reviewed-by: Jacopo Mondi <jacopo@xxxxxxxxxx>
> > > ---
> > > drivers/media/i2c/ov772x.c | 17 ++++++++++++++++-
> > > 1 file changed, 16 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c
> > > index 6b46ad493bf7..b7e10c34ef59 100644
> > > --- a/drivers/media/i2c/ov772x.c
> > > +++ b/drivers/media/i2c/ov772x.c
> > > @@ -227,7 +227,7 @@
> > >
> > > /* COM3 */
> > > #define SWAP_MASK (SWAP_RGB | SWAP_YUV | SWAP_ML)
> > > -#define IMG_MASK (VFLIP_IMG | HFLIP_IMG)
> > > +#define IMG_MASK (VFLIP_IMG | HFLIP_IMG | SCOLOR_TEST)
> > >
> > > #define VFLIP_IMG 0x80 /* Vertical flip image ON/OFF selection */
> > > #define HFLIP_IMG 0x40 /* Horizontal mirror image ON/OFF selection */
> > > @@ -425,6 +425,7 @@ struct ov772x_priv {
> > > const struct ov772x_win_size *win;
> > > struct v4l2_ctrl *vflip_ctrl;
> > > struct v4l2_ctrl *hflip_ctrl;
> > > + unsigned int test_pattern;
> >
> > Alignment.
> >
> > You can get away with one or possibly two but three is too many in such a
> > small number of lines. :-)
> >
> It's aligned as per structure members (non pointers)
What a weird practice. Oh well. Keep as-is then.
checkpatch.pl no longer seems to complain about lines over 80. That keeps
the number of warnings lower but may lead to unintentional long lines when
you don't need them.
--
Sakari Ailus