From: Jonathan Cameron <jic23@cam.ac.uk>
To: Grant Grundler <grundler@google.com>
Cc: Dan Carpenter <error27@gmail.com>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: STAGING:iio:light: fix ISL29018 init to handle brownout
Date: Tue, 30 Aug 2011 17:31:19 +0100 [thread overview]
Message-ID: <4E5D1057.3020706@cam.ac.uk> (raw)
In-Reply-To: <CANEJEGsohYnKXNUKUSfBpXofcNdt13bY_mnFZRUWMpewNjUykg@mail.gmail.com>
On 08/30/11 17:14, Grant Grundler wrote:
> On Tue, Aug 30, 2011 at 3:05 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
> ....
>>> I did change one basic behavior that I think was also broken: cache
>>> the value regardless of if the transaction completed successfully or
>>> not.
>> Don't do that. That means userspace will get an invalid value if it reads
>> in the meantime. If you have an error on a hardware bus - tell userspace about
>> it and don't 'guess' what is in the register.
>
> Ah ok - I didn't know this was part of the path to/from user space.
It plausibly isn't, I didn't go over it closely enough to be sure.
Even if not, it's a nasty complexity that will bite someone at some stage.
Mostly comes down to code doing what other code does in the same situation
rather than trying to be clever.
>
>>
>> Otherwise patch looks fine to me.
>
> OK - I'll restore previous behavior and submit another patch.
>
> cheers!
> grant
>
next prev parent reply other threads:[~2011-08-30 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 1:15 STAGING:iio:light: fix ISL29018 init to handle brownout Dan Carpenter
2011-08-26 5:27 ` Grant Grundler
2011-08-26 21:58 ` Grant Grundler
2011-08-26 22:18 ` Dan Carpenter
2011-08-26 22:42 ` Grant Grundler
2011-08-30 10:05 ` Jonathan Cameron
2011-08-30 16:14 ` Grant Grundler
2011-08-30 16:31 ` Jonathan Cameron [this message]
2011-08-30 16:45 ` Grant Grundler
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=4E5D1057.3020706@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=devel@driverdev.osuosl.org \
--cc=error27@gmail.com \
--cc=grundler@google.com \
--cc=linux-iio@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