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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160804202646.GH10383@sirena.org.uk>
Date:	Thu, 4 Aug 2016 21:26:46 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Cristian Birsan <cristian.birsan@...rochip.com>
Cc:	nicolas.ferre@...el.com, ludovic.desroches@...el.com,
	alexandre.belloni@...e-electrons.com,
	boris.brezillon@...e-electrons.com, ce3a@....de,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only
 device registers

On Thu, Aug 04, 2016 at 05:55:58PM +0300, Cristian Birsan wrote:
> Add support for dumping write only device registers in debugfs. This is
> useful for audio codecs that have write only registers (like WM8731).
> The logic that decides if a value can be printed is moved to
> regmap_printable() function to allow for easier future updates.

Please check your CC list when sending things upstream - try to ensure
that people you're sending patches to are relevant to the patch.
Maintainers often get lots of mail and having to sort out mail that's
not really relevant to them can make it easier for relevant mail to get
missed.

> +static bool regmap_printable(struct regmap *map, unsigned int reg)
> +{
> +	if (regmap_precious(map, reg))
> +		return false;
> +
> +	if (!regmap_readable(map, reg) && !regmap_cached(map, reg))
> +		return false;
> +
> +	return true;
> +}

This only has one user...

>  	for (i = start_reg; i <= to; i += map->reg_stride) {
> -		if (!regmap_readable(map, i))
> +		if (!regmap_readable(map, i) && !regmap_cached(map, i))
>  			continue;
>  

...though it could have more.

> -			ret = regmap_read(map, i, &val);
> +			if (regmap_readable(map, i))
> +				ret = regmap_read(map, i, &val);
> +			else
> +				ret = regcache_read(map, i, &val);
> +

I don't understand this change, a read will go to cache anyway.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ