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, 10 Oct 2011 10:23:46 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH 2/2] regmap: Allow caches for devices with no defaults

On Mon, Oct 10, 2011 at 09:41:26AM +0100, Dimitris Papastamos wrote:
> On Sun, Oct 09, 2011 at 02:44:36PM +0100, Mark Brown wrote:

> > +	} else if (map->num_reg_defaults_raw) {
> >  		/* Some devices such as PMICs don't have cache defaults,
> >  		 * we cope with this by reading back the HW registers and
> >  		 * crafting the cache defaults by hand.

> We could probably then also remove the first check in
> regcache_hw_init() I guess.

> The one:

> if (!map->num_reg_defaults_raw)
> 	return -EINVAL;

I felt it was clearer to have the defaults init fail if it doesn't work
so that the callers know what happened.  Otherwise the callers have to
figure out if it succeeded because it did what it was supposed to.
--
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