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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Jul 2018 09:38:20 +0200
From:   jacopo mondi <jacopo@...ndi.org>
To:     sakari.ailus@....fi
Cc:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Akinobu Mita <akinobu.mita@...il.com>,
        linux-media@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
        Peter Rosin <peda@...ntia.se>,
        Sebastian Reichel <sebastian.reichel@...labora.co.uk>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Jacopo Mondi <jacopo+renesas@...ndi.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab@...pensource.com>
Subject: Re: [PATCH -next v4 2/3] media: ov772x: use SCCB regmap

Hi all,

On Thu, Jul 19, 2018 at 04:10:20PM +0300, sakari.ailus@....fi wrote:
> On Thu, Jul 19, 2018 at 03:14:06PM +0300, Laurent Pinchart wrote:
> > On Thursday, 19 July 2018 11:42:08 EEST Wolfram Sang wrote:
> > > > > -static int ov772x_mask_set(struct i2c_client *client, u8  command, u8
> > > > > mask,
> > > > > -			   u8  set)
> > > > > -{
> > > > > -	s32 val = ov772x_read(client, command);
> > > > > -
> > > > > -	if (val < 0)
> > > > > -		return val;
> > > > > -
> > > > > -	val &= ~mask;
> > > > > -	val |= set & mask;
> > > > > -
> > > > > -	return ov772x_write(client, command, val);
> > > > > -}
> > > > > -
> > > >
> > > > If I were you I would have kept these functions and wrapped the regmap
> > > > operations there. This is not an issue though if you prefer it this
> > > > way :)
> > >
> > > I have suggested this way. It is not a show stopper issue, but I still
> > > like this version better.
> >
> > Wrapping the regmap functions minimizes the diff and makes it easier to
> > backport the driver.

This was my reasoning too, but I'm happy with the current
implementation. Thanks Akinobu for handling this!

>
> May be, but using the regmap functions directly makes the driver cleaner.
> Most drivers have some kind of wrappers around the I²C framework (or
> regmap) functions; this one is one of the few to get rid of them.
>
> The two could be done in a separate patch, too, albeit I think the current
> one seems fine as such.
>
> --
> Sakari Ailus
> e-mail: sakari.ailus@....fi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ