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:   Mon, 9 Aug 2021 12:14:57 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Mark Brown <broonie@...nel.org>
Cc:     Alistair Francis <alistair@...stair23.me>, robh+dt@...nel.org,
        lgirdwood@...il.com, linux-imx@....com, kernel@...gutronix.de,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        alistair23@...il.com
Subject: Re: [PATCH v9 03/12] mfd: simple-mfd-i2c: Save the register client
 data

On Fri, 06 Aug 2021, Mark Brown wrote:

> On Fri, Aug 06, 2021 at 12:38:36PM +0100, Lee Jones wrote:
> > On Fri, 06 Aug 2021, Alistair Francis wrote:
> 
> > > +	i2c_set_clientdata(i2c, regmap);
> > > +
> 
> > No need to store this here.
> 
> > Just do this in the child device:
> 
> >      dev_get_regmap(pdev->dev.parent, NULL);
> 
> Note that dev_get_regmap() is relatively expensive compared to a simple
> driver data reference since it needs to go search for the device to find
> the regmap, it's not the end of the world especially in the context of
> doing I2C I/O but storing it isn't a terrible idea.

It would be nice if someone could do some metrics on this.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ