From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough Date: Tue, 7 Oct 2014 10:27:51 +0300 Message-ID: <20141007072751.GC2424@redhat.com> References: <53FBF5BD.6060104@intel.com> <53FE7E3A.7050907@intel.com> <53FFD752.2040402@intel.com> <20140831085857.GC1514@redhat.com> <5403DEFD.1020704@intel.com> <20140901060506.GA20186@redhat.com> <54042514.6090206@intel.com> <003AAFE53969E14CB1F09B6FD68C3CD478F16D2A@ORSMSX101.amr.corp.intel.com> <54277979.7070408@intel.com> <54279EE3.3050208@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <54279EE3.3050208@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: "Chen, Tiejun" Cc: "xen-devel@lists.xensource.com" , "Kay, Allen M" , "qemu-devel@nongnu.org" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Sun, Sep 28, 2014 at 01:38:43PM +0800, Chen, Tiejun wrote: > >**errp) > >{ > > uint32_t value = 0; > > XenHostPCIDevice hdev; > > int r = 0, num; > > > > r = xen_host_pci_device_get(&hdev, 0, 0, 0x02, 0); > > if (!r) { > > value = hdev.device_id; > > > > num = sizeof(xen_igd_combo_id_infos)/sizeof(uint16_t); > > Sorry for this one typo: > > sizeof(xen_igd_combo_id_infos)/sizeof(xen_igd_combo_id_infos[0]); > > Tiejun so don't opencode this, use ARRAY_SIZE.