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: <20120507111327.GH4415@opensource.wolfsonmicro.com>
Date:	Mon, 7 May 2012 12:13:28 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	gregkh@...uxfoundation.org, lrg@...com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1 2/4] regulator: tps62360: enable register cache

On Mon, May 07, 2012 at 01:05:37PM +0530, Laxman Dewangan wrote:

>  static const struct regmap_config tps62360_regmap_config = {
> -	.reg_bits = 8,
> -	.val_bits = 8,
> +	.reg_bits		= 8,
> +	.val_bits		= 8,
> +	.max_register		= REG_CHIPID,
> +	.num_reg_defaults_raw	= REG_CHIPID + 1,
> +	.cache_type		= REGCACHE_RBTREE,
>  };

Since you're using the rbtree cache which can fill itself gradually it's
better to not set num_reg_defaults_raw, especially not without providing
the defaults.  Doing this may lead to bugs later as the framework thinks
it has the chip defaults when it doesn't really.  If you omit this we'll
just cache gradually as we access the registers.

The ability to read the default values from the chip is intended for use
with caches which must have defaults, and should only be used when doing
a hard reset of the device during startup.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ