From patchwork Mon Dec 9 09:50:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11278881 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AB221575 for ; Mon, 9 Dec 2019 09:51:45 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBDC02072D for ; Mon, 9 Dec 2019 09:51:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I4s9Kfy6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBDC02072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ieFgn-0004Ua-HZ; Mon, 09 Dec 2019 09:50:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ieFgm-0004UC-Io for xen-devel@lists.xenproject.org; Mon, 09 Dec 2019 09:50:48 +0000 X-Inumbo-ID: 608c5210-1a69-11ea-87af-12813bfff9fa Received: from us-smtp-1.mimecast.com (unknown [207.211.31.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 608c5210-1a69-11ea-87af-12813bfff9fa; Mon, 09 Dec 2019 09:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575885048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2iD6T3th+ueTgWBqM5ey4lwC4HSji2/frVsA2WgJMg0=; b=I4s9Kfy6GrSZBIcNR4Q8VwQZEEu34DLpthVAIRd+AY1kDahU8PHTo2m/I5py/Ew6GwIRON oYw+72zq6C9OJzPy9iseMrJ9rF/3mg4Z9vHgkS76VB46cJo1Sr2Mm5sSLbnwMkYAxvjUmt M+RHyGZ004uc528auRXPWA59xIAm1iw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-Z6Cj3bucPzC0clLYFX03TA-1; Mon, 09 Dec 2019 04:50:46 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 515A01005512; Mon, 9 Dec 2019 09:50:45 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-142.brq.redhat.com [10.40.205.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBBF719C5B; Mon, 9 Dec 2019 09:50:40 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Mon, 9 Dec 2019 10:50:00 +0100 Message-Id: <20191209095002.32194-5-philmd@redhat.com> In-Reply-To: <20191209095002.32194-1-philmd@redhat.com> References: <20191209095002.32194-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Z6Cj3bucPzC0clLYFX03TA-1 X-Mimecast-Spam-Score: 0 Subject: [Xen-devel] [PATCH-for-5.0 v3 4/6] hw/pci-host/i440fx: Use definitions instead of magic values X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Stefano Stabellini , "Michael S. Tsirkin" , Paul Durrant , Markus Armbruster , Alex Williamson , Marcel Apfelbaum , Paolo Bonzini , Anthony Perard , xen-devel@lists.xenproject.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Use definitions from "hw/pci/pci_regs.h". This also helps when using git-grep. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/pci-host/i440fx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 0cc80b276d..414138595b 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -376,13 +376,13 @@ typedef struct { /* Here we just expose minimal host bridge offset subset. */ static const IGDHostInfo igd_host_bridge_infos[] = { - {0x08, 2}, /* revision id */ - {0x2c, 2}, /* sybsystem vendor id */ - {0x2e, 2}, /* sybsystem id */ - {0x50, 2}, /* SNB: processor graphics control register */ - {0x52, 2}, /* processor graphics control register */ - {0xa4, 4}, /* SNB: graphics base of stolen memory */ - {0xa8, 4}, /* SNB: base of GTT stolen memory */ + {PCI_REVISION_ID, 2}, + {PCI_SUBSYSTEM_VENDOR_ID, 2}, + {PCI_SUBSYSTEM_ID, 2}, + {0x50, 2}, /* SNB: processor graphics control register */ + {0x52, 2}, /* processor graphics control register */ + {0xa4, 4}, /* SNB: graphics base of stolen memory */ + {0xa8, 4}, /* SNB: base of GTT stolen memory */ }; static void host_pci_config_read(int pos, int len, uint32_t *val, Error **errp)