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:	Wed, 11 Jul 2012 16:13:00 +0100
From:	Krystian Garbaciak <krystian.garbaciak@...semi.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Liam Girdwood <lrg@...com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: Fix bug in regulator_mode_to_status() core function.

> > > This is deliberate.  It's not reporting an error, it's reporting an
> > > indeterminate status which is a different thing.
> 
> > Ok, then I would propose to use REGULATOR_STATUS_OFF instead of 0, to present
> > your deliberate decision here.
> 
> I don't think you're fully understanding "indeterminate" there...  the
> whole point is that we can't adequately represent the state, making
> something up isn't helping things.

Would it make more sense to have some special enum value for that case, let say
there would be REGULATOR_STATUS_UNDEFINED?

Returning 0 is interpreted as REGULATOR_STATUS_OFF outside the function.
But it may change, if ever the enumeration changes.

--
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