Re: [PATCH v2 3/3] vfio/nvgrace-gpu: Check the HBM training and C2C link status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Alex for the review.

>> +static int nvgrace_gpu_check_device_status(struct pci_dev *pdev)
>
> "nvgrace_gpu_wait_device_ready()"?

Ok, I'll rename it.

>> +{
>> +     void __iomem *io;
>> +     int time_elasped;
>> +
>> +     io = pci_iomap(pdev, 0, ~0UL);
>
> The documentation is unclear here, but existing code suggests passing 0
> here rather than -1 to map the full BAR.  It ends up being equivalent
> since the code doesn't error attempting to map longer than the BAR, but
> there's no reason to add a bad example.

Ack, will change to use 0.

>> +             }
>> +             msleep(POLL_QUANTUM_MS);
>> +     }
>
> time_after() would simplify things here.  I'd also suggest a common
> exit path.

Understood, will change.

>> +
>> +     pci_iounmap(pdev, io);
>> +     return -ENODEV;
>
> ETIME could work for the error code too.  Thanks,

Ack.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux