All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	qemu-devel@nongnu.org, atar4qemu@gmail.com
Subject: Re: [Qemu-devel] [PATCH] memory: fix return value on unassigned reads
Date: Thu, 26 Jan 2012 14:18:32 +0200	[thread overview]
Message-ID: <4F214498.2070905@redhat.com> (raw)
In-Reply-To: <4F213999.4060509@adacore.com>

On 01/26/2012 01:31 PM, Fabien Chouteau wrote:
> On 26/01/2012 10:33, Avi Kivity wrote:
> > The memory API returns -1 on unassigned reads, different from the original
> > in exec.c, which returned zero.
>
> Isn't this return value platform specific?

Maybe (and I think ~0 is the common one); the patch just restores the
previous behaviour.

>
> > This breaks grlib_uart; apparently some users depend on it.
> > 
> > Fix by returning zero; however if reading from the uart is legal, then
> > it should be modified to accept reads.
> > 
>
> That's right, grlib_uart depends on it because I took the easy (lazy?)
> way. I will send a patch to handle reads to UART's registers.

Definitely that's the best way to fix the problem.

-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2012-01-26 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26  9:33 [Qemu-devel] [PATCH] memory: fix return value on unassigned reads Avi Kivity
2012-01-26 11:31 ` Fabien Chouteau
2012-01-26 12:18   ` Avi Kivity [this message]

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=4F214498.2070905@redhat.com \
    --to=avi@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=chouteau@adacore.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.