qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch 1/2] add pci config space struct
Date: Wed, 27 Aug 2008 15:17:19 +0200	[thread overview]
Message-ID: <48B553DF.2090108@redhat.com> (raw)
In-Reply-To: <200808271308.58878.paul@codesourcery.com>

Paul Brook wrote:
> On Tuesday 26 August 2008, Gerd Hoffmann wrote:
>>   Hi,
>>
>> This patch adds a struct for the pci config header make it easier to
>> deal with it.  Comes from qemu-xen.
> 
> Adding a nice easy-to-use structure, then requiring all devices do 
> byteswapping themselves (negating most of the easy-to-use benefit) seems less 
> than ideal.

Byteswapping must be done anyway, with or without the struct.  Using the
struct allows to avoid casting all over the place though.  I'll go
switch over the config header struct to use the byteswapped types, then
repost together with some pci.c functions changed to use the new struct.
 IMHO it makes the code more readable due to hardcoded magic numbers and
casts going away.

cheers,
  Gerd

      reply	other threads:[~2008-08-27 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 10:40 [Qemu-devel] [patch 1/2] add pci config space struct Gerd Hoffmann
2008-08-26 12:25 ` Avi Kivity
2008-08-26 14:08   ` Gerd Hoffmann
2008-08-26 14:55     ` Avi Kivity
2008-08-27 10:52       ` Gerd Hoffmann
2008-08-27 12:08 ` Paul Brook
2008-08-27 13:17   ` Gerd Hoffmann [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=48B553DF.2090108@redhat.com \
    --to=kraxel@redhat.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 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).