From: Peter Maydell <peter.maydell@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qemu_ram_ptr_length: take ram_addr_t as arguments
Date: Mon, 27 Jun 2011 18:00:26 +0100 [thread overview]
Message-ID: <BANLkTi=QJTfQNJPpQjC1V1K58sUg_ZProg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1106241756410.12963@kaball-desktop>
On 27 June 2011 14:34, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Fri, 24 Jun 2011, Peter Maydell wrote:
>> You probably want to only call qemu_ram_ptr_length() if (todo).
>> (I don't know if anybody ever calls this routine with a zero input
>> length, but that would handle that case too.)
>
> I would rather fix qemu_ram_ptr_length to handle 0 as size argument, and
> then call qemu_ram_ptr_length with 0 size from cpu_physical_memory_map
> (see appended patch).
OK, that should work too.
>> (Also 'addr1' is not a fantastic variable name :-))
>
> Agreed, but it is the same as before :)
> Do you have any better suggestion? Maybe raddr? I admit I am not very
> imaginative with names.
I think raddr is better than addr1, yes.
> + if (*size == 0)
> + return NULL;
Incidentally, QEMU coding style has braces here. scripts/checkpatch.pl
can catch this kind of minor style nit for you (although it is not
infallible...)
-- PMM
next prev parent reply other threads:[~2011-06-27 17:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 11:08 [Qemu-devel] [PATCH] qemu_ram_ptr_length: take ram_addr_t as arguments stefano.stabellini
2011-06-24 16:37 ` Peter Maydell
2011-06-27 13:34 ` Stefano Stabellini
2011-06-27 17:00 ` Peter Maydell [this message]
2011-06-27 17:19 ` Stefano Stabellini
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='BANLkTi=QJTfQNJPpQjC1V1K58sUg_ZProg@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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;
as well as URLs for NNTP newsgroup(s).