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.