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] [day] [month] [year] [list]
Message-ID: <20120110171412.GA7164@opensource.wolfsonmicro.com>
Date:	Tue, 10 Jan 2012 17:14:14 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	dd diasemi <dd.diasemi@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: drivers/regulator/core.c: Fixes mapping inside
	regulator_mode_to_status() and makes it returning -EINVAL on
	invalid input.

On Tue, Jan 10, 2012 at 05:09:40PM +0000, dd diasemi wrote:
> On Tue, Jan 10, 2012 at 12:14 AM, Mark Brown

> The behaviour is exactly the same in both cases, because
> REGULATOR_STATUS_OFF == 0.

That's not really the intended behaviour...

> From linux/regulator/driver.h:
> enum regulator_status {
>        REGULATOR_STATUS_OFF,

...if it were intended we'd explicitly set the value here to be zero
here.  The intention is to return an "I don't know" value rather than an
error.

> And to set things up, should regulator_get_status() return negative
> error code or REGULATOR_STATUS_OFF (0) on communication failure?

It should return an error when the I/O fails.
--
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