From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough Date: Thu, 09 Oct 2014 10:16:33 +0800 Message-ID: <5435F001.7030403@intel.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> <20141007072751.GC2424@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20141007072751.GC2424@redhat.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: "Michael S. Tsirkin" Cc: "xen-devel@lists.xensource.com" , "Kay, Allen M" , "qemu-devel@nongnu.org" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 2014/10/7 15:27, Michael S. Tsirkin wrote: > 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. > Yes, I will refine this with ARRAY_SIZE. Thanks Tiejun