From patchwork Sat Mar 3 12:47:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanpeng Li X-Patchwork-Id: 144434 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3B5BE1007D4 for ; Sun, 4 Mar 2012 03:41:06 +1100 (EST) Received: from localhost ([::1]:33418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3rwB-0002kN-KC for incoming@patchwork.ozlabs.org; Sat, 03 Mar 2012 11:36:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oNv-0006Qk-35 for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3oNt-00038r-Bw for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:26 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:37202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oNs-00038l-Qf for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:25 -0500 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 3 Mar 2012 12:45:45 +1000 Received: from d23relay04.au.ibm.com (202.81.31.246) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 3 Mar 2012 12:45:45 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q23CgSgV3346626 for ; Sat, 3 Mar 2012 23:42:30 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q23Cm03m020138 for ; Sat, 3 Mar 2012 23:48:00 +1100 Received: from localhost ([9.123.245.143]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q23Clxk0020132; Sat, 3 Mar 2012 23:47:59 +1100 From: Wanpeng Li To: qemu-devel@nongnu.org, aliguori@us.ibm.com Date: Sat, 3 Mar 2012 20:47:58 +0800 Message-Id: <1330778878-32343-1-git-send-email-liwp@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 x-cbid: 12030302-5140-0000-0000-000000D7EC40 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.81.31.141 X-Mailman-Approved-At: Sat, 03 Mar 2012 11:35:10 -0500 Cc: liwp@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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);