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


Reply via email to