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]
Message-ID: <20110716020618.GB16014@ponder.secretlab.ca>
Date:	Fri, 15 Jul 2011 20:06:18 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Greg KH <greg@...ah.com>,
	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...com>,
	Samuel Oritz <sameo@...ux.intel.com>,
	Graeme Gregory <gg@...mlogic.co.uk>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] regulator: Convert tps65023 to use regmap API

On Sat, Jul 16, 2011 at 10:47:09AM +0900, Mark Brown wrote:
> On Fri, Jul 15, 2011 at 12:29:54PM -0600, Grant Likely wrote:
> > On Fri, Jul 15, 2011 at 01:48:05PM +0900, Mark Brown wrote:
> 
> > > Right, the driver is always going to know exactly what bus it registered
> > > on but for many drivers we don't really have any bus-specific code once
> > > we factor out the register I/O.
> 
> > Exactly my point.  The only time a global registration list is needed
> > is at setup time.  Once the regmap structure is initialized, it
> > doesn't need to reference the list.  I far prefer the simplicity of an
> > explicit bus type initialization than the implicit method with the
> 
> I'm just not seeing massive complexity here, and I am writing a lot of
> multi-bus drivers with bolierplate code.  My ideal world would be one
> line probe and exit functions for the buses, or better yet a single ops
> structure assigned to both buses, as with my user hat on if I'm telling
> the API the struct device to use I really shouldn't be having to tell it
> what bus the device is on since I just told it that.
> 
> > extra indirection code needed to implement it, by my measure, ~60-70
> > lines of code.
> 
> If you're talking about pure lines of code here then obviously you don't
> need to convert terribly many drivers before you end up with a saving
> overall.
> 
> > Also, making is explicit guarantees that there is no question about
> > the i2c or spi module of regmap getting loaded before it gets used.
> 
> The bus must obviously be ready for the device to probe in the first
> place and the regmap API is static only so it'll always be there.  We
> just need to load the regmap hooks along with the bus core and we're
> fine.
> 
> Still, the merge window is getting near so I guess I'll make the change :/

:)  Indeed.  We can merge without and then enjoy the argument at our
leisure after the merge window.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ