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: <20150812131750.GO19600@pengutronix.de>
Date:	Wed, 12 Aug 2015 15:17:50 +0200
From:	Markus Pargmann <mpa@...gutronix.de>
To:	Mark Brown <broonie@...nel.org>
Cc:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jonathan Cameron <jic23@...nel.org>, kernel@...gutronix.de,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 10/20] regmap: _regmap_raw_multi_reg_write: Add
 reg_write() support

On Wed, Aug 12, 2015 at 01:39:23PM +0100, Mark Brown wrote:
> On Wed, Aug 12, 2015 at 12:12:35PM +0200, Markus Pargmann wrote:
> > Define a fallback for busses which do not define a write() function.
> > Instead we write one register at a time using reg_write().
> > 
> > Without this patch, _regmap_raw_multi_reg_write would break as it tries
> > to call bus->write() without checking if it exists before.
> 
> Why are we trying to use multi write APIs in the first place if we can't
> do raw I/O?

Because we may not know if the bus supports raw IO and I would prefer
if it is not necessary to know in the driver that just uses the regmap
API if the underlying bus supports it.

Sorry this patch is wrong, instead it should set can_multi_write
properly depending on the availability of map->bus->write(). The code
would already handle multi writes then.

Thanks,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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