All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Wanpeng Li <liwp@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit
Date: Sat, 03 Mar 2012 20:48:01 +0100	[thread overview]
Message-ID: <4F527571.5050609@suse.de> (raw)
In-Reply-To: <1330778322-30749-1-git-send-email-liwp@linux.vnet.ibm.com>

Am 03.03.2012 13:38, schrieb Wanpeng Li:
> PCI_CLASS_DISPLAY_VGA has already defined in hw/pci_ids.h, so use the
> macro definition instead of a simple digit.
> 
> Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>

Number matches,

Acked-by: Andreas Färber <afaerber@suse.de>

Cc'ing mst.

There's probably much more uses of magic number in the individual PCI
devices, host controllers and bridges.

Andreas

> ---
>  hw/pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/pci.c b/hw/pci.c
> index fe71666..274d86d 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -1784,7 +1784,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
>           * for 0.11 compatibility.
>           */
>          int class = pci_get_word(pdev->config + PCI_CLASS_DEVICE);
> -        if (class == 0x0300) {
> +        if (class == PCI_CLASS_DISPLAY_VGA) {
>              rom_add_vga(pdev->romfile);
>          } else {
>              rom_add_option(pdev->romfile, -1);

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-03-03 19:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03 12:38 [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit Wanpeng Li
2012-03-03 19:48 ` Andreas Färber [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-03 12:47 Wanpeng Li

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=4F527571.5050609@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=liwp@linux.vnet.ibm.com \
    --cc=mst@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 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.