From: Keir Fraser <keir.xen@gmail.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator"
Date: Thu, 02 Jun 2011 21:00:47 +0100 [thread overview]
Message-ID: <CA0DAA7F.1B8A7%keir.xen@gmail.com> (raw)
In-Reply-To: <20110602194331.GA32344@dumpdata.com>
On 02/06/2011 20:43, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:
>> + return (void *)(unsigned long)s;
>
> Why the double cast?
gcc complains if you cast between a pointer and an integer of a different
size. We assume in many places that a pointer is same size as a long, so we
cast through a long when the original integer type may be different size. In
this case, in hvmloader, we know that pointers/longs/uint32_t are all
32-bit, but still I quite like the principle of always casting through a
long when the integer is not explicitly that type already.
-- Keir
next prev parent reply other threads:[~2011-06-02 20:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 9:39 [PATCH 00 of 15] Further SeaBIOS support Ian Campbell
2011-06-01 9:39 ` [PATCH 01 of 15] hvmloader: allow per-BIOS decision on loading option ROMS Ian Campbell
2011-06-01 9:39 ` [PATCH 02 of 15] hvmloader: enable PCI_COMMAND_IO on primary VGA device Ian Campbell
2011-06-01 10:04 ` Ian Campbell
2011-06-01 9:39 ` [PATCH 03 of 15] hvmloader: setup PCI bus in a common function again Ian Campbell
2011-06-01 10:05 ` Ian Campbell
2011-06-01 10:44 ` Ian Campbell
2011-06-01 9:39 ` [PATCH 04 of 15] hvmloader: setup APICs " Ian Campbell
2011-06-01 9:40 ` [PATCH 05 of 15] hvmloader: call SMP setup from common code again Ian Campbell
2011-06-01 9:40 ` [PATCH 06 of 15] hvmloader: make ACPI initialisation hook more general Ian Campbell
2011-06-01 9:40 ` [PATCH 07 of 15] hvmloader: make SMBIOS initialisation " Ian Campbell
2011-06-01 9:40 ` [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator" Ian Campbell
2011-06-02 19:43 ` Konrad Rzeszutek Wilk
2011-06-02 20:00 ` Keir Fraser [this message]
2011-06-01 9:40 ` [PATCH 09 of 15] hvmloader: refactor BIOS info setup Ian Campbell
2011-06-01 9:40 ` [PATCH 10 of 15] hvmloader: return MPFPS from create_mp_tables() Ian Campbell
2011-06-01 9:40 ` [PATCH 11 of 15] hvmloader: allow create_mp_tables() to allocate the table Ian Campbell
2011-06-01 9:40 ` [PATCH 12 of 15] hvmloader: smbios: allow the entry point data structure to be located separately Ian Campbell
2011-06-01 9:40 ` [PATCH 13 of 15] hvmloader: further support for SeaBIOS Ian Campbell
2011-06-01 9:40 ` [PATCH 14 of 15] hvmloader: allow the possibility to allocate the size of smbios table we actually need Ian Campbell
2011-06-01 9:40 ` [PATCH 15 of 15] hvmloader: add code to generate a $PIR table Ian Campbell
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=CA0DAA7F.1B8A7%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.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).