From: Mark Brown <broonie@kernel.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Andreas Kemnade <andreas@kemnade.info>,
j.neuschaefer@gmx.net, contact@paulk.fr,
GNUtoo@cyberdimension.org, josua.mayer@jm0.eu,
lgirdwood@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] regulator: core: fix handling negative voltages e.g. in EPD PMICs
Date: Mon, 24 Feb 2020 12:31:22 +0000 [thread overview]
Message-ID: <20200224123122.GH6215@sirena.org.uk> (raw)
In-Reply-To: <1548203B-9D64-4128-9BED-D3BC30F9DC49@goldelico.com>
[-- Attachment #1: Type: text/plain, Size: 858 bytes --]
On Mon, Feb 24, 2020 at 01:22:21PM +0100, H. Nikolaus Schaller wrote:
> > Am 24.02.2020 um 13:05 schrieb Mark Brown <broonie@kernel.org>:
> > This is what'd be needed, your approach here is a bit of a hack and
> > leaves some values unrepresentable if they overlap with errnos which
> > obviously has issues if someone has a need for those values.
> Negative ERRNOs have BIT(31) set.
This code is working with the numberic representation, not with the
bitwise representation - it's using -MAX_ERRNO.
> But then it seems to be a little inconsistent that the voltage
> parameters of regulator_set_voltage_unlocked() are signed integers
> and not unsigned.
> So shouldn't that be protected against attempting to set negative voltages?
Or just convert it to unsigned, I don't recall there being any
particular reason why it's signed.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-02-24 12:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-23 15:35 [PATCH RFC] regulator: core: fix handling negative voltages e.g. in EPD PMICs Andreas Kemnade
2020-02-24 12:05 ` Mark Brown
2020-02-24 12:22 ` H. Nikolaus Schaller
2020-02-24 12:31 ` Mark Brown [this message]
2020-02-24 18:46 ` Andreas Kemnade
2020-02-24 15:21 ` Denis 'GNUtoo' Carikli
2020-02-24 17:00 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200224123122.GH6215@sirena.org.uk \
--to=broonie@kernel.org \
--cc=GNUtoo@cyberdimension.org \
--cc=andreas@kemnade.info \
--cc=contact@paulk.fr \
--cc=hns@goldelico.com \
--cc=j.neuschaefer@gmx.net \
--cc=josua.mayer@jm0.eu \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox